[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: Boris Kolpackov <boris@codesynthesis.com>
Date: Wed, 12 Oct 2005 15:50:19 +0200
To: "Solmaz, Metin" <Metin.Solmaz@solcorp.com>
Cc: xmlschema-dev@w3.org
Message-ID: <20051012135019.GA28475@karelia>
any element attributes
Solmaz, Metin <Metin.Solmaz@solcorp.com> writes:

> ----------------------
> <xs:group name="myRootChild">
>     <xs:sequence>
>       <xs:any processContents="skip"/>
>     </xs:sequence>
> </xs:group>
> ----------------------
>
> 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?

xs:any means "any element" so there is no way to do what you want inside
xs:any. You can write something like this, however:

<xs:group name="myRootChild">
  <xs:sequence>
    <xs:element name="specific-element-1" ... />
    <xs:any processContents="skip"/>
  </xs:sequence>
  <xs:attribute name="specific-attribute-1" ... />
</xs:group>


hth,
-boris

Received on Wednesday, 12 October 2005 13:55:24 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.