teacup/config/book-template.xml

18 lines
1.8 KiB
XML
Raw Permalink Normal View History

2021-12-15 11:29:23 +00:00
<formTemplate collection="/BCH/content/main/eBooks" contentType='book'>
<!-- @xpath will be resolved against each item in the collection, to pre-populate the field -->
<item name="title" xpath="/*:book/*:info/*:title" title="Title"/>
<!-- @occurs specifies whether is the field is optional and/or repeatable: allowed values ?, +, * -->
<item name="author" xpath="/*:book/*:info/(*:authorgroup/*:author/(* except *:personblurb)|*:author/(* except *:personblurb))" occurs="+" title="Author" readOnly="true"/> <!-- some shouldn't be editable -->
<item name="editor" xpath="/*:book/*:info/(*:authorgroup/*:editor/(* except *:personblurb)|*:editor/(* except *:personblurb))" occurs="+" title="Editor" readOnly="true"/>
<item name="pubdate" xpath="/*:book/*:info/*:pubdate" title="Original publication date" assert=". castable as xs:gYear"/>
<item name="edition" xpath="/*:book/*:info/*:edition/@role" title="Edition"/>
<item name="xml-isbn" xpath="/*:book/*:info/*:biblioset[@role='isbns']/*:biblioid[@role='xml']" title="XML ISBN"/>
<item name="hb-isbn" xpath="/*:book/*:info/*:biblioset[@role='isbns']/*:biblioid[@role='hardback']" title="HB ISBN"/>
<!-- now some fields that didn't exist in the source: -->
<!-- use @assert to specify some datatyping or other bespoke validation: -->
<item name="date" title="First published online" assert=". castable as xs:gYear"/>
<!--item name="sourceContentType" title="Source Content Type" xpath="collection('bch/content-management')/*:metadata[@id = $bookId]/*:contentType/@source"/>
<item name="productContentType" title="Platform Content Type" xpath="collection('bch/content-management')/*:metadata[@id= $bookId]/*:contentType/@ref/(substring-after(., '#'))"/-->
<item name="taxonomy" controlledList="bdl" title="Index terms" occurs="+"/>
</formTemplate>