OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: RE: [xml-dev] Quick, Easy Namespace Question

[ Lists Home | Date Index | Thread Index ]
  • To: "CHIUSANO, Joseph" <JCHIUSANO@lmi.org>,<xml-dev@lists.xml.org>
  • Subject: RE: RE: [xml-dev] Quick, Easy Namespace Question
  • From: "Dare Obasanjo" <dareo@microsoft.com>
  • Date: Mon, 5 Aug 2002 13:38:19 -0700
  • Thread-index: AcI8vrqmYnmgaA8UQuOX+Q+cWtmGjQAADM0A
  • Thread-topic: RE: [xml-dev] Quick, Easy Namespace Question

Title: Message
elementFormDefault is what controls whether local elements belong to the target namespace or not. This is orthogonal to whether they are locally or globally declared elements. More information about this available in the W3C XML Schema Primer at http://www.w3.org/TR/xmlschema-0/#QualLocals 
 
PS: Coincidentally this is close to the topic of the Extreme XML column I am writing for this month. :)

--
PITHY WORDS OF WISDOM
A man who can smile when everything has gone wrong has probably thought of who he can blame it on.  

This posting is provided "AS IS" with no warranties, and confers no rights.

-----Original Message-----
From: CHIUSANO, Joseph [mailto:JCHIUSANO@lmi.org]
Sent: Monday, August 05, 2002 1:28 PM
To: xml-dev@lists.xml.org
Subject: RE: RE: [xml-dev] Quick, Easy Namespace Question

Oh, I'm still a bit confused (must be the extreme heat here in Washington DC!)....Since the second declaration of "MyElement1" does not belong to the target namespace (or any namespace for that matter), it cannot be namespace-qualified in the XML instance document.  Does this mean that in order to satisfy the elementFormDefault of "qualified", I have to declare a second namespace in the schema and assign the second declaration of "MyElement1" to that namespace (then declare a prefix for it in the instance document and prefix the second declaration of "MyElement1" accordingly)?
 
TIA,
Joe Chiusano
LMI
 
**************************************************************************
  Joseph M. Chiusano
  Logistics Management Institute
  2000 Corporate Ridge
  McLean, VA 22102
  Email: jchiusano@lmi.org
  Tel: 571.633.7722
**************************************************************************
-----Original Message-----
From: Dare Obasanjo [mailto:dareo@microsoft.com]
Sent: Monday, August 05, 2002 3:46 PM
To: CHIUSANO, Joseph; xml-dev@lists.xml.org
Subject: RE: [xml-dev] Quick, Easy Namespace Question

elementFormDefault set to qualified means ALL elements in your instance document should be qualified. Qualification in this case means "have a namespace name, specifically the target namespace" NOT "have a prefix".
 

--
PITHY WORDS OF WISDOM
A man who can smile when everything has gone wrong has probably thought of who he can blame it on.  

This posting is provided "AS IS" with no warranties, and confers no rights.

-----Original Message-----
From: CHIUSANO, Joseph [mailto:JCHIUSANO@lmi.org]
Sent: Monday, August 05, 2002 12:33 PM
To: xml-dev@lists.xml.org
Subject: [xml-dev] Quick, Easy Namespace Question

I thought I had all of this namespace stuff down pat...then I tried something new.

I'm not sure if it's my schema/XML document or the tool that's the problem.

Here's what I've done in the schema:

(1) I have declared a target namespace with a namespace prefix ("abc" for our purposes here)

(2) I have a global declaration of an element "MyElement1", which is a complex type

(3) I also have a local declaration of "MyElement1", because this second declaration has a different set of subelements; in the local declaration, I have not namespace-qualified the element name as it would clash with the global declaration.  This is the only local element in the schema.

(4) I've set elementFormDefault to "qualified"

I realized that I could not have a default namespace in the XML instance document, because the XML processor would consider both "MyELement1" elements as belonging to the same target namespace, and an error would result due to the clash in declarations.  Therefore, in the XML instance document, I have namespace-prefixed all elements _except the locally declared "MyElement1"_.

The tool I am using doesn't like this - is there something that I'm not seeing?

TIA,
Joe Chiusano
LMI

**************************************************************************
  Joseph M. Chiusano
  Logistics Management Institute
  2000 Corporate Ridge
  McLean, VA 22102
  Email: jchiusano@lmi.org
  Tel: 571.633.7722
**************************************************************************






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS