Subject: R: [xsl] Outputting XML to hidden HTML form fields From: Lorenzo De Sio <l.desio@xxxxxx> Date: Tue, 16 Jan 2001 10:30:39 +0100 |
> What I think you want is <xsl:attribute name="value"> <xsl:text><item></xsl:text> <xsl:for-each select="*"> <xsl:text><</xsl:text> <xsl:value-of select="name(.)"/> <xsl:text>></xsl:text> <xsl:value-of select="."/> <xsl:text></</xsl:text> <xsl:value-of select="name(.)"/> <xsl:text>></xsl:text> </xsl:for-each> <xsl:text></item></xsl:text> </xsl:attribute> That's what I need, but MSXSL (correctly, I guess :-))) automatically escapes everything inside the <xsl:attribute>, even if you add "disable-output-escaping='yes'" to each <xsl:text> element. For those who will need something similar in the future (putting XML in HTML hidden form fields), here is the only solution I found. It's really very far from elegance, but it works on both MSXSL and Xalan, so I guess it's not non-standard (and it doesn't require extension functions): (copies a "item" node with subnodes into a hidden field) <xsl:text disable-output-escaping="yes"><input type="hidden" name="_desc_</xsl:text> <xsl:value-of select="id"/> <xsl:text disable-output-escaping="yes">" value="</xsl:text> <xsl:text disable-output-escaping="yes"><item></xsl:text> <xsl:for-each select="*"> <xsl:text disable-output-escaping="yes"><</xsl:text> <xsl:value-of select="name(.)"/> <xsl:text disable-output-escaping="yes">></xsl:text> <xsl:value-of select="."/> <xsl:text disable-output-escaping="yes"></</xsl:text> <xsl:value-of select="name(.)"/> <xsl:text disable-output-escaping="yes">></xsl:text> </xsl:for-each> <xsl:text disable-output-escaping="yes"></item></xsl:text> <xsl:text disable-output-escaping="yes">"></xsl:text> L. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] format-number() causing p, Uche Ogbuji | Thread | Re: R: [xsl] Outputting XML to hidd, David Carlisle |
Re: [xsl] the nearest ancestor with, Oliver Becker | Date | Re: [xsl] Indexing a fop generated , Sebastian Rahtz |
Month |