xslt 1.0 get data from dynamic node-set in variable

61 views Asked by At

A variable is being used to store related record information

The variable has been updated to dynamically select, depending on results of a match,

eg

<xsl:variable name="SO">
            <xsl:choose>
                <xsl:when/>
                <xsl:otherwise/>

            </xsl:choose>
        </xsl:variable>

this is working, as counting the variable returns (using the node-set function to inspect the result tree fragment)

When trying to access fields in the node-set in the variable, am no longer able to

eg the UniqueId field exists on the original document that the variable is created from but no value is returned when using

<xsl:value-of select="string(msxsl:node-set($SO)/UniqueId)"/>

Does that make sense?!
Is this possible, to have choose when in a variable of a node-set?!
What am I doing wrong?!

thanks in advance!!

1

There are 1 answers

2
Jonny Hotchkiss On

issue stemmed from choosing value-of

resolved by using copy-of, then referencing variable as value-of select="msxsl:node-set($var)"

kudos to tryst