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

Fine namespace control in XML Schema

  • To: xml-dev <xml-dev@l...>
  • Subject: Fine namespace control in XML Schema
  • From: Daniel Prager <danielp@d...>
  • Date: Thu, 11 Jul 2002 12:56:47 +1000
  • Organization: Deakin University

toad xml
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


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.
First Name
Last Name
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.