W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2002

Nested imports and namespaces - which parser is correct?

From: <bibhaker.saran@txu.com.au>
Date: Wed, 30 Oct 2002 09:53:20 +1100
To: xmlschema-dev@w3.org
Message-ID: <OFC953E48E.B0996A23-ONCA256C61.007C4BF9@txu.com.au>

Hi All,
I have a set of schema defining namespaces A, B, & C, where A imports B &
C, and C imports B.

The following is valid using XMLSpy v5: note the prefix used for EngineNo
data element (highlighted in bold)

<?xml version="1.0" encoding="UTF-8"?>
<a:Wrapper xmlns:a="Test:A" xmlns:b="Test:B" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="Test:A ..
\Test\A.xsd">
  <Transactions>
    <UseEngineRequest transactionID="FORD-46735" transactionDate="
2002-01-01T12:00:00+10:00" xsi:type="b:PetrolEngineType" version="1.0">
      <b:EngineNo>2456765432</b:EngineNo>
    </UseEngineRequest>
  </Transactions>
</a:Wrapper>

The MSXML4 SP1 parser validates the following (no namespace prefix)

<?xml version="1.0" encoding="UTF-8"?>
<a:Wrapper xmlns:a="Test:A" xmlns:b="Test:B" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="Test:A ..
\Test\A.xsd">
  <Transactions>
    <UseEngineRequest transactionID="FORD-46735" transactionDate="
2002-01-01T12:00:00+10:00" xsi:type="b:PetrolEngineType" version="1.0">
      <EngineNo>2456765432</EngineNo>
    </UseEngineRequest>
  </Transactions>
</a:Wrapper>

Q. Given that all schemas have elementFormDefault and attributeFormDefault
values of "unqualified". Which one is correct?

Thanks
Bibhakar Saran
_________________________
B2B Technical Architect
TXU IT Architecture & Planning
Level 15 452 Flinders St, Melbourne
Phone : (+61 3) 9229 6151
Mobile: 0411 203036
Email: bibhaker.saran@txu.com.au



**********************************************************************************************
This email and any files transmitted with it may be confidential and are intended
solely for the use of the individual or entity to whom they are addressed. Any
confidentiality is not waived or lost because this email has been sent to you by
mistake. This email may contain personal information of individuals, and be 
subject to Commonwealth and/or State privacy laws in Australia. This email
is also subject to copyright. If you are not the intended recipient, you must not
 read, print, store, copy, forward  or use this email for any reason, in accordance
 with privacy and copyright laws. If you have received this email in error, please
notify the sender by return email, and delete this email from your inbox.
************************************************************************************TXUAU
Received on Tuesday, 29 October 2002 17:53:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT