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
David WesselsSubject: validating on values
Author: David Wessels
Date: 03 Jul 2007 04:56 AM
Dear sir/madam,

I would like include certain values in my validation.
For example:
<Product>
<Name type="Text" value="TestProduct">
</Name>
</Product>

Here I would like to include wether the type is "Text" in my validation.
Is this possible? If so, how?

Thank you in advance,
David

Postnext
Alberto MassariSubject: validating on values
Author: Alberto Massari
Date: 03 Jul 2007 06:58 AM
Hi David,
you need to create a new simple type derived by restriction from xs:string, and having a number of enumeration values ("Text", and so on)

Hope this helps,
Alberto

Postnext
David WesselsSubject: validating on values
Author: David Wessels
Date: 17 Jul 2007 11:06 AM
Dear Alberto,

Thank you very much for your help. This works. But....

Would you know if it is possible to define those simple types so that if I generate a schema from xml the types will be those new types instead of xs:NCName and xs:integer?

It would save a lot of time.

Regards,
David

Postnext
David WesselsSubject: validating on values
Author: David Wessels
Date: 17 Jul 2007 11:08 AM
Dear Alberto,

Thank you very much for your help. This works. But....

Would you know if it is possible to define those simple types so that if I generate a schema from xml the types will be those new types instead of xs:NCName and xs:integer?

It would save a lot of time.

Regards,
David

Posttop
Alberto MassariSubject: validating on values
Author: Alberto Massari
Date: 18 Jul 2007 11:32 AM
Hi David,
unfortunately the code that generates an XMLSchema from an XML only uses the standard XMLSchema datatypes, and cannot be extended with user-defined types.

Sorry,
Alberto

 
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.