I'll admit, I'm an XML newbie. I'm having trouble validating some xml against a schema. Here is the relevant part of my schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.me.com/orpm/kpi/automation/report"
targetNamespace="http://www.me.com/orpm/kpi/automation/report">
<xs:attribute name="Pattern">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Exact"/>
<xs:enumeration value="Replace"/>
<xs:enumeration value="Regex"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:complexType name="NameValue">
<xs:all>
<xs:element name="Value" type="xs:string"/>
</xs:all>
<xs:attribute ref="Pattern"/>
</xs:complexType>
<xs:element name="KpiReport">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="NameValue"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Here is the failed xml:
<?xml version="1.0"?>
<KpiReport xmlns="http://www.me.com/orpm/kpi/automation/report"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.me.com/orpm/kpi/automation/report filename.xsd">
<Name Pattern="Exact">
<Value>Test</Value>
</Name>
</KpiReport>
It fails with this error:
Description: cvc-complex-type.2.4.a: Invalid content was found starting with element 'Name'. One of '{Name}' is expected.
I am lost on this. Please help.