

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
10 messages in com.mulberrytech.lists.xsl-list[xsl] a bit of distraction ' quiz of ...| From | Sent On | Attachments |
|---|---|---|
| James Fuller | Dec 27, 2005 2:00 am | |
| Geert Josten | Jan 2, 2006 9:17 am | |
| Kamal Bhatt | Jan 2, 2006 2:57 pm | |
| Sylvain Hellegouarch | Jan 2, 2006 3:10 pm | |
| Kamal Bhatt | Jan 2, 2006 3:15 pm | |
| Michael Kay | Jan 2, 2006 3:21 pm | |
| andrew welch | Jan 3, 2006 1:24 am | |
| Ragulf Pickaxe | Jan 3, 2006 1:48 am | |
| andrew welch | Jan 3, 2006 2:10 am | |
| Geert Josten | Jan 3, 2006 3:26 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [xsl] a bit of distraction ' quiz of XSLT 1.0 oddities' | Actions |
|---|---|---|
| From: | James Fuller (jim....@ruminate.co.uk) | |
| Date: | Dec 27, 2005 2:00:13 am | |
| List: | com.mulberrytech.lists.xsl-list | |
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 <root> <test>1</test> <test>2</test> <test>3</test> <test>4</test> </root>
XSLT <xsl:template match="root"> <xsl:apply-templates select="test"/> </xsl:template>
<xsl:template match="*"> this template <xsl:value-of select="."/> </xsl:template>
<xsl:template match="node()"> that template <xsl:value-of select="."/> </xsl:template>
When matching templates are equivelent which one gets matched?
--------------------------------------------------------------
What does the string-length() function return in the following xml / xslt snippet ?
XML <doc> <a>Testing this</a> <a>and this too</a> </doc>
XSLT <xsl:template match="/"> <out> <xsl:value-of select="string-length()"/><xsl:text> </xsl:text> <xsl:value-of select="string-length(doc/a)"/> </out> </xsl:template>
-------------------------------------------------------------
Can a template be both named and match? for example is the following construction possible?
<xsl:template name="my:book" match="book">
-------------------------------------------------------------
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?
<xsl:value-of select="name()"><a>some text</a></xsl:value-of>
-------------------------------------------------------------
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
<?xml version="1.0" encoding="UTF-8"?>
<out>doc #1:
<bdd>http://example.com</bdd><ext>http://test.extension</ext><jad>http://administrator.com</jad><java>http://xml.apache.org/xslt/java</java><ped>http://tester.com</ped><xml>http://www.w3.org/XML/1998/namespace</xml>
doc #2:
<xml>http://www.w3.org/XML/1998/namespace</xml>
</out>
from this xml ?
<?xml version="1.0"?> <docs> <doc x="x" y="y" z="z" xmlns:ext="http://test.extension" xmlns:java="http://xml.apache.org/xslt/java" xmlns:ped="http://tester.com" xmlns:bdd="http://example.com" xmlns:jad="http://administrator.com"/> <doc x="ax" y="ay" z="az"/> </docs>
-------------------------------------------------------------
Is the following a valid declaration for xsl:variable?
<xsl:template match="/">
<xsl:value-of select="$myvar"/>
</xsl:template>
<xsl:variable name="myvar" select="'test output'"/>
--------------------------------------------------------------
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







