Re: what is the meaning of elementFormDefault="qualified" in a
thanks, I keep falling afoul of this, I guess I've spent too long with Venetian blind and Salami slice schemas to consider any other design pattern. I swear I had the same problem looking at some schemas about this same time last year, and then totally blocked the solution out of my mind. Cheers, Bryan Rasmussen On 5/3/07, George Cristian Bina <george@o...> wrote: > Hi Bryan, > > The target namespace for that schema is absent. If you include the > schema from another one that has a target namespace then the components > from that schema will have that target namespace (I believe this is > called chameleon schema). > See an example below: > > test.xsd > > <?xml version="1.0" encoding="UTF-8"?> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > targetNamespace="http://example.com"> > <xs:include schemaLocation="common.xsd"/> > </xs:schema> > > common.xsd > > <?xml version="1.0" encoding="UTF-8"?> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > elementFormDefault="qualified"> > <xs:element name="test"> > <xs:complexType> > <xs:sequence> > <xs:element name="a"/> > <xs:element name="b"/> > </xs:sequence> > </xs:complexType> > </xs:element> > </xs:schema> > > The following instance is valid against test.xsd > > <?xml version="1.0" encoding="UTF-8"?> > <test xmlns="http://example.com" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://example.com test.xsd"> > <a></a> > <b></b> > </test> > > Best Regards, > George > --------------------------------------------------------------------- > George Cristian Bina - http://aboutxml.blogspot.com/ > <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger > http://www.oxygenxml.com > > > bryan rasmussen wrote: > > Hi, > > As per the subject line. > > > > I am looking over a rather big application with some XML schemas in > > which elementFormDefault is always given as qualified but there is no > > targetNamespace. This strikes me as weird because the implication is > > that one would have instances like this > > > > <t:test xmlns:t="" xsi:schemaLocation="myschema.xsd" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> > > > > which by my understanding would be very illegal. > > > > Cheers, > > Bryan Rasmussen > > > > _______________________________________________________________________ > > > > XML-DEV is a publicly archived, unmoderated list hosted by OASIS > > to support XML implementation and development. To minimize > > spam in the archives, you must subscribe before posting. > > > > [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ > > Or unsubscribe: xml-dev-unsubscribe@l... > > subscribe: xml-dev-subscribe@l... > > List archive: http://lists.xml.org/archives/xml-dev/ > > List Guidelines: http://www.oasis-open.org/maillists/guidelines.php > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
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