hello, i've wasted a whole day for this, can't find the solution.
i have the following main schema:
="1.0"="utf-8"
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Users">
<xs:complexType>
<xs:attribute name="FirstName" type="xs:string" use="optional" />
<xs:anyAttribute namespace="http://www.w3.org/2001/AppLog"/>
</xs:complexType>
</xs:element>
</xs:schema>
i want to use the "anyAttribute" to get an attribute from a specific schema, so i declared this secondary schema:
="1.0"="utf-8"
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3.org/2001/AppLog">
<xs:attribute name="SystemUsers" type="xs:string" default="abc"/>
</xs:schema>
then, i tried to validate the schema against this xml:
<br />
<Users UserPreferencesSafe=""abcd"" SystemUsers=""abc""/><br />
i do it with adding the 2 schemas to the schema set (XMLSchemaSet.Add),
then i use the XMLDocument.Validate with this schema set.
i get:
The validation raised a error:The 'SystemUsers' attribute is not allowed.
by the way, if i use anyAttribute namespace="##any", and add the 2 schemas it works. but i need to be specific.
what am i missing?
thanks.