[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Still battling with practical strategy for parsing
Comments below. > -----Original Message----- > From: Américo Albuquerque [mailto:melinor@xxxxxxx] > > > -----Original Message----- > > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > > > > -----filter.xsl--------- > > > > <xsl:template match="other"> > > <xsl:variable name="keyValue" select="key"/> > > <xsl:variable name="values"> > > <xsl:call-template name="unescape"> > > <xsl:with-param name="str" select="value"/> > > </xsl:call-template> > > </xsl:variable> > > Here you have you'll have to use vendor:node-set() function to change from > rtf to nodelist > > define in your xsl:stylesheet the fn namespace: > <xsl:stylesheet ... xmlns:fn="http://exslt.org/common"> > ... > <xsl:for-each select="fn:node-set($values)"> > > > <xsl:for-each select="$values"> > > <xsl:value-of select="$keyValue"/>-<xsl:value-of > > select="name()"/> > > </xsl:for-each> > > </xsl:template> > > </xsl:stylesheet> > > -----filter.xsl--------- > > > > --------shell output------ > > [;] xalan -IN data.xml -XSL filter.xsl > > > file:.../filter4.xsl; Line #23; Column #33; XSLT Error > (org.apache.xpath.XPathException): Can not convert #RTREEFRAG to a > NodeList! > --------shell output------ I don't think it will do much good to change how I iterate through the variable, because the error occurs on the assignment to the variable, which is before the "for-each". I also already tried changing your script to call "node-set" on the return value. I changed this in your original script: <xsl:otherwise> <xsl:value-of select="$str"/> </xsl:otherwise> to: <xsl:otherwise> <xsl:value-of select="xalan:nodeset($str)"/> </xsl:otherwise> I made sure to add the namespace in the stylesheet attributes. When I did this, it didn't fix the problem. It didn't even change the error message. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|