This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XSLT/XPath 2.0 (was "Identifying two tags...")
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: "bryan" <bry at itnisk dot com>
- Cc: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 14 May 2002 19:19:57 +0100
- Subject: Re: [xsl] XSLT/XPath 2.0 (was "Identifying two tags...")
- Organization: Jeni Tennison Consulting Ltd
- References: <000101c1fb6e$958f10c0$2001a8c0@bryans>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Bryan,
> I wrote
>>
>> <xsl:template match="Customers">
>> <xsl:variable name="checkV" select="getValidator(Customer/@CustID)"/>
>> <xsl:variable name="checkI">
>> <xsl:choose>
>> <xsl:when test="Customer/@CustID + 1 ='NaN'">
>> Not a Number
>> </xsl:when>
>> <xsl:when test=" Customer/@CustID = ' '">
>> blank
>> </xsl:when>
>> </xsl:variable>
>> <xsl:if test="valid() = 'NotValid'">
>> <xsl:text>your entry for Customer ID was non-valid, according to our
>> records you entered <xsl:value-of select="Customer/@CustID"/> a value
>> that was <xsl:value-of select="$check1"/>
>> please retry your entry again and enter a value of type <xsl:value-of
>> select="$checkV/xsd:attribute/@type"/>
>> </xsl:text>
>>
>> </xsl:if>
>> <xsl:apply-templates/>
>>
>> </xsl:template>
>
> with the xsl:text made bad error, memory was telling me that one
> could have further processing inside of xsl:text in xslt 2.0? I
> could swear I read something about that in first draft on spec, but
> just now in looking over spec for other stuff saw it did not apply.
You can -- the latest XSLT 2.0 WD shows xsl:text with the syntax:
<!-- Category: instruction -->
<xsl:text
disable-output-escaping = "yes" | "no">
<!-- Content: content-constructor -->
</xsl:text>
http://www.w3.org/TR/xslt20/#section-Creating-Text-Nodes-using-xsl:text
So what you had above was just fine, I think.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list