|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Still battling with practical strategy for parsing
Hi. > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Karr, David > Sent: Tuesday, July 29, 2003 5:56 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: Still battling with practical strategy for > parsing escaped XML inside unescaped XML > > (...) > 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> > The stylesheet I provided worked only with strings, it doesn't have any node, just text that looks like markup, there for you can not do xalan:nodeset($str), it will be the same as doing xalan:nodeset("<sometag>opps</sometag>"). It won't work. What you need to do is to apply those templates inside the definition of a variable and use the xalan:nodeset() on that variable. Something like: <xsl:variable name="mymarkup"> <xsl:call-template name="unescape"> <xsl:with-param name="str" select="value"/> </xsl:call-template> </xsl:variable> <xsl:for-each select="xalan:nodeset($mymarkup)"> Or <xsl:apply-templates select="xalan:nodeset($mymarkup)"/> You have to be sure that the string you pass to it is a well-formed xml text representation Hope this help Regards, Américo Albuquerque 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
|

Cart








