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

Re: InnerElement attribute needs to be set for parent

Subject: Re: InnerElement attribute needs to be set for parent
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Sat, 10 May 2008 19:41:19 +0530
Re:  InnerElement attribute needs to be set for parent
I din't know the reasons why Martin choose the code fragments below,
as opposed to what I wrote. But in fact I think Martin's logic is
better than mine (please see below why I think so):

On 5/10/08, Martin Honnen <Martin.Honnen@xxxxxx> wrote:
>  <xsl:template match="propertyList">
>    <xsl:copy>
>      <xsl:apply-templates select="property"/>
>    </xsl:copy>
>  </xsl:template>

This is better, because inside the template body there is no hard
coding of the 'propertyList' element. If the element name changes,
it's required to change the name at only one place (at the match

My logic mentioned the element name in the template body, as well.

>  <xsl:template match="property">
>    <xsl:attribute name="{@name}">
>      <xsl:value-of select="@value"/>
>    </xsl:attribute>
>  </xsl:template>

Martin's code is more aligned with the spirit of XSLT, but I thought
more procedural like.

But I do not dislike my logic :)

Mukul Gandhi

Current Thread


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.
First Name
Last Name
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.