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

Creating library schemas which only expose a single document element

From: Fraser Crichton <fraser.crichton@solnetsolutions.co.nz>
Date: Mon, 23 May 2005 14:17:27 +1200
Message-ID: <42913D37.9030307@solnetsolutions.co.nz>
To: xmlschema-dev@w3.org
xsd document element
Hi,

This kind of a follow up to something I posted to XML-DEV /-//Validating 
against the correct root element using library schemas// 
/http://lists.xml.org/archives/xml-dev/200505/msg00263.html (BTW thanks, 
Michael and Henry, for getting back to me).

If I'm creating a set of library schemas where I want to enforce that 
particular document / message schemas are valid and that no fragments of 
documents are valid  it seems I have two approaches  -

1) I adopt a strict venetian blind approach i.e. there are no global 
element declarations in my library schemas and only a Russian doll 
approach in my message / document schemas to enforce that there is only 
one valid root element (however that way I can't create any reusable 
elements just reusable types).

2) I use xsd:group to hide my global elements but get reuse from them by 
referencing the groups.

I have a some questions -

Would the xsd:group approach just be a dirty hack?

Is there any reason why OASIS have not adopted xsd:group (sorry to keep 
banging on about OASIS but the New Zealand government are looking at a 
number of their standards ;-) )?

Cheers,

Fraser




Attention:
This email may contain information intended for the sole use of
the original recipient. Please respect this when sharing or
disclosing this email's contents with any third party. If you
believe you have received this email in error, please delete it
and notify the sender or postmaster@solnetsolutions.co.nz as
soon as possible. The content of this email does not necessarily
reflect the views of SolNet Solutions Ltd.
Received on Monday, 23 May 2005 02:08:38 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.