|
next
|
Subject: Validation of XHTML with Saxon and .NET XML Parser Author: Vasil Rangelov Date: 18 Aug 2007 10:25 AM Originally Posted: 18 Aug 2007 10:21 AM
|
This is more of a bug actually...
I just tried using Stylus Studio to write XHTML 1.1 document and validate it. It validated everywhere except with Saxon and .NET XML Parser. I believe however that the reason MAY be in Stylus Studio. Here's why.
The XHTML is
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd" xml:lang="bg">
<head>
<title>Карта на сайта</title>
</head>
<body>
<div>
<ul>
<li>
<a href="index.xml">Начало</a>
</li>
<li>
<a href="about.xml">За нас</a>
</li>
</ul>
</div>
</body>
</html>
And the XHTML 1.1 schema, without annotations, is:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3.org/1999/xhtml"
xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
xmlns="http://www.w3.org/1999/xhtml"
blockDefault="#all">
<xs:import
namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd">
</xs:import>
<xs:include
schemaLocation="xhtml11-model-1.xsd">
</xs:include>
<xs:include
schemaLocation="xhtml11-modules-1.xsd">
</xs:include>
</xs:schema>
I doubt either of those validators don't support the xs:include and xs:import elements (feel free to swear me if that's the real problem :D), but even so, when I validate with Saxon I get:
Running custom validation engine Saxonica 8.9.0.3 Validator...
Error on line 128 of http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:
Invalid restriction: attribute @version is inconsistent with the base type. Type FPI is
not validly derived from type FPI Warning: The schema is invalid
Warning: Validation will continue without the schema at http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd
Validation error on line 2 column 206 of file:///d:/htdocs/company/ilia_site/navigation.xml:
Cannot validate <html>: no element declaration available Validation error on line 2 column 206 of file:///d:/htdocs/company/ilia_site/navigation.xml:
Cannot validate <html>: no element declaration available Validation of source document failed
and with .NET XML Parser I get
Running custom validation engine .NET XML Parser...
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:89,10: No attribute group to redefine.
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:128,10: No attribute group to redefine.
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:136,10: No attribute group to redefine.
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:262,10: No attribute group to redefine.
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:296,10: No attribute group to redefine.
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:334,10: No attribute group to redefine.
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:383,10: No attribute group to redefine.
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:404,10: No attribute group to redefine.
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:439,10: No attribute group to redefine.
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:455,10: No attribute group to redefine.
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:471,10: No attribute group to redefine.
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd:487,10: No attribute group to redefine.
file:///d:/htdocs/company/ilia_site/navigation.xml:2,2: The 'http://www.w3.org/1999/xhtml:html' element is not declared.
file:///d:/htdocs/company/ilia_site/navigation.xml:2,192: Could not find schema information for the attribute 'http://www.w3.org/XML/1998/namespace:lang'.
file:///d:/htdocs/company/ilia_site/navigation.xml:3,3: The 'http://www.w3.org/1999/xhtml:head' element is not declared.
file:///d:/htdocs/company/ilia_site/navigation.xml:4,4: The 'http://www.w3.org/1999/xhtml:title' element is not declared.
file:///d:/htdocs/company/ilia_site/navigation.xml:6,3: The 'http://www.w3.org/1999/xhtml:body' element is not declared.
file:///d:/htdocs/company/ilia_site/navigation.xml:7,4: The 'http://www.w3.org/1999/xhtml:div' element is not declared.
file:///d:/htdocs/company/ilia_site/navigation.xml:8,5: The 'http://www.w3.org/1999/xhtml:ul' element is not declared.
file:///d:/htdocs/company/ilia_site/navigation.xml:9,6: The 'http://www.w3.org/1999/xhtml:li' element is not declared.
file:///d:/htdocs/company/ilia_site/navigation.xml:10,7: The 'http://www.w3.org/1999/xhtml:a' element is not declared.
file:///d:/htdocs/company/ilia_site/navigation.xml:10,9: Could not find schema information for the attribute 'href'.
file:///d:/htdocs/company/ilia_site/navigation.xml:12,6: The 'http://www.w3.org/1999/xhtml:li' element is not declared.
file:///d:/htdocs/company/ilia_site/navigation.xml:13,7: The 'http://www.w3.org/1999/xhtml:a' element is not declared.
file:///d:/htdocs/company/ilia_site/navigation.xml:13,9: Could not find schema information for the attribute 'href'.
-----------------------------------
Validation complete with 25 error(s)
So what exactly is the problem here? Is it from the validators themselves, or is Stylus Studio the problem? I'll be schocked if there's an errata in the XHTML 1.1 Schema.
|
|
|