cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Haarman <mhaa...@socsci.umn.edu>
Subject Re: Design Assistance
Date Fri, 05 Jul 2002 21:27:42 GMT

I see that the driver is using xsl:import for ./docbook.xsl.  To clarify:

On Fri, 5 Jul 2002, Jason Foster wrote:

<snip/>

> a "driver" stylesheet that looks like:
>
>    <xsl:stylesheet
>    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>    version='1.0'>
>      <xsl:import
>      href="file:///Users/jafoster/Development/docbook-xsl-1.50.0/fo/docbook.
> xsl"/>
>      <xsl:param name="use.extensions"/>
>      <xsl:param name="autotoc.label.separator"/>
>    </xsl:stylesheet>
>
> I would really like to do things "properly" and use the driver stylesheet
> approach.  This means that I need to first use the submitted form to create
> the driver stylesheet and then use that new stylesheet to process the
> uploaded file.

You shouldn't need to generate any of the stylesheets required until you
want to start caching user preferences.  DocBook params which you don't
specify in ./session-defaults.xsl and which are not assigned via
xsl:variable will be untouched.  To import rather than include the main
stylesheet, the driver will look like this (without Cocoon's
requirements):

<xsl:stylesheet
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     version='1.0'>
     <xsl:import
          href="file:///./docbook.xsl"/>
          <xsl:param name="use.extensions"/>
          <xsl:param name="autotoc.label.separator"/>
     <xsl:import
          href="file:///./session-defaults.xsl"/>
          <xsl:variable name="my_docbook_flag"
               select="$how_cocoon_gets_param1_from_request"/>
</xsl:stylesheet>

Latter imports have higher precedence.  If ./docbook.xsl expects xsl:param
rather than xsl:variable they can be loaded up with:

<xsl:param name="my_docbook_flag" select="$my_dockbook_flag"/>

after the ./docbook.xsl import statement.


----------------------------------------------------------------
Mike Haarman
mhaarma@socsci.umn.edu

Maintainer,
  DDI Codebook DTD -- http://www.icpsr.umich.edu/DDI/


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message