XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
JJJ JJJSubject: Does XSD change the XML document
Author: JJJ JJJ
Date: 28 Oct 2005 10:47 AM
In a XSD, there is the option to have a string data type of token, which removes leading and trailing spaces, multiple space, etc.

My question is does this actually change the XML file at all and if not, what is the point of the data type?

If you wanted to remove whitespace from the XML file, would an XSLT be better ?

Thanks.

Postnext
(Deleted User) Subject: Does XSD change the XML document
Author: (Deleted User)
Date: 28 Oct 2005 11:44 AM
XSD is not about changing XML file - it is about validating XML file
using XSD rules. So, if you have your XML data that does not match XSD
definition you will get validation error - it will not change XML for you.

If you do want to generate new changed XML from the given one you can use XSLT or XQuery.

Hope this will help

Posttop
(Deleted User) Subject: Does XSD change the XML document
Author: (Deleted User)
Date: 02 Nov 2005 09:17 AM
> What is the point of the token data type?

The xs:token permits data in the .xml file to contain leading and trailing whitespace. For example, if you defined a datatype to be an enumeration allowing the values “A”, “B”, and “C” and your base data type was xs:string, then “A” would be a valid value, but “ A “ would not. If, however, your base data type is xs:token, then “ A “ would be a valid value.



 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

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