Subject: [xsl] How to add a top level element to the result ? From: "Samuel Abraham" <samuel.abraham@xxxxxx> Date: Thu, 20 Dec 2001 16:31:04 +0800 |
Hi all, I have a xml file <A> <B> <C attr1="c" attr2="12" /> <C attr1="d" > <C attr1="f" attr2="15"/> </C> <C attr1="e" attr2="14" /> <T attr1="t" attr2="16" /> </B> </A> and applied 2 rules <xsl:template match="/A/B//C"> <xsl:element name="{@attr1}"> <xsl:apply-templates /> <xsl:value-of select="@attr2"/> </xsl:element> </xsl:template> <xsl:template match="T"/> I need to add a top level element to the result. eg:To add Message as a top level element. <Message> <c>12</c> <d> <f>15</f> </d> <e>14</e> </Message> Is it possible to do this? thanks Samuel Abraham -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] comparing XML streams / n, Thomas B. Passin | Thread | RE: [xsl] How to add a top level el, Chris Bayes |
RE: [xsl] Template problem.Unnecess, Chris Bayes | Date | RE: [xsl] RTF and XSLT, DPawson |
Month |