OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] ignoring elements in certain namespace in schema?

[ Lists Home | Date Index | Thread Index ]

>  <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>





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS