Hello all,

I'm trying to retrieve the URI of the base document. This should be easily done with either:

base-uri()

or

document-uri(/)

And, indeed, when I run Saxon from the command line, this works.

Unfortunately, when using EditiX, which uses the same .jar file, it appears to have no clue what I'm asking. I realize this is not a problem with SAXON, but I am hoping Michael has some insight into what is going wrong or things I might try to fix it.

<xsl:value-of select="base-uri()"/>  returns an empty string.
<xsl:value-of select="base-uri(document(''))"/> returns the URI of the stylesheet (which is as expected but not useful to me)
<xsl:value-of select="document-uri(/)"/> returns an empty string.

<xsl:value-of select="document-uri(document('dummy.xml',.))"/>  (where "dummy.xml" is the name of the source document) returns an error, saying that "dummy.xml" could not be found in the STYLESHEET's directory. That is to say, when I invoke document('file', .), it is not using the second argument correctly to determine where to look for the file and incorrectly looks in the directory of the stylesheet.

I have sent a note to EditiX support, but if you have any insight as to what might be going wrong or have another way for me to procure the source files, URI, I would appreciate it.

The consul shows no errors when I do a "base-uri()," so I have nothing to go on. I can only assume that EditiX is not using the same URI resolver that saxon does from the command line.

Thanks,
David





--

"A false conclusion, once arrived at and widely accepted is not dislodged easily, and the less it is understood, the more tenaciously it is held." - Cantor's Law of Preservation of Ignorance.