On 20/05/2010 21:59, Costello, Roger L. wrote:
Hi Folks,
My thinking is that the input data should be checked using XML Schema and
Schematron. Ditto for the data that is output by XSLT.
I see no reason to include in an XSLT program any code to check data. It just
makes the program bigger, harder to understand, harder to maintain, and harder
to debug.
Do you agree?
No, not at all!
/Roger
If by XML Schema you mean XSD, then most of the time I'd rather not use
it at all, ever. But even if you include Relax NG or DTD in "XML Schema"
it's often preferable to not validate at run time.
A grammar validator (not schematron) is usually just a binary pass/fail.
That's fine if you want to reject invalid documents, but if you test for
things in XSLT you can do different code paths and often make correct
output out of less than perfect input.
Checking the output makes sense of course, just to check the output,
although it depends on the transform, some transforms are guaranteed to
produce valid documents, just because the output is sufficiently regular
that unless it stops due to some fatal error the result will be valid.
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>
--~--