Subject: Re: Transform some attributes into HTML span elements with delimiters (specific format)
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Fri, 28 May 2010 04:51:12 +0530
|
yes, sure :)
your code-fragment is certainly well readable than mine.
On Fri, May 28, 2010 at 3:42 AM, Florent Georges <lists@xxxxxxxxxxxx> wrote:
> Mukul Gandhi wrote:
>
> B Hi,
>
>> I think, I would have done this as following:
>
>> <xsl:template match="InspectionReportInput">
>> B <span id="firstName"><xsl:value-of select="@firstName"
>> /></span>B <span id="lastName"><xsl:value-of select="@lastName"
>> /><xs:text>,B </xsl:text><xsl:value-of select="@city" />
>> </xsl:template>
>
> B I am always surprised to see that many people try very hard to
> be "more concise", even when that ends up less readable. B Why not
> simply that?:
>
> B B <!--
> B B B B Format an inspection report element by using the
> B B B B appropriate SPAN elements and text separators.
> B B -->
> B B <xsl:template match="InspectionReportInput">
> B B B <span id="firstName">
> B B B B B <xsl:value-of select="@firstName"/>
> B B B </span>
> B B B <xsl:text> </xsl:text>
> B B B <span id="lastName">
> B B B B B <xsl:value-of select="@lastName"/>
> B B B </span>
> B B B <xs:text>, </xsl:text>
> B B B <span id="city">
> B B B B B <xsl:value-of select="@city"/>
> B B B </span>
> B B </xsl:template>
>
> B Regards,
>
> --
> Florent Georges
> http://fgeorges.org/
--
Regards,
Mukul Gandhi
|