Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] what is the meaning of elementFormDefault="qualified" in a schema without a targetnamespace?

From: "bryan rasmussen" <rasmussen.bryan@-----.--->
To: "Paul Spencer" <xml-dev-list@--------.--.-->
Date: 5/10/2007 10:49:00 PM
Nope. Actually I had considered that the solution of it being a
Chameleon schema was the correct one but having delved further into
the whole product it seems the top level schemas are also without a
namespace however the elementFormDefault for them is unqualified.

I guess that is a chameleon schema in a way, except without any
particular good reason for why it is that way.

Ah well. It is all too painful.

Cheers,
Bryan Rasmussen



On 5/10/07, Paul Spencer <xml-dev-list@b...> wrote:
> Or could it simply be that the tool used for development includes the
> elementFormDefault="qualified" by default and it was just left in?
>
> Paul
>
> > -----Original Message-----
> > From: bryan rasmussen [mailto:rasmussen.bryan@g...]
> > Sent: 03 May 2007 14:27
> > To: George Cristian Bina
> > Cc: XML Developers List
> > Subject: Re: [xml-dev] what is the meaning of
> > elementFormDefault="qualified" in a schema without a targetnamespace?
> >
> >
> > 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
> > > www.---.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
> > > >
> > >
> >
> > _______________________________________________________________________
> >
> > 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
> >
>
>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent