xsl-list
[Top] [All Lists]

A strange problem...

2004-02-26 12:13:52

 I have this files...

*** sectores.xml
 <sectores>
        <tareas>
                <tarea>dibujaSectores</tarea>
        </tareas>
</sectores>

*** graficos.xslt

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet ...

<xsl:output ...
        
<xsl:include href="includes.xslt"/>
        
<xsl:variable name="urlConfigGrafico">../sectores.xml</xsl:variable>
        
<xsl:template match="grafico">
 
 <svg width="100%" height="100%">
                        
 <xsl:for-each select="document(string($urlConfigGrafico))//tareas/tarea">
  <xsl:call-template name="llamaTarea">
   <xsl:with-param name="nombreTarea" select="."/>
  </xsl:call-template>                  
 </xsl:for-each>

 </svg>
</xsl:template>

 *** tareas.xsl

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet ...
<xsl:template name="llamaTarea">
 <xsl:param name="nombreTarea"/>
                
 <xsl:choose>
  <xsl:when test="$nombreTarea = 'dibujaSectores'">
   <xsl:call-template name="dibujaSectores"/>
  </xsl:when>
 </xsl:choose>
</xsl:template>         

 *** sectores.xslt
<xsl:styl.......
<xsl:template name="dibujaSectores">

 </xsl:template>


 The paths between files are ok.

 I need to compile it with a .bat file who calls a XALAN processors.

 After the process the output file contains only the SVG header.

 But if i rewrite the "grafico.xslt" like this...

 <xsl:call-template name="dibujaSectores"/>

 <xsl:for-each select="document(string($urlConfigGrafico))//tareas/tarea">
  <xsl:call-template name="llamaTarea">
   <xsl:with-param name="nombreTarea" select="."/>
  </xsl:call-template>                  
 </xsl:for-each>

 Then the output file contains the graphic... 

 What could happens?¿? This "new" call what i have to write why not execute 
correctly in the other way?¿

 ThanksThanksThanks

 PD: If someone can helps me i will say him "Ole!!!"

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>