xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krobe...@mmm.com
Subject RE: Conditional assignment of tree frag to variable doesn't work.
Date Fri, 09 May 2003 19:39:10 GMT
This what I had to do to get things to work with minimal changes to xalan-1

    <xsl:variable name="SelectFilterX">
        <xsl:when test="$Filter=normalize-space($fieldTest)">
          <xsl:copy-of select="$OSHProfile/default_filter/filter"/>
          <xsl:copy-of select="$OSHProfile/quick_filters/*[field[1]
    <xsl:variable name="SelectFilter" select="xalan:nodeset
    <xsl:copy-of select="$SelectFilter"/>

This outputs:

    <filter name="filter">

                Summary View





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())
        <xsl:text>Field 2 is 0.</xsl:text>

    <xsl:if test="mmiFacilityCid/@ncid=normalize-space
        <xsl:text>Field > 2 has ncid.</xsl:text>

View raw message