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

Re: RELAX NG equivalent of <xsd:any processContents="lax">?

  • From: "Radu Cernuta" <radu.cernuta@g...>
  • To: "Jeff Lowery" <jlowery@m...>
  • Date: Tue, 6 Feb 2007 23:43:43 +0100

Re:  RELAX NG equivalent of <xsd:any processContents="lax">?
<?xml version="1.0"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
    <start>
        <ref name="rootElement"></ref>
    </start>
   
    <define name="rootElement">
        <element>
            <anyName>
                <except>
                    <name>interestingElement1</name>
                    <name>interestingElement2</name>
                    ....
                </except>                   
            </anyName>
            <ref name="children"></ref>
        </element>
    </define>
....

Life is made of choices. Sometimes you just got to cut the knot.

Of course, you can also cut is differently and move to XML Schema, where you don't have the flexibility of the <exclude> for namespaces, but you can rely on xsi:schemaLocation attributes in the instance documents(and on the users that to place them there correctly) or on schemas placed so that they can be found using the namespace URI.

Greetings,
Radu Cernuta

2007/2/6, Jeff Lowery <jlowery@m...>:

<?xml version="1.0"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
    <start>
        <ref name="rootElement"></ref>
    </start>
   
    <define name="rootElement">
        <element>
            <anyName>
                <except>
                    <nsName ns="http://interestingElements.com"></nsName>
                </except>                   
            </anyName>
            <ref name="children"></ref>
        </element>
    </define>

…

 

Aside from this example, how would this approach work for interesting elements that are in the same namespace as the base schema?

 

 




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2013 All Rights Reserved.