के खिलाफ एक्सएमएल मान्य करते समय त्रुटि मुझे एक साधारण एक्सएमएल फ़ाइल मिली है जिसे मैं एक्सएसडी के खिलाफ मान्य करना चाहता हूं।एक्सएसडी
Invalid content was found starting with element 'Entities'. One of '{Entities}' is expected.
यहाँ एक्सएमएल है::
<BusinessModel xmlns="http://schemas.testxyzxyz.de/xyz/BusinessModel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Entities>
<Entity Name="Customer">
<Attribute Name="Forename" Type="String" />
<Attribute Name="Surname" Type="String" />
<Attribute Name="Birthday" Type="Date" />
</Entity>
</Entities>
</BusinessModel>
साथ ही XSD:
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://schemas.testxyzxyz.de/xyz/BusinessModel"
xmlns="http://schemas.testxyzxyz.de/xyz/BusinessModel">
<xsd:element name="BusinessModel" type="BusinessModelType" />
<xsd:complexType name="BusinessModelType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Entities" type="EntitiesType" />
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="EntitiesType">
<xsd:sequence>
<xsd:element name="Entity" type="EntityType" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="AttributeType">
<xsd:attribute name="Name" type="xsd:string" use="required" />
<xsd:attribute name="Type" type="xsd:string" use="required" />
</xsd:complexType>
<xsd:complexType name="EntityType">
<xsd:sequence>
<xsd:element name="Attribute" type="AttributeType" maxOccurs="unbounded" minOccurs="1" />
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:schema>
कि के लिए खोज रहे जब मैं कुछ यादृच्छिक सत्यापनकर्ता के साथ मान्य, मैं हमेशा निम्न त्रुटि प्राप्त घंटों के बाद से समस्या, और मुझे अभी भी कोई त्रुटि नहीं मिली है। क्या आप मुझे सही दिशा दे सकते हैं? ,
{target namespace}
If
form
is present and its actual value isqualified
, or ifform
is absent and the actual value ofelementFormDefault
on the<schema>
ancestor isqualified
, then the actual value of thetargetNamespace
[attribute] of the parent<schema>
element information item, or absent if there is none, otherwise absent.
के बाद से elemeFormDefault
का डिफ़ॉल्ट मान unqualified
है जब तक अन्यथा निर्दिष्ट स्थानीय तत्वों अयोग्य होना चाहिए:;)
धन्यवाद, यह समस्या ठीक है :) –