Article View: fr.comp.text.xml
Article #8978Validation d'un Schema
From: Mikael
Date: Mon, 09 Jul 2001 14:16
Date: Mon, 09 Jul 2001 14:16
61 lines
2994 bytes
2994 bytes
Bonjour,
Je dispose d'un XML Schema que je souhaite valider. Pour ce faire, j'ai
r�cup�r� les fichiers XMLSchema.xsd et datatypes.xsd sur le site du w3c
et tent� la validation avec Xerces mais sans succ�s.
Les en t�tes de mes fichiers figurent ci dessous (apr�s avoir remplac� '
xs' par 'xsd' dans les fichiers prs sur le w3c) :
En validant avec Xerces (avec sax.SAX2Count), j'obtiens les messages d'e
rreurs suivants :
Element type "xsd:schema" must be declared
Element type "xde:element" must be declared
Mon fichier XML Schema :
_________________________
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="XMLSchema.xsd">
<xsd:element name="form" type="xsd:string"/>
<!-- etc -->
_ _ _ _ _ _ _ _ _ _ _ _ _
Le fichier XMLSchema.xsd :
(http://www.w3.org/TR/xmlschema-1/#normative-schemaSchema)
___________________________________________________________
<!-- d'autre d�clarations que je pense inutile de mentionner ici -->
<xsd:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefa
ult="#all" elementFormDefault="qualified" version="Id: XMLSchema.xsd,v 1
48 2001/04/24 18:56:39 ht Exp " xmlns:xsd="http://www.w3.org/2001/XMLSc
hema" xml:lang="EN">
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
http://www.w3.org/TR/xmlschema-1/datatypes.xsd
______________________________________________
<!-- d'autre d�clarations que je pense inutile de mentionner ici -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3.org/2001/XMLSchema"
version="Id: datatypes.xsd,v 1.52 2001/04/27 11:49:21 ht Exp "
xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"
elementFormDefault="qualified"
blockDefault="#all"
xml:lang="en">
<!-- le reste -->
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Article poste via Voila News - http://www.news.voila.fr
Le : Mon Jul 9 16:16:35 2001 depuis l'IP : micropole-253.126.rev.fr.colt.net [VIP 9137905]
Technical Details
Message-ID:
<9icec3$agt$1@news.x-echo.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!195.25.12.36!oleane.net!oleane!x-echo.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,2a95efd528fc44a9,start X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-07-09 07:16:36 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!195.25.12.36!oleane.net!oleane!x-echo.com!not-for-mail From: Mikael <kgt@free.fr> Newsgroups: fr.comp.text.xml Subject: Validation d'un Schema Date: 9 Jul 2001 14:16:35 GMT Organization: micropole-253.126.rev.fr.colt.net via Pages News Lines: 61 Message-ID: <9icec3$agt$1@news.x-echo.com> NNTP-Posting-Host: news-front1-0-0.voila.fr X-Trace: news.x-echo.com 994688195 10781 195.101.94.106 (9 Jul 2001 14:16:35 GMT) X-Complaints-To: abuse@x-echo.com NNTP-Posting-Date: 9 Jul 2001 14:16:35 GMT