Using something similar to the answer found in this question I put together a function based off to create an XML result tree fragment that I loaded into a variable.
I was able to convert this XML
<Summary> <Summary>
<Category>
<Category>Tuition and Fees</Category>
<TotalDebits>0.00</TotalDebits>
<TotalCredits>-3509.45</TotalCredits>
</Category>
<Category>
<Category>Miscellaneous</Category>
<TotalDebits>60.62</TotalDebits>
<TotalCredits>-234.36</TotalCredits>
</Category>
</Summary>
</Summary>
to this
<Summary>
<Category>
<Category>Tuition and Fees</Category>
<TotalDebits>0.00</TotalDebits>
<TotalCredits>-3509.45</TotalCredits>
</Category>
<Category>
<Category>Miscellaneous</Category>
<TotalDebits>60.62</TotalDebits>
<TotalCredits>-234.36</TotalCredits>
</Category>
</Summary>
which is contained in this variable
<xsl:variable name="SummaryItems">
<xsl:call-template name="TheGreatUnescape">
<xsl:with-param name="escaped" select="string(//Summary)" />
</xsl:call-template>
</xsl:variable>
Now my issue is that I'm trying to use exslt:node-set()
to gain access to the nodes within this variable but I'm not getting any information.
When using a function like
<xsl:for-each select="exslt:node-set($SummaryItems)/Summary/Category">
it produces no result.
I did include the xmlns:exslt="http://exslt.org/common"
declaration in the xsl:stylesheet
and I've tested the node-set
function so I know it works just not with the converted XML in the variable.
Have I created a real result tree fragment using that code that exslt:node-set
can access?