Subject: Re: [xsl] creating top-level elements from within child elements From: RQamar <qamar_rahil@xxxxxxxxxxx> Date: Tue, 22 Feb 2005 16:00:13 +0000 |
Yeah I think this approach makes a lot more sense. Silly how one gets stuck with their present way of doing things that you cant see other ways.
You didn't post your input, so this isn't filled in , but you want something like:
<xsl:template match="Top"> <Top> <xsl:apply-templates select="TopNode" /> </Top> </xsl:template>
<xsl:template match="TopNode"> <PrimeConcept id='10180'>Car</PrimeConcept> <SubConcepts> <SubConcept id='10298'>Toyota</SubConcept> </SubConcepts> </xsl:template>
will do the job, but presumably you want to replace some of those fixed element and attribute names by xpath expressions.
David
Cheers Rahil
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] creating top-level elemen, David Carlisle | Thread | RE: [xsl] creating top-level elemen, Jarno.Elovirta |
Re: [xsl] xslt and the filesystem, Daniel Bibbens | Date | Re: [xsl] Using in XSL HTML , Kevin Rodgers |
Month |