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


Help: OASIS Mailing Lists Help | MarkMail Help



   Fine namespace control in XML Schema

[ Lists Home | Date Index | Thread Index ]

Is it possible to add elements to distinct namespaces in an
XMLSchema and sub-elements to the global namespace
(since contect will disambiguate these nicely)?

E.g. Consider the following XML document:

<example xmlns:a="http://www.example.com/a";

  <name> Spotted tree frog </name>
  <colour> Blue with red spots </colour>
  <leap> minimal </leap>

  <name> Cane toad </name>
  <poison> Nasty </poison>
  <fecundity> enormous </fecundity>

It satisfies the RELAX NG schema

<grammar xmlns="http://relaxng.org/ns/structure/1.0";

 <element name="example">
  <element name="a:frog"><ref name="frog"/></element>
  <element name="b:frog"><ref name="toad"/></element>

<define name="frog">
 <element name="name"> <text/> </element>
 <element name="colour"> <text/> </element>
 <element name="leap"> <text/> </element>

<define name="toad">
 <element name="name"> <text/> </element>
 <element name="poison"> <text/> </element>
 <element name="fecundity"> <text/> </element>


I can't figure out how to disambiguate the two frog
elements in XML Schema (using XML namespaces).
I have looked at `any' and `elementFormDefault',
but neither seems to provide sufficient specifity.

Is there another way?

[ If not, is this kind of functionality on the cards for
XML Schema 1.1? ]

Many thanks


Dr Daniel Prager
Research Fellow & Consultant
Deakin University & Freelance

Phone: +61 3 9251 7484
Web: www.deakin.edu.au/~danielp


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

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