xsl-list
[Top] [All Lists]

Re: creating top-level elements from within child elements

2005-02-22 09:00:13


David Carlisle wrote:

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
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.

Thanks so much for all your help. Really do appreciate it.

Cheers
Rahil


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--