XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Vasil RangelovSubject: 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>&#1050;&#1072;&#1088;&#1090;&#1072; &#1085;&#1072; &#1089;&#1072;&#1081;&#1090;&#1072;</title>
</head>
<body>
<div>
<ul>
<li>
<a href="index.xml">&#1053;&#1072;&#1095;&#1072;&#1083;&#1086;</a>
</li>
<li>
<a href="about.xml">&#1047;&#1072; &#1085;&#1072;&#1089;</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.

Posttop
(Deleted User) Subject: Validation of XHTML with Saxon and .NET XML Parser
Author: (Deleted User)
Date: 04 Sep 2007 05:31 AM
Hi Vasil,
Stylus Studio doesn't add special code to the custom validators, so the errors they report are related to their implementation of the xs:redefine instruction.

Alberto

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.