You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Steve Buroff <sj...@lucent.com> on 2000/05/02 17:11:14 UTC

xsl template question

This xsl file

  <?xml version="1.0"?>

  <xsl:stylesheet version="1.0"
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns="http://www.w3.org/TR/xhtml1/strict">
  <xsl:output method="xml" indent="yes" media-type="text/html"/>

  <xsl:template name="myTemplate">
   <xsl:param name="param1">defaultValue</xsl:param>
   <xsl:value-of select="${param1}"/>
  </xsl:template>

  <xsl:template match="/">
   <xsl:call-template name="myTemplate">
   </xsl:call-template>
  </xsl:template>

  </xsl:stylesheet>

Gets the following errors from xalan 1.0.1

  >>>>>>> Xalan Version 1.0.1, XML4J Version Xerces 1.0.3<<<<<<<
  ========= Parsing file:C:/TMP/templateBug.xsl ==========
  Parse of file:C:/TMP/templateBug.xsl took 453 milliseconds
  ========= Parsing templateBug.xml ==========
  Parse of templateBug.xml took 31 milliseconds
  =============================
  Transforming...
  XSL Error: pattern = '${param1}'
  VariableReference given for variable out of context or without definition!  Name
   = {param1}, source tree node: #document
  XPATH: pattern = '${param1}'
  VariableReference given for variable out of context or without definition!  Name
   = {param1}
  Xalan: was not successful.
  XSLProcessor: done

Anyone know if I'm doing something wrong or if this is a xalan bug? TIA

Steve Buroff