W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2008

Schema that mandates elements and attributes from disparate namespaces?

From: Gavin Kistner <phrogz@mac.com>
Date: Thu, 13 Mar 2008 20:01:55 -0600
Message-Id: <17684271-4CD9-4BE0-88D4-47C228E13827@mac.com>
To: xmlschema-dev@w3.org

How can I write a schema that requires an XML file to have a structure  
like the following?

   <root xmlns:foo="http://foo.com" xmlns:bar="http://bar.com">
     <alpha>This is in the default namespace</alpha>
     <bravo foo:msg="This namespaced attribute is required on bravo  
elements." >
       <bar:charlie>This namespaced element is required as a child of  

What I'm trying to do is create a specific derivation of SVG, that  
allows certain namespaced elements and attributes in specific  
locations. I don't want to just extend SVG to allow various non- 
namespaced attributes and elements; I want to require those specific  
namespaced items.

Thanks in advance!
Received on Friday, 14 March 2008 07:51:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:46 UTC