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

Re: Your XML documents may use different sets of characters,de

  • From: David Carlisle <davidc@nag.co.uk>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Tue, 17 May 2011 15:12:24 +0100

Re:  Your XML documents may use different sets of characters
On 17/05/2011 14:45, Costello, Roger L. wrote:
> Hi David,
>
> So, you are saying that the "data" that I use in an XML document (as
> opposed to the "markup") can be anything that has a decimal or
> hexadecimal value, e.g.,
>
> &#xffde;
>

everything except unpaired surrogate codepoints and a few control
characters: you can't do &#8; in xml 1.0 (you can in xml 1.1 though)
the exact lists are in the spec, but the lists don't depend on unicode
versions.


> Suppose that I require,
>
> The value (i.e., "data") of the<foo>  element is zero or more
> characters from the Unicode Nd category.

that's an XSD question (I assume) not an XML one.

If you specify Nd you mean any decimal, that set will get larger
potentially as more scripts are added, which in any case where you want
"any decimal in any script" is probably a good thing. If you meant 0-9
it's better to use [0-9].

>
> What characters must be used in the<foo>  element?
>
>> From what you are saying, it depends entirely on the implementer.
>> If the implementer implements Unicode 2.0 then Nd may consist of
>> 600 characters. If the implementer implements Unicode 2.1 then Nd
>> may consist of 610 characters. And this is the case whether I'm
>> using XSLT, XML Schema, RELAX NG, etc. Right?
>

yes but I don't see an issue with it particularly or any way to avoid 
that kind of thing other than tell people they can not use their native 
language scripts even after those scripts have been added to Unicode
(which was essentially what xml 1.0 pre 5th edn did for element names).
That might have been acceptable for element names and other syntactic 
constructs but is never going to be acceptable for character data.

If you are writing a regexp pattern and need to worry about this then 
it's always possible to use explicit character ranges rather than using 
the named unicode categories. The main reason for using the categories 
is that they _do_ expand in culturally sensible ways as Unicode grows.

David

> /Roger
>

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________


[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.