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

Re: dynamic node access

Subject: Re: dynamic node access
From: RQamar <qamar_rahil@xxxxxxxxxxx>
Date: Mon, 21 Feb 2005 15:24:49 +0000
xsl access node attributes
David Carlisle wrote:

So how can I create the element <SubConcepts> below <Top> and not <PrimeConcept> ?



just move it there in the stylesheet, what's the problem?


The problem lies in that a <SubConcepts> node is created only if there exists some 'Toyota'. So I've created the <SubConcepts> node dynamically inside the <xsl:template> of the <PrimeConcept> node. A simple <xsl:element name='SubConcepts'> within this template automatically places it as a child of <PrimeConcept>. However I want <SubConcepts> to be the child of <Top> even though its being created inside the <PrimeConcept> template.

incidentally

<xsl:element name="SubConcept">
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
</xsl:element>


is a very long way of writing

<SubConcept id="{@id}" name="{@name"/>



This looks neat. Will refine my code. Thanks


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.