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

Re: Issue with repeating tags using substitution groups

From: Boris Kolpackov <boris@codesynthesis.com>
Date: Mon, 7 Apr 2008 10:15:10 +0200
To: David Broker <davidb@warpedweb.net>
Cc: xmlschema-dev@w3.org
Message-ID: <20080407081510.GA20926@karelia>
Re: Issue with repeating tags using substitution groups

Hi David,

David Broker <davidb@warpedweb.net> writes:

> My problem is how to get the "DataBlock" tags to only repeat once.
> The above workds fine execpt that the tags can be repeated. I have tried
> combinations of xs:choice, xs:all and xs:group but I cannot get it to work.

One trick in your particular setup would be to have an attribute with
default but different value for each 'data*' type. Then you can use the
xsd:unique mechanism to make sure only one instance of each value is
encountered in the 'letter' scope. The diagnostics won't be very user-
friendly though.

Boris

-- 
Boris Kolpackov, Code Synthesis Tools
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde
Received on Monday, 7 April 2008 08:36:19 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.