[xsl] XSLT 1: template inside of template?

Subject: [xsl] XSLT 1: template inside of template?
From: "Chris Loschen" <christopher.loschen@xxxxxxxxxx>
Date: Mon, 30 Oct 2006 13:58:08 -0500
Hi all,

I don't have my reference book in front of me. I just wanted a quick sanity

I just got out of an interview and one of the questions was about XSLT 1.0.
The sample code looked like this:

<xsl:template .>
<!-- various stuff -->
<xsl:template .>
<!-- more stuff -->
<!-- more stuff -->

I pointed out to the interviewer that this wasn't legal: you can't have an
xsl:template inside another xsl:template. She said that it was copied from a
working stylesheet, so it had to be legal, but I think there had to be a
copy-and-paste error or something in there.

Am I crazy? (Well, let's leave that one aside. am I crazy about this?) XSLT
doesn't allow an xsl:template inside of another xsl:template, right?


Chris Loschen

Current Thread