[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: creating top-level elements from within child ele

Subject: Re: creating top-level elements from within child elements
From: RQamar <qamar_rahil@xxxxxxxxxxx>
Date: Tue, 22 Feb 2005 16:00:13 +0000
Re:  creating top-level elements from within child  ele
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.