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

RE: Any element with specific attributes and children

From: Michael Kay <mike@saxonica.com>
Date: Wed, 12 Oct 2005 08:59:50 +0100
To: "'Solmaz, Metin'" <Metin.Solmaz@solcorp.com>, <xmlschema-dev@w3.org>
Message-ID: <E1EPbWs-0003gi-9i@lisa.w3.org>
attributes of children
I am unable to specify that the <any> element must contain certain specific
attributes (attr1 and attr2) and certain children (Specific). Is this
possible at all in XML Schema? 
 
 
No, "any" means what it says. The only thing you can constrain is the
namespace.
 
You could use an abstract element in this position that requires the
specific attributes and children; the position could then contain any
element that's defined to be in the substitution group of this abstract
element. This allows a finite set of element names, there is no way of
permitting any element name.
 
Michael Kay
http://www.saxonica.com/ 

 
Received on Wednesday, 12 October 2005 08:00:08 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.