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(_dot_)Honnen(_at_)gmx(_dot_)de> 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
pattern).
My logic mentioned the element name in the template body, as well.
<xsl:template match="property">
<xsl:attribute name="{(_at_)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 :)
--
Regards,
Mukul Gandhi
--~------------------------------------------------------------------
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>
--~--