You say you know XSLT well? Try answer this quiz of XSLT 1.0 oddities by James Fuller.
Subject: [xsl] a bit of distraction ' quiz of XSLT 1.0 oddities'
From: James Fuller
Date: Tue, 27 Dec 2005 11:04:03 +0100
a bit of distraction for those who must work.
I am generating a little 'quiz of oddities' for XSLT 1.0, some of which
I have bumped into from time to time....none are particularly mind
blowing, though some may make one stop and think.
Here are some of mine....(xsl:stylesheet elements have been stripped),
any more good questions out there ? Answers sometime around new years.
--------------------------------------------------------------
Whats the output
XML
1
2
3
4
XSLT
this template
that template
When matching templates are equivelent which one gets matched?
--------------------------------------------------------------
What does the string-length() function return in the following
xml / xslt snippet ?
XML
Testing this
and this too
XSLT
-------------------------------------------------------------
Can a template be both named and match? for example is the following
construction possible?
-------------------------------------------------------------
Does exclude-result-prefixes defined on an xsl:stylesheet element apply
to subtrees included with xsl:include ?
--------------------------------------------------------------
Is there any way of using apply-templates using a mode 'decided' at run
time ?
-------------------------------------------------------------
What does this do?
some text
-------------------------------------------------------------
Can anyone show a clever use of the why one would use the floor()
function specifically in XSLT 1.0 ?
-------------------------------------------------------------
How does one arrive to this xml
doc #1:
http://example.comhttp://test.extension
http://administrator.comhttp://xml.apache.org/xslt/java
http://tester.comhttp://www.w3.org/XML/1998/namespace
doc #2:
http://www.w3.org/XML/1998/namespace
from this xml ?
-------------------------------------------------------------
Is the following a valid declaration for xsl:variable?
--------------------------------------------------------------
Which XSLT processors fully support EXSLT node-set extension ?
--------------------------------------------------------------
When there is no xsl:output element how does an XSLT processor determine
that you want an html result ?
--------------------------------------------------------------
How does FXSL calculate sin() ?
--------------------------------------------------------------
Is there anyway to achieve a conditional inclusion (e.g. conditionally
use xsl:include) ?
--------------------------------------------------------------
I have a few more.....pls send your questions, will compile and perhaps ask DaveP
to include in XSLT FAQ.
cheers, Jim Fuller
Leave a comment