[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem of XML validation
Hi,
This is to report a possible issue in the Netconf XML schema. I try to
validate a simple get-config message but I get some errors.
I use the Netconf schema and some sample messages from draft 12.
I tested two "standard" XML schema validator implementations:
- the one from the C library libxml2
- the one from the Java library JAXP.
Twice, I got the result that the <filter> element should be empty.
I think the problem comes from the following complexType. It is the
exact definition of an empty element.
See http://www.w3schools.com/schema/schema_complex_empty.asp
<xs:complexType name="filterInlineType">
<xs:complexContent>
<xs:restriction base="xs:anyType">
<xs:attribute name="type" type="FilterType" default="subtree"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
I changed it to the following :
<xs:complexType name="filterInlineType">
<xs:complexContent>
<xs:restriction base="xs:anyType">
<xs:sequence>
<xs:any processContents="skip"/>
</xs:sequence>
<xs:attribute name="type" type="FilterType" default="subtree"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
I put processContents="skip" to not validate the content, especially because a subtree filter may be correct but not xml valid.
But now the problem is that it does not allow text content, only elements (like top). This is a problem for xpath capabilities.
I don't know how to solve it.
Does somebody experiment the same problems ?
Best regards,
Vincent
___________________________________________________________________________
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com
--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>