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

RE: suitable data type to store patterns..

From: Michael Kay <mike@saxonica.com>
Date: Thu, 10 Jan 2008 17:57:53 -0000
To: "'dave'" <ceek63@yahoo.com>, <xmlschema-dev@w3.org>
Message-ID: <013401c853b2$53645eb0$a500a8c0@turtle>
RE: suitable data type to store patterns..

> I need to store some pattern values such as "[/<*ab^&[[1"  
> (excluding quotes) in XML. What would be the data type for an 
> element which would store such values as is?

xs:string. Of course, if there are any restrictions on the characters that
may appear, then you can use a type derived form xs:string by restriction.
But you haven't mentioned any such restrictions.

Of course, special characters such as "<" and "&" will have to be escaped as
in any well-formed XML document. The schema type doesn't affect that.
> 
> So that when I parse this element, I should be able to get 
> the raw value as is. 

> I guess I am referring to any Entity 
> translations occurring in this context.

I think this sentence may be the key to understanding your question, but I
really don't know what you mean by it. Schema validation is applied to the
content of elements and attribute after entity references have been
expanded. There is no way in the schema of constraining whether and where
entities can be used.

Michael Kay
http://www.saxonica.com/
Received on Thursday, 10 January 2008 17:58:07 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.