Article View: fr.comp.text.xml
Article #110Re: [newbie] Validation XSD/XML
From: apolloj
Date: Sat, 10 Oct 2009 09:34
Date: Sat, 10 Oct 2009 09:34
44 lines
2614 bytes
2614 bytes
Bonjour,
Mer�i pour la r�ponse
En fait,
services-test apparait 2 fois. C'est un fichier non modifiable (utilis�
ailleurs aussi et qui est � *priori* valid�)
Comment le parser fait la diff�rence ?
<xsd:element name="services-test" type="xsd:string"/>
<!-- definition du noeud racine 'services-test' -->
<xsd:complexType name="services-test">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="mat"
type="mat"/>
</xsd:sequence>
<xsd:attribute name="noNamespaceSchemaLocation" type="xsd:token"/>
</xsd:complexType>
Micka�l Wolff a �crit :
> apolloj wrote:
>
>> <?xml version="1.0" encoding="utf8" ?>
>> <xsd:schema xmlns=""
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> targetNamespace="">
>>
>> <xsd:element name="description" type="xsd:string"/>
> [snip]
>> xmllint --noout --schema ./info.xsd ./info.xml
>> ./info.xml:2: element services-test: Schemas validity error : Element
>> 'services-test': No matching global declaration available.
>> ./info.xml fails to validate
>>
> Le message est pourtant clair. Tu as d�clar� que l'�l�ment
> service-test est une chaine, qui ne contient *pas* d'autrs �l�ments. Or,
> dans ton fichier XML, service-test contient d'autres �l�ments. Il faut
> donc que tu corrige ton XSD pour que la d�claration de l'�l�ment soit en
> accord avec ton besoin.
>
Technical Details
Message-ID:
<4ad05541$0$307$426a74cc@news.free.fr>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp7-1.free.fr!not-for-mailReferences:
<4acfbdd9$0$31424$426a34cc@news.free.fr> <4acfc485$0$9354$426a74cc@news.free.fr>Show Full Headers
Complete Article Headers
X-Google-Thread: 8a75585569,af86fdbf92d5fc75 X-Google-Attributes: gid8a75585569,public,usenet X-Google-NewGroupId: yes X-Google-Language: FRENCH,ASCII Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp7-1.free.fr!not-for-mail Date: Sat, 10 Oct 2009 11:34:57 +0200 From: apolloj <apolloj_net@NOSPAMmsn.com> User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 Newsgroups: fr.comp.text.xml Subject: Re: [newbie] Validation XSD/XML References: <4acfbdd9$0$31424$426a34cc@news.free.fr> <4acfc485$0$9354$426a74cc@news.free.fr> In-Reply-To: <4acfc485$0$9354$426a74cc@news.free.fr> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 091009-0, 09/10/2009), Outbound message X-Antivirus-Status: Not-Tested Lines: 44 Message-ID: <4ad05541$0$307$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 10 Oct 2009 11:34:57 MEST NNTP-Posting-Host: 88.173.239.181 X-Trace: 1255167297 news-1.free.fr 307 88.173.239.181:1405 X-Complaints-To: abuse@proxad.net