Hi,
I'm trying to use namespace for my XML document here. I tried putting in
the example of TNS documents plus binding and elementFormDefault to be
'qualified' :
TNS.xml:
<?xml version="1.0" encoding="UTF-8"?>
<dv:main
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:dv="http://MyDomain.com/TNS"
xsi:schemaLocation="http://MyDomain.com/TNS TNS.xsd">
<dv:child />
</dv:main>
TNS.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns="http://MyDomain.com/TNS"
targetNamespace="http://MyDomain.com/TNS"
elementFormDefault="qualified">
<xsd:element name="main" >
<xsd:complexType content="elementOnly">
<xsd:element name="child" type="child" minOccurs="0"
maxOccurs="unbounded" />
</xsd:complexType>
</xsd:element>
<xsd:complexType name="child" content="empty" />
</xsd:schema>
But the parser gives erros saying that "dv:main" and "dv:child" must be
declared. What's wrong?
thanks a lot for your help,
cath