Bonjour a vous tous,
j'ai cree un fichier DTD, et je veux qu'il m'affiche erreur si je lui fournis dans mon XML autre balise que ceux du dtd (normalement l'exemple suivant dois me fournir une erreur sur instances le (S) mais il affiche XML correcte ) une idee?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plateForm SYSTEM "config.dtd" >
<plateForm>
<config name="">
<host name="">
<group name="">
<instances>
<httpStack/>
</instances>
<proxyApp name=""/>
</group>
</host>
</config>
</plateForm>
mon dtd
<!ELEMENT plateForm (config*)>
<!ELEMENT config (host*)>
<!ATTLIST config
name CDATA #REQUIRED>
<!ELEMENT host (group*)>
<!ATTLIST host
name CDATA #IMPLIED>
<!ELEMENT group (instance*,proxyApp+)>
<!ATTLIST group
name CDATA #REQUIRED>
<!ATTLIST proxyApp
name CDATA #REQUIRED>
<!ELEMENT instance (httpStack|calloutAgent|JMXGateway|SIPStack)+>
<!ELEMENT calloutAgent >
<!ATTLIST calloutAgent
name CDATA #REQUIRED>
<!ELEMENT httpStack >
<!ATTLIST httpStack
name CDATA #REQUIRED>
<!ELEMENT JMXGateway >
<!ATTLIST JMXGateway
name CDATA #REQUIRED>
<!ELEMENT SIPStack >
<!ATTLIST SIPStack
name CDATA #REQUIRED>
Merci
Partager