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: Re: DOCBOOK-APPS: Re: Chunking changes

On Tue, Oct 08, 2002 at 09:28:03AM -0400, Norman Walsh wrote:
> 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
> stream.
> | And chunkfn also selects '.' to form the filename.
> | Shouldn't it also select $content?  
> Nope.
> | 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?
> Because....
> 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?

Yes, that clears it up.  I thought the changes were to
support arbitrary chunks being passed to the chunk
processor, but that is not the case.  A chunk
is still a properly identified chunk element, but the
customization lets you manipulate that element in
your own fashion before making the chunked file.


Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
Caldera International, Inc.                 fax:   (831) 429-1887
                                            email: bobs@caldera.com

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

Powered by eList eXpress LLC