[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: An element's value is an invalid Unicode string ...how can

  • From: Michael Kay <mike@saxonica.com>
  • To: xml-dev@lists.xml.org
  • Date: Fri, 04 Jan 2013 23:51:55 +0000

Re:  An element's value is an invalid Unicode string ...how can
 >According to the book, Fonts & Encodings (p. 61, first paragraph): ... 
we select a substring that begins with a combining character, this new 
string will not be a valid string in Unicode.

Does the book say where it gets its definition of "valid string" from? 
I'm not aware that Unicode itself defines this term. In most definitions 
of string, a string is simply a sequence of characters, and there are no 
constraints on the characters that can be included.

W3C defined a concept of "fully normalized strings" [1], which must not 
begin with combining characters. But most libraries of operations on 
strings (and in particular, the XPath function library) make no attempt 
to ensure that all operations produce fully normalized strings; if they 
tried to do this, the resulting operations would be a lot more complex 
and a lot more expensive.

Of course, the concepts of characters and strings are very fuzzy around 
the edges. How many characters are there in the "ffi" ligature? Because 
the concepts are fuzzy, there have been debates for decades about 
whether an accented character is one character or two. Unicode, because 
it was the successful result of some major political compromises, says 
it can be either (there is a composed representation as one character, 
and a decomposed representation as two). Both forms have practical 
advantages and disadvantages; you have highlighted one of the well-known 
disadvantages of the "decomposed" representation.

Michael Kay
Saxonica

[1] http://www.w3.org/TR/charmod-norm/#sec-FullyNormalized





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.