-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handling external authority file #60
Comments
Is there any chance you can make your installation (with modified code and content XML) available for me to reproduce this, please? |
you have an invitation to the repository which is closed at the moment. the usep stylesheet is at //ROOT/content/stylesheets/htm-tpl-struct-usep.xsl I've made changes to the map files in //ROOT/sitemaps |
This will also come up when we try to index our values, so we are grateful for any further information on how to handle that. |
Thank you! The error message is because a plain string within the doc function is being interpreted with the cocoon protocol (as per the error message). You can reference files on disk using the file protocol (eg, file:///path/to/file), but that requires an absolute path which is not portable. There are a few options here, and you listed a few of them yourself. Since the authority file is integral to the content documents in various contexts (display and indexing at least), I would put the solution as close to the reading of those content documents as possible. There are preprocessing pipelines that already exist for display (internal.xmap#local-preprocess-epidoc-language) and indexing (solr.xmap#local-solr-preprocess) that you can modify to include a |
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 usingxi:include
. It would also be possible to access it withdocument()
ordoc()
. In the TEIHeader these vocabularies are called as follows: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 usingdocument()
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 thatdocument()
is an XSLT function and so doesn't have access to the xmaps, butdoc()
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:
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.
The text was updated successfully, but these errors were encountered: