[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] what is the meaning of elementFormDefault="qualified" in a schema without a targetnamespace?
- From: "bryan rasmussen" <rasmussen.bryan@gmail.com>
- To: "Paul Spencer" <xml-dev-list@boynings.co.uk>
- Date: Fri, 11 May 2007 00:48:37 +0200
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@boynings.co.uk> 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@gmail.com]
> > 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@oxygenxml.com> 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@lists.xml.org
> > > > subscribe: xml-dev-subscribe@lists.xml.org
> > > > 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@lists.xml.org
> > subscribe: xml-dev-subscribe@lists.xml.org
> > 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]