This what I had to do to get things to work with minimal changes to xalan-1
code.
<xsl:variable name="SelectFilterX">
<xsl:choose>
<xsl:when test="$Filter=normalize-space($fieldTest)">
<xsl:copy-of select="$OSHProfile/default_filter/filter"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$OSHProfile/quick_filters/*[field[1]
=$Filter]"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="SelectFilter" select="xalan:nodeset
($SelectFilterX)"/>
<xsl:copy-of select="$SelectFilter"/>
This outputs:
<filter name="filter">
<field>
Summary View
</field>
<field>
0
</field>
<field>
</field>
</filter>
Yea, the structure is maintained in the assignment.
Now the tests below evaluate to true. I had to add /filter in the path.
Apparently the filter step was not selected in xalan-1.
<xsl:if test="normalize-space($SelectFilter/filter/field[2]/text())
='0'">
<xsl:text>Field 2 is 0.</xsl:text>
</xsl:if>
<xsl:if test="mmiFacilityCid/@ncid=normalize-space
($SelectFilter/filter/field[position()>2]/text())">
<xsl:text>Field > 2 has ncid.</xsl:text>
</xsl:if>