K
Koen De Wolf
Dear all,
I have the following problem
In a schema I refer to a type in a different schema like this:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified"
targetNamespace="http://www.example.com" xmlns:test="test">
<xs:import namespace="test" schemaLocation="test.xsd"/>
<xs:element name="test">
<xs:complexType>
<xs:sequence>
<xs:element name="IncludedElement" type="test:TestType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
What I want to achieve is the following:
<?xml version="1.0" encoding="UTF-8"?>
<test xmlns="http://www.example.com" xmlns:test="test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="test test.xsd">
<test:IncludedElement>
<test:SomeElements/>
<test:IncludedElement/>
</test:IncludedElement>
</test>
But this is what I get
<?xml version="1.0" encoding="UTF-8"?>
<test xmlns="http://www.example.com" xmlns:test="test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="test test.xsd">
<IncludedElement>
<test:SomeElements/>
<test:IncludedElement/>
</IncludedElement>
</test>
Using the schema above, the SomeElements and the nested IncludeElement are
of the correct namespace (test), But the "containing" IncludeElement is not
I know a reference to that element instead of to that type will do the
trick, but the schema I am refering to only has only 1 global element, an I
am not able to change that schema.
Can someone help me out?
Many thanks,
Koen
I have the following problem
In a schema I refer to a type in a different schema like this:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified"
targetNamespace="http://www.example.com" xmlns:test="test">
<xs:import namespace="test" schemaLocation="test.xsd"/>
<xs:element name="test">
<xs:complexType>
<xs:sequence>
<xs:element name="IncludedElement" type="test:TestType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
What I want to achieve is the following:
<?xml version="1.0" encoding="UTF-8"?>
<test xmlns="http://www.example.com" xmlns:test="test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="test test.xsd">
<test:IncludedElement>
<test:SomeElements/>
<test:IncludedElement/>
</test:IncludedElement>
</test>
But this is what I get
<?xml version="1.0" encoding="UTF-8"?>
<test xmlns="http://www.example.com" xmlns:test="test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="test test.xsd">
<IncludedElement>
<test:SomeElements/>
<test:IncludedElement/>
</IncludedElement>
</test>
Using the schema above, the SomeElements and the nested IncludeElement are
of the correct namespace (test), But the "containing" IncludeElement is not
I know a reference to that element instead of to that type will do the
trick, but the schema I am refering to only has only 1 global element, an I
am not able to change that schema.
Can someone help me out?
Many thanks,
Koen