[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] xslt string units
- From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
- To: xml-dev <xml-dev@lists.xml.org>
- Date: Thu, 12 Mar 2009 17:44:56 -0400
At 2009-03-12 22:35 +0100, Vincent De Groote wrote:
>Does the string functions (string-length,
>substring, ... ) work with Unicode character
>units, or the implementation code point units ?
Character points ... just give it a try:
T:\ftemp>type vincent.xsl
<?xml version="1.0" encoding="US-ASCII"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:value-of select="string-length('abc𐀀def')"/>
</xsl:template>
</xsl:stylesheet>
T:\ftemp>xslt2 vincent.xsl vincent.xsl
7
T:\ftemp>
>If they count as implementation code point
>units, does it have a fixed type (like utf16)
>? Or is it implementation dependant ?
>
>In other words, does the Unicode characters
>above or equal 0x10000 count as 1 or 2 xslt string characters ?
One.
I hope this helps.
. . . . . . . . Ken
--
XQuery/XSLT training in Prague, CZ 2009-03 http://www.xmlprague.cz
XQuery/XSLT/XSL-FO training in Los Angeles (New dates!) 2009-06-08
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/x/
Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/x/bc
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]