Not sure if anybody monitors this - extremely low activity here (I think this is the first real post), but I'll give it a go:
We spent some time getting xsltdoc to work in our environment, creating a mavenized jar so we can easily load into all our projects, building a JUnit test that executes the xsltdoc.xsl so we can run from eclipse and Jenkins, etc. I think this is going to be a good addition to our XSLT practice.
But we ran into a problem. The ultimate cause remains obscure, but seems to have something to do with the built-in assumption that all URIs handled by xsltproc are filesystem uris. Because we are loading xsltproc code and our own source xslt from the java classpath as resources, this assumption is not correct for us. We seem to have managed to fix most of our issues by tweaking our URIResolver, but the problem that is the subject of this post remained.
The fix was this reimplementation of util:getFolder:
<xsl:function name="util:getFolder">
<xsl:param name="uri" as="xs:string"/>
<xsl:sequence select="replace($uri, '(file:)?(.*/)(*)', '$2')"/>
<!- I added the (file:) removal to avoid an infinite loop in getSharedPath - sokolov 2012/09/07 ->
</xsl:function>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not sure if anybody monitors this - extremely low activity here (I think this is the first real post), but I'll give it a go:
We spent some time getting xsltdoc to work in our environment, creating a mavenized jar so we can easily load into all our projects, building a JUnit test that executes the xsltdoc.xsl so we can run from eclipse and Jenkins, etc. I think this is going to be a good addition to our XSLT practice.
But we ran into a problem. The ultimate cause remains obscure, but seems to have something to do with the built-in assumption that all URIs handled by xsltproc are filesystem uris. Because we are loading xsltproc code and our own source xslt from the java classpath as resources, this assumption is not correct for us. We seem to have managed to fix most of our issues by tweaking our URIResolver, but the problem that is the subject of this post remained.
The fix was this reimplementation of util:getFolder: