This is the mail archive of the xsl-list@mulberrytech.com mailing list .


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

Re: Using xml:base in an xsl:stylesheet declaration - how about i t?


Dawson, Geoff F wrote:
> 
> If you are parsing/caching/generating the xsl then you will presumably be
> setting the base URI programatically. In which case, rather than injecting
> the xml:base into the xsl, why not just set the SystemId on the
> XSLTInputSource?

Um, because I'm using Perl XML::XSLT.

Long story goes... 
I'm publishing a site in 4 flavours (or schemes -
'printable','dhtml','slate','clay').

I'm defining some common elements - named templates (item, title) + a
bunch of housekeeping matches (LINK, PHONE) in a shared library. (eg
'sigma_base.xsl')

My per-page templates (sigma_portfolio.xsl, sigma_personal.xsl) include
& call the common definitions for item & title, yet have page layouts
unique to their subject matter.

As my global 'publish-site' function (creates a dir structure of flat
html) is getting very intensive I've been cacheing the parsed templates
(of which there's a handful) to apply to the data (of which there's
heaps).

Combining these two methods has lead to me losing track of where the
include comes from. It would be well if I could cache the parsed
template including the xsl:include , but as of now that doesn't happen
until parse-time.

So I saw the xml:base option as having far-reaching benefits. Embedding
that info in the xsl in an official location was better than tagging the
internal data structure (Be it Java, Perl or whatever).
Currently I'm doing it programatically, appending the value to the xsl
tree at read time, and having the code refer to that internally instead
of a data structure tag (which it was usually stored as anyway).

As such, my implimentation makes no difference to the files themselves,
or has any affect on other parsers. In fact it's purely implimentation
unique.

My interest was along the lines of - If I'm going to memoise this
information somewhere, why not put it in a nice standards-friendly way?

Thanks for your interest.

.dan.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

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