XSLT Quiz: http://www.PerfectXML.com/Quiz/XSLTQuiz.asp
Dammit, I got 3 wrong! One was because I missed some missing quotes,
which is fair enough, but the others are a bit more contentious in my
view...
According to the test, the following is true:
"We should use push approach (using <xslt:apply-templates>) for
document-oriented XML, and pull approach (using <xslt:for-each> and
<xslt:value-of> for data-oriented XML."
I guess it depends on how you classify document-oriented and
data-oriented XML, but I think it's just fine to use pull when
processing e.g. a bunch of table rows in an XML document, and I think
it's completely acceptable to use push when processing data-oriented
structures, especially if you want to make your stylesheet
maintainable in the face of changes in the source markup language.
Also, according to the test, the following is true:
"XSLT 2.0 processors will allow result tree fragments to be used at
the beginning of a location path."
XSLT 2.0 doesn't even have the *concept* of result tree fragments, so
how they're supposed to appear at the beginning of a location path,
I'm not sure...
Still, I guess that's still an A+ so I shouldn't feel too miffed ;)
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list