XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] xslt string units

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&#x10000;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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS