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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> + Round-trip Converting; CSV-XML... (2)
-> + XSL error function call PHP (8)
-> + WYSIWYG XSLT Designer (5)
-> + generate xhtml+css from xml re... (2)
-> + generate xhtml+css from xml re... (3)
-> + generate xhtml+css from xml re... (2)
-> - Help using xsd xs:redefine nee... (1)
-> + Data loss opening External sch... (2)
-> + Install Apache FOP Plugin with... (8)
-> + Generating a Publisher Canvas ... (2)
-> + Stylus Studio comment block no... (3)
-> + Report Designer Screen Repaint... (5)
-> - validating on values (5)
-> ->validating on values
-> ->validating on values
-> ->validating on values
-> ->validating on values
-> + reuse of xslt (2)
-> + The evaluation period for the ... (2)
-> + export to documentation (3)
-> + Validating XML files using sev... (2)
-> + Missing 'Command' Tab in Custo... (3)
-> + Do I have to download new vers... (6)
-> + Can SS validate tags used in a... (5)
-- Previous [1561-1580] [1581-1600] [1601-1620] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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
(Deleted User) Subject: validating on values
Author: (Deleted User)
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
(Deleted User) Subject: validating on values
Author: (Deleted User)
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

   
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.