Re: Validation problem when SCHEMA XSD andENTITYDECLARATION

"RACHOVITCH Yoni" <[email protected]>
Newsgroups gmane.text.xml.french.tech
Message-ID <[email protected]>
Objet : [xml-tech] Re: Validation problem when SCHEMA XSD
andENTITYDECLARATION


Bonjour,

l'environnement est ASP / VBscript, c'est pour cela que j'utilise le parseur MSXML2, qui me semble etre complet (jusqu'à preuve du contraire).
Je n'ai pas donc essayé d'autres parseurs particuliers, avez vous une suggestion?

voici le code que j'utilise pour valider mon fichier xml:

			Set xmlDoc = CreateObject("MSXML2.DOMDocument.4.0")
			xmlDoc.async = false
			xmlDoc.validateOnParse = true
			xmlDoc.resolveExternals = true
			Loaded = xmlDoc.load(XML_File)

L'erreur qui m'est retrouéne est la suivante:
	"The element 'nom de la balise principale' is used but not declared in the DTD/Schema"
Or, les logiciels XMLSPY et Stylus Studio valident mon fichier xml sans probleme, mais pas Oxygen.

Je comprends donc qu'il y a une histoire de parseur dans l'histoire (MSXML2 pour le moment).

Voici, la structure de mon fichier xml (en rappel):

<?xml version="1.0" encoding="UTF-8"?>
'Declaration de mon entité
<!DOCTYPE xml [ <!ENTITY Image_3 SYSTEM "Image_3.jpg" NDATA JPG> ]>
'déclaration de mon schéma xml
<xml xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>" xsi:noNamespaceSchemaLocation="Schema.xsd"> 
<tag1>
 <tag2>
 <tag3>
 <tag4> . . . 
'Appel dans l'attribut de la balise <tag5> de l'entité Image_3 défini dans le DOCTYPE
 <tag5 type='Image_3'/>
</xml>

-----Message d'origine-----
De : [email protected] [mailto:[email protected]]De la
part de Eric van der Vlist
Envoyé : mardi 28 février 2006 08:56
À : [email protected]
Objet : [xml-tech] Re: Validation problem when SCHEMA XSD and
ENTITYDECLARATION


Bonjour,
Le lundi 27 février 2006 à 14:52 +0100, RACHOVITCH Yoni a écrit :
> I have a xml file which looks like to the following one. It is linked
> to a schema file, and has, at the beginning, a DOCTYPE tag which
> refers to jpeg ENTITY. 
> I note that the schema takes in account the Entity but I can't valid
> my xml file with MSXML2 because of mix Schema and Entity. I only use
> the load function of msxml2 that valids a xml file according to its
> schema. but it doesen't work when Entitys are in declaration.
> Have you got an idea?

Il n'y a, à priori, aucune raison de ne pas utiliser à la fois des
entités et un schéma mais cela pose problème à certains parseurs.

De plus les entités NDATA sont un héritage SGML très peu utilisé et
pouvant donc poser des problèmes d'interopérabilité entre parseurs...

Avez-vous essayé d'utiliser un parseur autre que MSXML2 pour voir dans
quelle mesure le problème lui est spécifique?

Cordialement,

Eric van der Vlist

-- 
GPG-PGP: 2A528005
Le premier annuaire des apiculteurs 100% XML!
                                                http://apiculteurs.info/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


-- Attached file included as plaintext by Ecartis --

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBEBAIhDvn+ZCpSgAURAqYgAJ4mUX5zGGwqNM4JT3ElYzdtvy+rgQCcD85/
oGuf0Z3rGMjZ8JwNNbfoouw=
=33ZU
-----END PGP SIGNATURE-----


--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !

Liste de diffusion "[email protected]" (http://xmlfr.org).

Cette liste est a votre disposition pour discuter en francais de 
tout sujet technique lie a XML.

Pour resilier votre abonnement, envoyez un message contenant 
la commande "unsubscribe" a [email protected]
(mailto:[email protected]?Subject=unsubscribe)


--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !

Liste de diffusion "[email protected]" (http://xmlfr.org).

Cette liste est a votre disposition pour discuter en francais de 
tout sujet technique lie a XML.

Pour resilier votre abonnement, envoyez un message contenant 
la commande "unsubscribe" a [email protected]
(mailto:[email protected]?Subject=unsubscribe)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.