Subject: Re: [xsl] Infinite Loop when param empty From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 22 Jul 2004 16:56:31 -0400 |
I have a param which is populated with an XML source.
The paramter is declared like this: <xsl:param name="ENTRY_TEMPLATE" select="/"/>
My top level match is: <xsl:template match="/">
Within this template rule I apply the following: <xsl:apply-templates select="$ENTRY_TEMPLATE"/>
If the param ENTRY_TEMPLATE is not set, I end up with an infinite loop. Is this normal behaviour? I'm guessing that maybe it is bad practice to declare the param as I have.
<xsl:when test="generate-id(/) = generate-id($ENTRY_TEMPLATE)"> <xsl:message>Sorry, can't process the root as entry template</xsl:message> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="$ENTRY_TEMPLATE"/> </xsl:otherwise>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Infinite Loop when param , david_n_bertoni | Thread | RE: [xsl] Infinite Loop when param , Michael Kay |
Re: [xsl] Scripting in XSL, J.Pietschmann | Date | [xsl] Complex Template Match, Karl J. Stubsjoen |
Month |