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

Re: Namespace: what's the correct usage?

  • From: Jeni Tennison <mail@j...>
  • To: Jonathan Borden <jborden@m...>
  • Date: Sun, 20 May 2001 08:11:47 +0100

define target namespace
Hi Jonathan,

> Martin Gudgin wrote:
>> [MJG]
>> The piece you are missing is that the default value of
>> elementFormDefault is 'unqualified'
>
> I didn't miss that. What I don't understand is how this value would
> be _different_ for the "person" and "given" element decls given the
> definition in the rec. i.e. none of the elements should be
> qualified. that's ok by me, all I am saying is that they should all
> be in the same namespace (and I am considering elements in no
> namespace to be in the 'same' namespace).

In XML Schema, the target namespace for elements declared as direct
children of the schema element (global declarations) is defined
differently than it is for elements declared further down (local
declarations).  The rec says:

  "If the <element> element information item has <schema> as its
  parent, the corresponding schema component is as follows:
  ...
  {target namespace}
  The ·actual value· of the targetNamespace [attribute] of the parent
  <schema> element information item, or ·absent· if there is none."

So global element declarations hook directly into the targetNamespace
for the schema, while the target namespace of local element
declarations is conditional on the 'form' attribute or
'elementFormDefault' attribute.

(Note that there's a mistake in the definition of target namespace for
locally scoped elements - it refers to a 'parent <schema> element'
when it means the 'ancestor <schema> element'.)

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



PURCHASE STYLUS STUDIO ONLINE TODAY!

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