61 lines
No EOL
4.3 KiB
XML
61 lines
No EOL
4.3 KiB
XML
<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="bookid" xpath="/*:book/@xml:id" title="Book ID" readOnly="true" type="textfield"/>
|
|
<item name="title" xpath="/*:book/*:info/*:title" title="Title" readOnly="true" type="textfield"/>
|
|
|
|
<!-- @occurs specifies whether is the field is optional and/or repeatable: allowed values ?, +, * -->
|
|
<item name="author" xpath="string-join(/*:book/*:info/(*:authorgroup/*:author/(* except *:personblurb)|*:author/(* except *:personblurb)) , ' , ')" occurs="+" title="Author" readOnly="false" type="textfield"/> <!-- some shouldn't be editable -->
|
|
|
|
<!-- <item name="editor" xpath="/*:book/*:info/(*:authorgroup/*:editor/(* except *:personblurb)|*:editor/(* except *:personblurb))" occurs="+" title="Editor" readOnly="false" type="textfield"/>-->
|
|
|
|
<item name="pubdate" xpath="/*:book/*:info/*:pubdate" title="Original publication date" assert=". castable as xs:gYear" readOnly="false" type="textfield"/>
|
|
|
|
<item name="edition" xpath="/*:book/*:info/*:edition/@role" title="Edition" type="textfield" readOnly="false"/>
|
|
|
|
<item name="xml-isbn" xpath="/*:book/*:info/*:biblioset[@role='isbns']/*:biblioid[@role='xml']" title="XML ISBN" readOnly="false" type="textfield"/>
|
|
|
|
|
|
<!-- now some fields that didn't exist in the source: -->
|
|
<!-- use @assert to specify some datatyping or other bespoke validation: -->
|
|
|
|
<item name="publisher" xpath="/*:book/*:info/*:biblioset[@role='publisher']/*:publisher[1]/*:publishername" title="publisher" readOnly="false" type="textfield"/>
|
|
|
|
<item name="copyright" xpath="/*:book/*:info/*:copyright/*:holder" title="Copyright" readOnly="false" type="textfield"/>
|
|
|
|
<item name="buylink" xpath="let $publisher := /*:book/*:info/*:biblioset[@role='publisher']/*:publisher[1]/*:publishername
|
|
let $printIsbn := replace(/*:book/*:info/*:biblioset[@role='isbns']/*:biblioid[@role='hardback'], '-', '')
|
|
let $allPublishers := fn:collection('/metadataonlycontent/publisher/')/*:publisher
|
|
let $onePublisher := $allPublishers[*:item_title[matches($publisher, .)]]
|
|
for $urlStem in $onePublisher/*:url_default
|
|
return concat($urlStem, $printIsbn)" title="Buy Link" readOnly="false" type="textfield"/>
|
|
|
|
<item name="sams-id" xpath="let $book_id := /*:book/@xml:id return fn:string-join(fn:collection('/bloomsbury/products/')/*:product[*:contents/*:content/*:item/@id/string()=$book_id]/@name/string(), ' , ')" title="SAMS ID" readOnly="false" type="textfield"/>
|
|
|
|
<!--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="+"/>
|
|
|
|
<!--<item name="Additional Role" xpath=" " title="Additional Role" readOnly="false" type="textfield"/>-->
|
|
<item name="abstract" xpath="/*:book/*:info/*:abstract " title="Abstract" readOnly="false" type="textarea"/>
|
|
|
|
<item name="doi" xpath="/*:book/*:info/*:biblioid[@class='doi'] " title="DOI(Book)" readOnly="false" type="textfield"/>
|
|
|
|
<item name="Seriestitle" xpath="/*:book/*:info/*:biblioset[@role='series']/*:title[@role='series']" title="Series Title"
|
|
readOnly="false" type="textfield"/>
|
|
|
|
<item name="territorialrestriction" title="Territorial restriction" readOnly="false" type="textarea" xpath=" (
|
|
let $isbns :=replace(/*:book/*:info/*:biblioset[@role='isbns']/*:biblioid[@class='isbn'],'-','')
|
|
for $desc in fn:collection('/ONIXDB/ONIX')/ONIXMessage/Product[ProductIdentifier[ProductIDType='15']/IDValue[
|
|
.=
|
|
$isbns
|
|
]]/SalesRights[SalesRightsType = '01']/RightsCountry
|
|
return $desc , let $isbns := /*:TEI/*:teiHeader/*:fileDesc/*:publicationStmt
|
|
/*:idno[@type='isbn']
|
|
for $desc in fn:collection('/ONIXDB/ONIX')/ONIXMessage/Product[ProductIdentifier[ProductIDType='15']/IDValue[
|
|
.=
|
|
$isbns
|
|
]]/NotForSale/RightsCountry
|
|
return $desc )" />
|
|
<item name="additionalrole" xpath="" title="Additional Role" readOnly="false" type="textfield"/>
|
|
</formTemplate> |