-
Notifications
You must be signed in to change notification settings - Fork 50
Description
The US Epigraphy Project (USEP) manages controlled vocabularies for characteristics like genre, material, type of object and several others using an external taxonomy file. The taxonomy file has lists of values, each with its own @xml:id, and with a human readable display value. You can see the taxonomy file here. The taxonomy file is incorporated into the inscription xml using xi:include. It would also be possible to access it with document() or doc(). In the TEIHeader these vocabularies are called as follows:
<objectDesc ana="#slab">
<supportDesc ana="#stone.marble">
where #slab refers to an element in the taxonomy file. Full USEP inscription here.
In EFES, we were unable to make this work using the xi:include, so tried using document() and later, doc().
It became clear that EFES, that is Cocoon, was unable to find the file. It was possible to make document() work using a full file path from root of the local computer, although we couldn't get the second parameter, the xpath leading to a node, to work unless it was /.
We then tried to use the xpath function doc() to give us the root of the file and write an xpath based on that. This started to generate Cocoon errors. It seems possible that document() is an XSLT function and so doesn't have access to the xmaps, but doc() as an xpath function does, and this was throwing errors.
I think we need help mapping our taxonomy file - in main.xmap? so it is accessible within Cocoon. It also has to be accessible inside the XSLT stylesheet.
Another approach might be to use a system variable, again inside the XSLT, so that we can specify a path either from server root or Cocoon root.
In any case, this is not an uncommon way to handle controlled vocabularies, and it is different from the structures in current projects using EFES. It has to be handled in order for us to display and probably also to index our inscriptions.
In the xslt style sheet htm-tpl-struct-usep.xsl, we have the following:
<b><i18n:text i18n:key="epidoc-xslt-usep-object">Object Type</i18n:text>: </b>
<xsl:choose>
<xsl:when test="//t:teiHeader/t:fileDesc/t:sourceDesc/t:msDesc/t:physDesc/t:objectDesc/@ana">
<xsl:variable name="taxonomy-item" select="substring-after(//t:teiHeader/t:fileDesc/t:sourceDesc/t:msDesc/t:physDesc/t:objectDesc/@ana, '#')"/>
<xsl:value-of
select="doc('/inscriptions/authority/include_taxonomies.xml')//*[@xml:id=$taxonomy-item]"
/>
which generates the following error:

This leads us to believe that we are now having file path mapping problem. Happy to clarify or provide more information.