OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: DOCBOOK: Re: DOCBOOK-APPS: Help - Reseting the chapter numbering


> Said Norman Walsh <ndw@nwalsh.com>:
> 
> I'm torn about how to approach customization of the XSL stylesheets.
> My current intuition is that I should probably expand on the template
> approach so that there's a simple XML file that you write to indicate
> what you'd like the stylesheet to do, then an XSL stylesheet chews on
> that and spits out the customization layer that will do the right
> thing.
> 
> Off the top of my head, I don't even remember if the from attribute
> on xsl:number is an attribute-value-template.

It isn't, according to Michael Kay's book. It is a
pattern, one of only three XSL elements that use patterns.

I must admire your ambitious intuition. If I understand
your idea, you would basically be writing a stylesheet
generating system, based on input parameters provided by
the user.  You could sell something like that.

I'm not clear why you would want to use XSLT
to implement it, though.  I get confused enough with
XSLT writing out HTML. Using XSLT to write XSLT
that writes HTML gives me a headache. ;^)
It would be great if it works, that is, does what
each user wants. But if it doesn't, I think tracing
through why something doesn't work might be difficult.
It might end up being a black box that only you
can support.  But, hey, if you think you can pull it
off, most people would love it.

Myself, I would be happy if you used variables wherever
possible, and keep using XSLT "subroutines" like those in
common.xsl to modularize particular functions.  If
necessary, I can create a modified template or subroutine
to perform a customization that your parameters don't
support.  These go in the driver file that imports your
main stylesheet file, so that your distribution files don't
need to be touched.  Your job is to keep the templates from
interacting with each other too much.  That way I can make
small changes that don't break something else.

It isn't that hard to modify a template that someone else
wrote if it is well documented.  I would like to see more
of your <doc:template> elements inside the stylesheets
explaining how things work.  I would be willing to
contribute to that effort.  Think of your stylesheets as
one of the biggest and most accessible XSL training grounds
available.  They exercise a lot of the XSL spec,
and people learn quickly by example.

My 2 cents.

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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC