XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] 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@myrio.com>:

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


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS