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

Re: how to restrict validation to part of the W3C schema?

From: Pete Cordell <petexmldev@codalogic.com>
Date: Thu, 7 Feb 2008 10:22:11 -0000
Message-ID: <005501c86973$509840d0$fc00a8c0@Codalogic>
To: "dave" <ceek63@yahoo.com>, <user@xmlbeans.apache.org>
Cc: <xmlschema-dev@w3.org>
Re: how to restrict validation to part of the W3C schema?

Original Message From: "dave"

> I would like to restrict the validation only to part
> of my XML schema. I do not want to validate anything
> under certain Element, say 'noValidation'. This
> element in turn contains an XML(which is WellFormed
> but not Valid) for which there is no schema for
> whatever reason. But I would want to parse the XML
> under 'noValidation' element.
>
> Here're my questions:
> 1. How would I specify in the Schema that
> 'noValidation' element should not get validated? Is
> using ANY a valid use case in this situation although
> it's not used for Schema extension purpose here? CDATA
> may not be a good choice because I would NOT be able
> to parse anything under 'noValidation'.

>From an XSD point of view, xs:any should be fine, perhaps nested within an 
element.  e.g.

<xs:element name='nonValidated'>
    <xs:complexType><xs:sequence>
        <xs:any namespace='##any' processContents='skip'
            minOccurs/maxOccurs etc. />
    </xs:sequence>...

The fact that it is not being used as an extension is not an issue.  For 
example, one use-case of this sort of thing is including chunks of XHTML 
within an XML file.

HTH,

Pete Cordell
Codalogic
Visit http://www.codalogic.com/lmx/ for XML C++ data binding
Received on Thursday, 7 February 2008 10:22:43 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.