jonstalnaker
Programmer
This version of my XSD validates fine:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs=" elementFormDefault="qualified">
<xs:element name="point">
<xs:complexType>
<xs:attribute name="le" type="xs:decimal" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="detail">
<xs:complexType>
<xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute processContents="skip"/>
</xs:complexType>
</xs:element>
<xs:element name="event">
<xs:complexType>
<xs:all>
<xs:element ref="point" />
<xs:element ref="detail" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
However when I add a targetNamespace to the schema tag, it breaks the reference in the Event element to both Point and Detail. Can anyone explain to me why this breaks and what I need to do to add a targetNamespace?
Thanks!
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs=" elementFormDefault="qualified">
<xs:element name="point">
<xs:complexType>
<xs:attribute name="le" type="xs:decimal" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="detail">
<xs:complexType>
<xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute processContents="skip"/>
</xs:complexType>
</xs:element>
<xs:element name="event">
<xs:complexType>
<xs:all>
<xs:element ref="point" />
<xs:element ref="detail" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
However when I add a targetNamespace to the schema tag, it breaks the reference in the Event element to both Point and Detail. Can anyone explain to me why this breaks and what I need to do to add a targetNamespace?
Thanks!