xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Kesselman <kesh...@us.ibm.com>
Subject Re: Error using DOCTYPE in a stylesheet
Date Fri, 16 May 2003 16:25:30 GMT




It is legal to have a DOCTYPE reference in a stylesheet.  But it's rarely
useful.

The DTD would have to cover all the possible literal result elements,
namespace declarations and variations, and so on in order to validate
successfully, which means you wind up writing a new DTD for each individual
stylesheet -- or writing one that's too general to be useful. The only
productive thing you can get out of the DOCTYPE, in most cases, is entity
declarations.

(One way to handle this LRE problem might would be to write your stylesheet
completely without literal result elements, invoking <xsl:element> and
<xsl:attribute> instead. I suppose one could write a stylesheet that
converted other stylesheets into that form...)

Schemas would be a better choice in some ways, since they're more tolerant
of namespaces and since they support the concept of "any" content... but
schemas *don't* handle entity declarations.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Sandy Tyra, in r.m.filk


Mime
View raw message