Re: [xsl] XPath "//", speed, and Saxon
2008-11-03 09:44:31
On Mon, Nov 03 2008 12:55:12 +0000, mike(_at_)saxonica(_dot_)com wrote:
A lot of time, effort and money goes into testing, but for
XSLT, I think that effort would be better spent on fully
schema aware transforms than unit testing. What do you think?
I think a lot of stylesheets go into production after testing with a very
small sample of input documents. It's often too expensive to do anything
I concur.
else. In this situation, developing with schema awareness can greatly
increase your confidence that the stylesheet will also be able to handle
input documents that vary significantly from your initial sample.
Up to a point. If you neglect to handle an optional input element or
attribute or you map the wrong input to a valid output element or
attribute, then having a schema isn't going to help much.
An up-front good mapping from input to output still trumps the
combination of a schema-aware processor and designing at the keyboard.
(And, yes, a schema-aware processor and some planning could trump both.)
A schema is a useful guide for what to expect, and having input that is
schema-valid means that you don't have to prepare (as much) to handle
unexpected input.
In some ways, the old-fashioned 'match="*"' template rule that emits a
message or outputs the element name in red for any element that isn't
handled elsewhere is still useful even when you have schema awareness.
Schema awareness awareness is useful too: I have met the approach that
the schema is really only useful for working out what to put in "match"
attributes. (That person was using XSLTC translets, so couldn't have
done much with the schema even if he'd wanted to.)
Something like XSLV for verifying that valid input produces valid output
or a coverage tool (non-existent, AFAIK) that tells you whether your
stylesheet can handle everything in a schema would also still be useful.
Regards,
Tony Graham
Tony(_dot_)Graham(_at_)MenteithConsulting(_dot_)com
Director W3C XSL FO SG Invited Expert
Menteith Consulting Ltd
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599 http://www.menteithconsulting.com
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
xmlroff XSL Formatter http://xmlroff.org
xslide Emacs mode http://www.menteith.com/wiki/xslide
Unicode: A Primer urn:isbn:0-7645-4625-2
--~------------------------------------------------------------------
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>
--~--
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Re: [xsl] XPath "//", speed, and Saxon, Tony Graham
- Re: [xsl] XPath "//", speed, and Saxon, Andrew Welch
- RE: [xsl] XPath "//", speed, and Saxon, Michael Kay
- Re: [xsl] XPath "//", speed, and Saxon,
Tony Graham <=
- Re: [xsl] XPath "//", speed, and Saxon, Andrew Welch
- RE: [xsl] XPath "//", speed, and Saxon, Michael Kay
- Re: [xsl] XPath "//", speed, and Saxon, Tony Graham
- Re: [xsl] XPath "//", speed, and Saxon, Andrew Welch
- Re: [xsl] XPath "//", speed, and Saxon, Tony Graham
RE: [xsl] XPath "//", speed, and Saxon, Michael Kay
|
|
|