- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
 - Date: Tue, 04 Nov 2003 20:36:21 +0000
 - To: "Durk Strooisma" <durk@kern.nl>
 - Cc: <xmlschema-dev@w3.org>
 
You went _way_ down a blind irrelevant alley -- I recommend you check
the XML Schema Primer, particularly section 3 [1] for an introduction
to the impact of local element declarations (such as the one for Elem
below).
The special function of http://www.w3.org/2001/XMLSchema-instance
inheres _only_ in _that_ namespace, and you never need to load or
access any schema document for that namespace.
The following two files are all you need.
Testinput.xml
<?xml version="1.0" encoding="UTF-8"?>
<t:Test
  xmlns:t="http://localhost/Schemas/Test"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation=
                     "
                      http://localhost/Schemas/Test
                      Test.xsd
                     "
>
  <Elem>bla</Elem>
</t:Test>
Test.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://localhost/Schemas/Test"
  xmlns="http://localhost/Schemas/Test"
>
  <xsd:complexType name="TestType">
    <xsd:sequence>
      <xsd:element name="Elem"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:element name="Test" type="TestType"></xsd:element>
</xsd:schema>
[1] http://www.w3.org/TR/xmlschema-0/#NS
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Tuesday, 4 November 2003 15:36:23 UTC