I'm new to XSLT, but I have looked into this and I can't seem to get this working. I've got an xsl document and an external xml document. I'm importing the document as a variable $LOOKUP
External XML
<?xml version="1.0" encoding="UTF-8"?>
<labels>
<label ead="physloc">Physical Location</label>
<label ead="unittitle">Title</label>
</labels>
VARIABLE
<xsl:variable name="LOOKUP" select="document('includes/labels.xml', /)" />
XSL
<xsl:value-of select="$LOOKUP/labels/label[@ead='unittitle']" />
When I'm debugging this (oXygen with Saxon EE 9.5.1.7) I can see that the document has been imported, and I can even browse the Node/Value set with the debugger, but I get nothing printed out.
What am I doing wrong?
Perhaps your stylesheet uses
xpath-default-namespace
and that way the path does not work. Try<xsl:value-of xpath-default-namespace="" select="$LOOKUP/labels/label[@ead='unittitle']" />
.