Thanks a lot for your help, in fact I've already found that out.
"Zafar Abbas" <someone@somewhere.com> wrote in message
news:%23EbAArulFHA.1464@TK2MSFTNGP14.phx.gbl...
> Substitution groups across namespace did not work correctly in .net
> framework 1.1. This works correctly in .net framework 2.0 beta2.
>
> "Michael Skulsky" <syrinx@nm.ru> wrote in message
> news:uHKs24nkFHA.2852@TK2MSFTNGP14.phx.gbl...
>> Hi all,
>>
>> I've got the following validation problem. There are 2 schemas and a
>> document:
>>
>> -----------------------------------------------------------------
>> bar.xsd
>> ======
>> <?xml version="1.0" encoding="UTF-8"?>
>> <schema xmlns:bar="urn:bar" targetNamespace="urn:bar"
>> xmlns="
http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
>> attributeFormDefault="unqualified">
>>
>> <element name="test">
>> <complexType>
>> <sequence>
>> <element name="qwe"/>
>> <element ref="bar:asd"/>
>> </sequence>
>> </complexType>
>> </element>
>>
>> <element name="asd" abstract="true"/>
>> </schema>
>>
>> foo.xsd
>> =====
>> <?xml version="1.0" encoding="UTF-8"?>
>> <schema xmlns:bar="urn:bar" xmlns:foo="urn:foo"
>> xmlns="
http://www.w3.org/2001/XMLSchema" targetNamespace="urn:foo"
>> elementFormDefault="qualified" attributeFormDefault="unqualified">
>>
>> <import namespace="urn:bar" schemaLocation="bar.xsd"/>
>>
>> <element name="foo_asd" substitutionGroup="bar:asd"/>
>> </schema>
>>
>>
>> test.xml
>> ======
>> <?xml version="1.0" encoding="UTF-8"?>
>> <test xmlns="urn:bar" xmlns:foo="urn:foo"
>> xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="urn:foo foo.xsd urn:bar bar.xsd">
>>
>> <qwe/>
>> <foo:foo_asd/>
>>
>> </test>
>> -----------------------------------------------------------------
>>
>> The idea is that bar:asd is declared as abstract, and is substituted with
>> foo:foo_asd. All this validates perfectly in XML Spy and in any version
>> of
>> MSXML, but the .NET parser comlains in the following way : The element
>> 'urn:bar:test' has invalid child element 'urn:foo:foo_asd'. Expected
>> 'urn:bar:asd'. An error occurred at , (5, 3).
>>
>> It is obvious that we can't really have bar:asd, because it is abstract.
>> Does anybody have a clue what might be missing?
>> Thanks a lot in advance for any help!
>>
>> Michael
>>
>>
>
>