You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Da...@lotus.com on 2000/07/10 16:32:53 UTC

RE: xsl_include href="$include_file" - doesn't evaluate parameter s

Attribute Value Templates are not allowed in top-level elements, such as
xsl:include and xsl:import.  See:

http://www.w3.org/TR/xslt#attribute-value-templates

Variables are not allowed in xsl:include, or xsl:import either.  The URI is
always treated as a literal string.

Dave



                                                                                                                                   
                    Mike Gargiullo                                                                                                 
                    <mgargiullo@small        To:     "'xalan-dev@xml.apache.org'" <xa...@xml.apache.org>                       
                    world.com>               cc:     (bcc: David N Bertoni/CAM/Lotus)                                              
                                             Subject:     RE: xsl_include href="$include_file" - doesn't evaluate parameter s      
                    07/10/2000 08:15                                                                                               
                    AM                                                                                                             
                    Please respond to                                                                                              
                    xalan-dev                                                                                                      
                                                                                                                                   
                                                                                                                                   



try <xsl:include href="{$include_file}" />


-----Original Message-----
From: greg keraunen [mailto:gkeraunen@valinux.com]
Sent: Friday, July 07, 2000 6:00 PM
To: xalan-dev
Subject: xsl_include href="$include_file" - doesn't evaluate parameters





Is this a bug or a feature?
The normal param usage, <xsl:value-of select="$param_name"/>  doesn't
seem to apply for assigning values to attributes inside the xsl:include
element.


Code:


<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:h="http://www.w3.org/TR/REC-html40">


<xsl:output indent="yes"/>


<xsl:param name="include_file">/home/greg/xslt/test1.xsl</xsl:param>


<xsl:include href="$include_file" />


</xsl:stylesheet>


Gives the following error:
XSLT: File "file:/home/greg/xslt/$include_file" not
found.


As you can see, $include_file is being taken literally as the value of
the url rather than evaluating the parameter first.


I'm using:
VA Linux-supplied Red Hat 6.2
jdk118_v1-glibc-2.1.2
xalan-j_1_0_1


--
greg keraunen <gk...@valinux.com> 408-542-8600 x8085
web software engineer