🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.xml
Article #9578

valid or not valid?

#9578
From: Filip Rembiałkowski
Date: Fri, 30 Nov 2007 10:16
35 lines
1725 bytes
czy puste CDATA w tym miejscu jest poprawne?

pewien walidator mówi ze nie, i krzyczy błędem


[11:13:58][filip@sulaco:~]$ xmllint my.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:element name="root-tag">
     <xs:complexType>
       <xs:sequence>
         <xs:element name="age-from" type="xs:int" minOccurs="0" maxOccurs="1"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
</xs:schema>

[11:14:06][filip@sulaco:~]$ xmllint my.xml
<?xml version="1.0" encoding="UTF-8"?>
<root-tag>
   <age-from></age-from>
</root-tag>

[11:14:11][filip@sulaco:~]$ xmllint --noout --schema my.xsd my.xml
my.xml validates



a pewien inny walidator mówi tak:

Error       :
   Message       : cvc-datatype-valid.1.2.1: '' is not a valid value for 'integer'.
Error       :
   Message       : cvc-type.3.1.3: The value '' of element 'age-from' is not valid.
Technical Details
Message-ID: <fionud$569$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: Filip Rembiałkowski <plk.zuber@gmail.com>
Newsgroups: pl.comp.xml
Subject: valid or not valid?
Date: Fri, 30 Nov 2007 11:16:49 +0100
Organization: tp.internet - http://www.tpi.pl/
Lines: 35
Message-ID: <fionud$569$1@atlantis.news.tpi.pl>
NNTP-Posting-Host: 213.77.0.70
Mime-Version: 1.0
X-Trace: atlantis.news.tpi.pl 1196417805 5321 213.77.0.70 (30 Nov 2007 10:16:45 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Fri, 30 Nov 2007 10:16:45 +0000 (UTC)
User-Agent: Icedove 1.5.0.14pre (X11/20071018)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit