Subject: Re: [xsl] creating a string of child node names From: Manolis Mavrikis <M.Mavrikis@xxxxxxxx> Date: Wed, 03 Dec 2003 11:37:53 +0000 |
<xsl:element name="input"> <xsl:attribute name="value"> <xsl:for-each select="*"> <xsl:value-of select="name(.)"/> <xsl:if test="position() != last()">,</xsl:if> </xsl:for-each> </xsl:attribute> <xsl:attribute name="type">hidden</xsl:attribute> </xsl:element>
<xsl:variable name="value"> <xsl:for-each select="*"> <xsl:value-of select="name(.)"/> <xsl:if test="position() != last()">,</xsl:if> </xsl:for-each> </xsl:variable> <input name="X2H_VAR_NAMES111" value="{$value}" type="hidden"/>
Manolis Haydn Flower wrote:
I need to build up a string if child node names.
so far I have <xsl:template match="Invoice">
<input name="X2H_VAR_NAMES" value="{name(./*)}" type="hidden"/>
</xsl:template>
this is a sample of the xml file <Invoice> <InvoiceNumber/> <DespatchNoteNumber/> <OrderNumber /> <AccountNo/> </Invoice>
my result only has <input name="X2H_VAR_NAMES" value="InvoiceNumber" type="hidden"/>
and I would like <input name="X2H_VAR_NAMES" value="InvoiceNumber,DespatchNoteNumber,OrderNumber,AccountNo" type="hidden"/>
Thank you for your help
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] creating a string of child no, Haydn Flower | Thread | RE: [xsl] creating a string of chil, Haydn Flower |
Re: [xsl] Re: HOWTO: convert flat l, David Tolpin | Date | Re: [xsl] creating a string of chil, David Carlisle |
Month |