Lists Home |
Date Index |
Henry, Priscilla, and David,
Thanks for your valuable tips! Although I haven't used Relax NG so far,
David, it does look tempting...
However, I still have a problem with making my example validate in XML Spy,
and I'm beginning to fear that it is something with my set up of XML Spy (or
incorrect interpretation of the standards by the software, heaven forbid ;)
rather than errors in XML. Can you help me in understanding where my problem
XML Spy says: "Mandatory element 'b1' expected in place of 'b:b1'", and I
suppose it would react similarly on 'c:c1' as well. When I receved this
error message before, I assumed that I had got something wrong with the use
of the namespaces, and that was one reason for asking the first question.
But even with your help, it does give me the same error message... And I'm
sure my other problems (with nesting of namespaces etc) stems from the same
thing as this.
By the way, I had to include the 'xsi' namespace attribute in the document
as well, otherwise I got an error for "unexpected attribute"...
<b:b1>This is element B1 from namespace B</b:b1>
<a2>This is the second element from schema a</a2>
<c:c1>This element is from namespace c</c:c1>
XML SCHEMA a.xsd:
<xs:import namespace="http://example.org/b/" schemaLocation="b.xsd"/>
<xs:import namespace="http://example.org/c/" schemaLocation="c.xsd"/>
XML SCHEMA b.xsd:
XML SCHEMA c.xsd:
I should mention that I tried the attribute elementForm="qualified" in some
of those xsd files, but I could not notice any different behaviour.
SE-111 20 Stockholm
mobile phone: +46 708 111 966
mobile fax: +46 708 111 965
home office fax: +46 470 711 930
Open solutions for open organisations and people