[Home] [By Thread] [By Date] [Recent Entries]

  • To: 'Rick Jelliffe' <ricko@a...>, xml-dev@l...
  • Subject: RE: ignoring elements in certain namespace in schema?
  • From: Jeff Lowery <jlowery@s...>
  • Date: Wed, 30 Jan 2002 11:54:45 -0800

>  <any namespace="#other" maxOccurs="unbounded" minOccurs="0" 

Should be ##other, BTW.

More specifically, you could declare the namespace foo instead of ##other,
as so:

<complexType name="someName">
  <sequence>
     <any namespace="foo" maxOccurs="unbounded" minOccurs="0" 
        processContents="lax"/> <!-- or "skip" if you want no validation on
the content -->
  </sequence>
</complexType>

> See http://www.w3.org/TR/xmlschema-1/#Wildcards
> 
> An W3C XML Schema schema  is closed by default. 

The content that the XML Schema *describes* is closed by default (sorry to
get picky here, Rick). The schema document itself is laxly validated; i.e.,
you can add attributes with names from other namespaces in your schema
definition without a complaint from an XML Schema validation engine:

<complexType name="someName" x:myName="Jeff">
  <sequence>
     <any namespace="foo" maxOccurs="unbounded" minOccurs="0" 
        processContents="lax"/> <!-- or "skip" if you want no validation on
the content -->
  </sequence>
</complexType>


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member