[XSL-LIST Mailing List Archive Home]
[Reply To This Message]
Re: XML to HTML transform validation problem
Subject: Re: XML to HTML transform validation problem|
From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
Date: Fri, 26 May 2006 08:22:30 +0100
If you're not using nodes in the http://www.w3.org/2001/XMLSchema namespace
in your output than add exclude-result-prefixes="xs" to your stylesheet
----- Original Message -----
From: "Trevor Nicholls" <trevor@xxxxxxxxxxxxxxxxxx>
Sent: Friday, May 26, 2006 7:56 AM
Subject: XML to HTML transform validation problem
I have a set of XML documents and a standard XML-HTML transformation which
is run in a pipeline; the XSL processor is Saxon 8.6.n (can't check at the
moment, but I think n=1).
Because of the way the stylesheet needs to process footnotes I have to use
some XSL 2.0 features, hence there is some typing in the stylesheet
(..as="xs:integer"..) and the stylesheet has to declare the xs namespace.
========= XSL ========
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:output method="html" encoding="ISO-8859-1" indent="no"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
<title><xsl:value-of select="title" /></title>
I am putting the generated HTML through the HTML validator (at
http://validator.w3.org) and getting errors; the first of which is
Error: there is no attribute "XMLNS:XS".
If I drop the xmlns:xs declaration from my stylesheet (and comment out the
2.0 features it uses) then the <html> element does not declare the
namespace, but this isn't the right answer! I can see plenty of example
outputs on the standard XSL websites which declare the same namespace, so
what additional step do I have to take to produce output which validates?
can't believe that everybody's examples would fail the validation tests,
obviously I've missed something.
Thanks for any help
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format