|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Fine namespace control in XML Schema
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" xmlns:b="http://www.example.com/b"> <a:frog> <name> Spotted tree frog </name> <colour> Blue with red spots </colour> <leap> minimal </leap> </a:frog> <b:frog> <name> Cane toad </name> <poison> Nasty </poison> <fecundity> enormous </fecundity> </b:frog> </example> ---------------------------------------------------------------- It satisfies the RELAX NG schema ---------------------------------------------------------------- <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://www.example.com/a" xmlns:b="http://www.example.com/b"> <start> <element name="example"> <element name="a:frog"><ref name="frog"/></element> <element name="b:frog"><ref name="toad"/></element> </element> </start> <define name="frog"> <element name="name"> <text/> </element> <element name="colour"> <text/> </element> <element name="leap"> <text/> </element> </define> <define name="toad"> <element name="name"> <text/> </element> <element name="poison"> <text/> </element> <element name="fecundity"> <text/> </element> </define> </grammar> ---------------------------------------------------------------- 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 Daniel -- Dr Daniel Prager Research Fellow & Consultant Deakin University & Freelance Phone: +61 3 9251 7484 Web: www.deakin.edu.au/~danielp
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








