[xsl] Outputting XML to hidden HTML form fields

Subject: [xsl] Outputting XML to hidden HTML form fields
From: Lorenzo De Sio <l.desio@xxxxxx>
Date: Mon, 15 Jan 2001 18:16:45 +0100

I need to output a raw XML node to a hidden HTML form field.

The following code used to work on MSXML 1.0 :-) (whitespace/CR added for
clarity) :

<input type="hidden">
	<xsl:attribute name="name">
		_desc_<xsl:value-of select="id"/>

	<!-- the above works fine. -->

	<xsl:attribute name="value">
			<xsl:for-each select="*">
					<xsl:value-of select="."/>

The strange thing is that:

1) If you try to put the whole <xsl:copy> loop outside of the
<xsl:attribute> (before or after the </input>, no difference), everything
works fine.

2) As you put the copy loop in the <xsl:attribute> tag (like above), MSXML3
outputs nothing, while Xalan outputs the nodes' text only, with no tags.

Is this a known or designed behavior? Is there a solution on MSXML3 ?

Thanks in advance to anyone who can help,



XML source is:

		<desc>Article 70028</desc>
		<desc>Article 70010</desc>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread