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
[EMAIL PROTECTED]

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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to