The other difficulty here is that I think it's increasingly common to mix
XHTML with other XML vocabularies, e.g. SVG or XForms. The fact that the
output method is XHTML doesn't necessarily indicate that everything in the
output will be valid XHTML.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk]
Sent: 09 March 2007 23:38
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Schema-aware validation of XHTML result-document
The schema is stricter than the DTD, several things are
allowed in the
DTD but not in the schema. But not the other way except for those
namespace related attributes.
this is building in a lot of knowledge about the relative
features of the dtd and schema, which is why I commented
there is essentially no way you could expect this from the
xml output method (which uses _no_ special knowledge about
xhtml at all) the xhtml output method being specifically
designed to make xhtml more palatable to existing html
systems (that is IE, in practice) could perhaps have some
warnings about this (but again the article is misleading in
implying that it's up to the _system_ to make this choice,
when the behaviour is mandated by the
specification)
For that reason it ought to be possible and easy for the XSLT
stylesheet to warn you. Not that validation against the schema has
failed but that the output will not be valid validated
against the DTD
specified in the result-document element in the stylesheet.
Yes it is
a little confusing.
given that XSLT _never_ validates against the result DTD,
this would just be a warning issued on every transformation
on every document, is that really what you are suggesting?
apart from extra namespace declarations, the element names
could be prefixed, <h:html.... or the public or system
identifier could be wrong, all of which only affect DTD
validity not schema validity (having the wrong dtd secified
could affect schema validity or even well-formedness of the
output _file_ but it won't affect the schema-validity of the
in-memory result document which has no record of the !DOCTYPE
as it has no XDM representation, it's just added as part of
the serialisation, after the schema validation.
David
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--