xsl-list
[Top] [All Lists]

Re: misc. confusion on "footnote" handling

2004-08-26 09:20:53
Hi Bruce,

At 08:27 PM 8/25/2004, you wrote:
I understand that I want to think about breaking the last two into stuff like:

        biblio-output-author-year.xsl
        citation-output-author-year.xsl
        biblio-output-footnote.xsl
        citation-output-footnote.xsl

.... and so forth, and using import instead.

However, I don't want the user to choose which stylesheet to run (main-author-year.xsl vs main-footnote.xsl). I want that to be defined in a separate non-XSL style file, and for the user always to run the same stylesheet.

Is there some smart way I can have one main stylesheet that imports different stylesheets depending on that main "class" parameter?

No, not to my knowledge. I'd say simply "no", except I recognize we're talking about XSLT 2.0 here.

It's designed to work the way I've described it, and it works quite well. In fact, better than the method you've described, since parameterization is easier to handle (all parameters can be at the top level of the stylesheet and don't need to be imported conditionally).

You say you want the user always to run the same stylesheet, and parameterize your "operational mode" in a separate file. If that separate file were (for example) an Ant build configuration, or a file called in by such, which stylesheet is actually being run could be opaque to the user. (We commonly address such requirements as which-stylesheet-is-run at the level of the shell that invokes the process, not the process itself.)

You can't parameterize the import itself because it means that the stylesheet can't be compiled without parameters given at run time. (As I understand it: my education was in Ancient Greek, not modern compilers.)

Cheers,
Wendell


======================================================================
Wendell Piez                            
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================