I am in the process of transforming an XML file, using a map based on a subtype in the header.
To make this logic happen I've used an xsl:if inside a template that matches on the root node.
<xsl:template match="/">
<xsl:variable name="var:invoiceSubtype" select="//Header/InvoiceType/text()"></xsl:variable>
<xsl:if test="$var:invoiceSubtype = 'Invoice'">
Inside the xsl:if I've pasted the XSLT code for the map, without changing the xpath, but some of my elements are not showing any data, like this one:
<BELNR>
<xsl:value-of select="/Header/InvoiceNumber/text()" />
</BELNR>
The structure of my schema up until the InvoiceType looks like this:
Using the double slash to select the element works, but I'd rather avoid using that, since there might be duplicate named elements.
Is there a way of showing where you currently are in the source schema when selecting nodes? I'm unsure as to what the correct path is.