|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Transform some attributes into HTML span elements
Mukul Gandhi wrote:
Hi,
> I think, I would have done this as following:
>
<xsl:template match="InspectionReportInput">
> <span
id="firstName"><xsl:value-of select="@firstName"
> /></span> <span
id="lastName"><xsl:value-of select="@lastName"
>
/><xs:text>, </xsl:text><xsl:value-of select="@city" />
> </xsl:template>
I
am always surprised to see that many people try very hard to
be "more
concise", even when that ends up less readable. Why not
simply that?:
<!--
Format an inspection report element by using the
appropriate SPAN elements and text separators.
-->
<xsl:template
match="InspectionReportInput">
<span id="firstName">
<xsl:value-of select="@firstName"/>
</span>
<xsl:text>
</xsl:text>
<span id="lastName">
<xsl:value-of
select="@lastName"/>
</span>
<xs:text>, </xsl:text>
<span
id="city">
<xsl:value-of select="@city"/>
</span>
</xsl:template>
Regards,
--
Florent Georges
http://fgeorges.org/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








