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 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Richard SuggsSubject: Validating different sets of required attributes in an XML schema.
Author: Richard Suggs
Date: 29 Oct 2010 09:55 AM
My requirement is to validate an xml with two different validation strategies. In strategy 1, the xml is required to have instances of an element with certain required attributes. In strategy 2, the xml is required to have instances of the same element with different required attributes. So, the idea is that there are two different sets of the same element with different set of required attributes for each set. Is there a way to validate this with using only one xsd. My only solution so far is to use two different xsd files to validate. Thank you.

Posttop
Ivan PedruzziSubject: Validating different sets of required attributes in an XML schema.
Author: Ivan Pedruzzi
Date: 01 Nov 2010 11:22 PM
Hi Richard,

XSD doesn't allow to express such construct.

What is the discriminant that determines which content model to use?

If what you are trying to validate is relatively simple I would use XQuery or XSLT to assert XPath expressions.

Ivan

 
Topic Page 1 2 3 4 5 6 7 8 9 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.