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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Rethinking XSLT 2.0 design


Hi folks,

I'm going to be turning my hands to the XSLT 2.0 stylesheets for
DocBook again soon, partly with an eye towards making them more
production ready, partly to try a few experiments.

When I set out on the XSLT 2.0 reimplementation, I had in mind a
design where there'd be a "normalization" phase that does some cleanup
followed by a processing phase that does the actual work.

For example, normalization turns

  <section><title>foo</title>...

into

  <section><info><title>foo</title></info>...

so that subsequent processing can know that the title is
section/info/title.

After several years of experience, I've come to the conclusion that
that was a mostly bad idea.

1. It's very expensive. The entire document gets processed at least
twice. While the idea of simplifying the "downstream" design seemed
very attractive, I think the cost is too high.

2. It doesn't actually simplify things. Oh, in theory it does, but in
practice, it's harder to debug because the document you're looking at
isn't actually the one being styled.

3. That problem extends to the actual users as well, if something goes
wrong, the error messages don't reflect the document that the user
actually sent to the stylesheets.

4. I made a DB4 to DB5 conversion phase part of that normalization,
and that makes the problems even worse (three phases, an even broader
disconnect).

So my initial plan is to look at breaking things down so that the
processing is more direct. I'll probably keep the normalization phases
around as separate stylesheets.

I reserve the right to change my mind again when I get underway :-)

Comments most welcome.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | It is a general error to imagine
http://www.oasis-open.org/docbook/ | the loudest complainers for the
Chair, DocBook Technical Committee | public to be the most anxious for
                                   | its welfare.--Edmund Burke, 1769

PGP signature



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