On Fri, Feb 16, 2001 at 09:04:17AM +0100, Pavel Hlavnicka wrote:
>
> in several messages you have written, I can see similar desires. You are
> always trying somethink like "dynamic" xslt processing. It is generraly
That's me. ;-)
However I think that the methods I use now are very static.
> 2. Decide what you are going to do before you run the processor and feed
> it with appropriate data, including stylesheets.
>
> we prefer the second solution. According your example, out template
> would have always the same name (e.g. 'inner') and is included like
> <xsl:include href="arg:/inner"/>. In this case you have to decide which
> template you need pass into sablotron before running it.
I've fully accepted this approach, also thanks to the communication
with you and the Charlie people. I have no problem with that and
I believe it works fine for me. Instead of the arg: approach I use
AxKit's provider feature, allowing me to map whatever template I
want, but it's still the same thing -- provide different templates to
produce different presenations (and different templates for the same
matches or with the same names) and provide the via external handlers
(arg: that need to be filled properly or file providers that set the
filenames during the "resolve" stage).
When it comes to practical solutions, it is necessary to structure the
templates well. Some of the things are to be modified by different
design while others should stay the same. Take the example of buletted
(<UL><LI></UL>) lists. You might want to have different template files
to create the lists using various markup -- the <UL>, using <IMG> with
SRC pointing to PNG with the bulled, and many others. But the content
of the list, the rows, should be handled by common template because it
shouldn't be affected by the design.
It that sense, I need to pass in the information about what template
to use for those single rows of the lists. You say I should avoid
doing this? But don't you loose the whole lot of flexibility of the
XSLT templating?
> Do not use XSLT for programming, you'll always meet some significant
> limitation.
I'm trying to push XSLT to its limits before reverting to other
methods. It seems kinda cleaner. Sorry if the questions I post are
naive.
Yours,
--
------------------------------------------------------------------------
Honza Pazdziora | [EMAIL PROTECTED] | http://www.fi.muni.cz/~adelton/
.project: Perl, mod_perl, DBI, Oracle, auth. WWW servers, XML/XSL, ...
Petition for a Software Patent Free Europe http://petition.eurolinux.org
------------------------------------------------------------------------