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] | [Elist Home]

Subject: DOCBOOK-APPS: Re: Chunking changes

Hash: SHA1

/ Bob Stayton <bobs@caldera.com> was heard to say:
| This looks very useful.  One thing I'm not clear about,
| though. Is customizing the template named "chunk" in
| chunk-common.xsl part of the process?  That's the template
| that tests whether an element is a chunk.  That's a pretty
| big template to customize, but it must be necessary since
| something won't chunk if it doesn't pass that test.

Yes. I think I should probably re-work that as match templates in a mode.

| And doesn't the "process-chunk" template need to be modified to
| change the 'ischunk' test?  It is currently passing the
| context node to the chunk template rather than the
| value of $content, which is what should be tested, no?

No, $content is just the transformed result that should be used for
the context node. (Note it's $content not $context :-) If it's a
chunk, then it goes in a chunk, otherwise it just goes in the output

| And chunkfn also selects '.' to form the filename.
| Shouldn't it also select $content?  


| Or maybe I'm misunderstanding what $content is supposed to
| be.

It's just what you would have gotten from <apply-imports/> if you had
done that.

Why is this necessary?


1. Chunking relies on calling <apply-imports/> to get the base transformation
   for a given node.

2. The chunk stylesheet relies on matching against 'element', doing some stuff,
   and then calling apply-imports.

3. But if you override the match template for 'element' in order to change how
   it's transformed, you can never get to step '2'. (If you use apply-imports
   to get there, then you get the formatting of the base stylesheet, not the
   formatting you wanted.)

So now you can test for chunking in your own template that overrides 'element'
and pass down the formatted result that you want to use. Whew.

Make any sense at all?

                                        Be seeing you,

P.S. It's definitely confusing. It took me a solid day to think my way
through to a solution to the "can't override a template when chunking"
problem. I even started composing a message to Jeni asking for help
before the solution occurred to me :-)

- -- 
Norman Walsh <ndw@nwalsh.com>      | Our ignorance of history makes us
http://www.oasis-open.org/docbook/ | libel our own times. People have
Chair, DocBook Technical Committee | always been like this.--Flaubert
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>


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

Powered by eList eXpress LLC