xsl-list
[Top] [All Lists]

Re: [xsl] When to use text()

2014-03-21 10:29:12
You see an hour ago I wast quite content with my

  <xsl:template match="RentAmount | MonthlyAmounts">
    <xsl:attribute name="class" select="'money'"/>
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="RentAmount/text() | MonthlyAmounts/text()">
    <xsl:value-of select="format-number(.,if (xs:decimal(.) > 999.99)
then '$,000.00' else '$0.00')"/>
  </xsl:template>

but now I am not  sure what to make of  the presence of text() in a
match pattern.


On Fri, Mar 21, 2014 at 3:03 PM, Ihe Onwuka 
<ihe(_dot_)onwuka(_at_)gmail(_dot_)com> wrote:
On Fri, Mar 21, 2014 at 2:20 PM, Wendell Piez 
<wapiez(_at_)wendellpiez(_dot_)com> wrote:
Hi,

To gloss Mike ...

Yes, text() is over-used and commonly misused.


I wouldn't be blaming the programmers for that.

When you step back, it is clear from all the explanations given, that
the thing doesn't do what it says on the tin.

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>