Xml pas sure de ma dtd

Résolu/Fermé
magicshark Messages postés 402 Date d'inscription mardi 27 juillet 2010 Statut Membre Dernière intervention 6 mai 2014 - 30 mars 2011 à 19:13
magicshark Messages postés 402 Date d'inscription mardi 27 juillet 2010 Statut Membre Dernière intervention 6 mai 2014 - 31 mars 2011 à 12:50
Bonjour,
Comme le dit le titre j'ai un fichier xml et je ne suis pas sure de mon coup pour ma dtd donc je vais mettre mon xml et ma dtd merci de me confirmer ou pas :D
dtd :
<?xml version="1.0" encoding="ISO-8859-1"?>

<!ELEMENT conf (profil*)>

<!ELEMENT profil  (info_gene,info_ip,info_dns)>

<!ELEMENT info_gene     (nom,network)>

<!ELEMENT info_ip    (type,ip?,mask?,passerelle?)>

<!ELEMENT info_dns    (type,dns?,aux?)>
<!ELEMENT info_dns type (manuelle | auto) "manuelle">

<!ELEMENT info_ip type (manuelle | auto) "manuelle">

<!ELEMENT ip		(#PCDATA)>

<!ELEMENT mask		(#PCDATA)>

<!ELEMENT passerelle (#PCDATA)>
<!ELEMENT dns (#PCDATA)>

<!ELEMENT aux (#PCDATA)>


xml :
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE conf SYSTEM "conf.dtd">

<?xml-stylesheet type="text/xsl" href="style.xsl"?> 

<conf>

	<profil>

		<info_gene>

			<nom>Profil 1</nom>

			<network>eth0</network>

		</info_gene>

		<info_ip>

			<type>manuelle</type>

			<ip>192.168.1.10</ip>

			<mask>255.255.255.0</mask>

			<passerelle>192.168.1.1</passerelle>

		</info_ip>

		<info_dns>

			<type>manuelle</type>

			<dns>XXX.XXX.XXX.XXX</dns>

			<aux>YYY.YYY.YYY.YYY</aux>

		</info_dns>

	</profil>
</conf>


A voir également:

1 réponse

magicshark Messages postés 402 Date d'inscription mardi 27 juillet 2010 Statut Membre Dernière intervention 6 mai 2014 13
31 mars 2011 à 12:50
up
0