This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: variable import hrefs?


> From: Mark Johnson <mark@phy.duke.edu>
> 
> Hi All,
> 
> For xsl stylesheets, is there a way to set import hrefs at runtime?
> 
> i.e. something having this effect:
> 
>   <xsl:import href="{$my_stylesheet_home}/xhtml/docbook.xsl"/>
> 

I don't think so.  The <xsl:import> href attribute is
defined in the XSLT Recommendation as a URI reference.
URIs can be relative or absolute, but it doesn't say
anthing about them being variable. 8^)

Did you try it?

XSLT can generate attribute values in a result tree
(document).  You could do a two-step process, where you
first generate your formatting stylesheet using another
"generate-stylesheet.xsl" template operating on a small XML
configuration file containing your parameters.  The output
of the first step would be your formatting stylesheet with
the href's filled in.  They you would use that in a second
XSLT process on your document.  If you can keep
all that straight, it should work.  Or you could just run
a simple filter script on your stylesheet before applying it.

bobs
Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The Santa Cruz Operation, Inc.              fax:   (831) 429-1887
                                            email: bobs@sco.com

------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]