W3C home > Mailing lists > Public > xsl-editors@w3.org > April to June 1999

Further comments on xsl:include

From: Jess M Holle <jessh@ptc.com>
Date: Tue, 29 Jun 1999 10:10:06 -0400
Message-ID: <3778D3BE.F13930EB@ptc.com>
To: xsl-editors@w3.org
I previously suggested that xsl:include allow XSL expressions for the
href attribute (or alternatively as an alternate 'expr' attribute which
replaces the href attribute in such cases).

Someone else suggested another possibility which I would like to

If xsl:include was allowed elsewhere besides at the top-level of the
stylesheet, then one could work around the lack of inclusion

For example:

<!-- main xsl file -->
  <xsl:param-variable name='locale'>en</xsl:param-variable>
  <xsl:include href="translationBundle.xsl"/>
  <!-- other xsl stuff -->

<!-- translationBundle.xsl -->
    <xsl:when test='starts-with($locale,"en")'>
      <xsl:include href="translationBundle_en.xsl"/>
    <!-- other cases follow -->

This brings up a question:  How are input parameters dealt with during
inclusion evaluation?

The example above uses a 'locale' variable which is intended to
propagate from the top stylesheet into the translationBundle.xsl sheet
where it selects the appropriate translation bundle.  This obviously
makes certain assumptions about the handling of param-variable's.
Received on Tuesday, 29 June 1999 10:10:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:44:16 UTC