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: Re: [docbook-apps] HTML Chunking confusion...


Bob 

Good of you to not chide me for failing to mention which version of the stylesheets I was using. I was thinking I had just missed something clever :) Bug report will be filed asap.

Moving the code to the namespaced stylesheets for sanity's sake.

The stylesheet declares the namespace so checking in both no namespace and the docbook is plausible if a little odd in a namespace free environment. Replacing the test with something like ($node/ancestor::section|$node/ancestor::db:section) might do the job I guess.

nic

On 7 Aug 2011, at 17:43, Bob Stayton wrote:

> Hi Nic,
> I think your assessment is correct that the find.chunks template that generates the chunk.hierarchy is processing the original namespaced nodes when it calls the "chunk" template.  So preceding-sibling::section would not be matched in that round of processing.  This looks like a bug in fast chunking.   You should file a bug report on it and I'll look at it in more detail when I get back from my trip.
> 
> This is another example of why the name-spaced version of the stylesheets should be used with namespaced content.  While the namespace stripping process basically works to handle a namespaced document with the non-namespaced stylesheet, there are several edge cases like this using internal node sets where it gets more complicated.
> 
> Bob Stayton
> Sagehill Enterprises
> bobs@sagehill.net
> 
> 
> ----- Original Message ----- From: "Nic Gibson" <nicg@corbas.net>
> To: <docbook-apps@lists.oasis-open.org>
> Sent: Friday, August 05, 2011 5:48 AM
> Subject: [docbook-apps] HTML Chunking confusion...
> 
> 
> Hi all
> 
> I'm looking at adding some additional logic to the chunking code because we need some additional nodes to create chunks. I'm overriding the named 'chunk' template from chunk-common.xsl. I've been trying to work out why changing the value of chunk.section.depth does nothing in my code. I solved that but came up with something that I'm not sure about. The following is from the chunk template (reformatted for readability)
> 
> <xsl:when test="local-name($node) = 'section'
> and $chunk.section.depth &gt;= count($node/ancestor::section)+1
> and ($chunk.first.sections != 0   or count($node/preceding-sibling::section) &gt; 0)">
> 
> <xsl:call-template name="chunk">
>              <xsl:with-param name="node" select="$node/parent::*"/>
>              </xsl:call-template>
> </xsl:when>
> 
> I'm using chunkfast.xsl. The chunk template is called by the template which finds chunks (<xsl:template match="*" mode="chunk-filename"/> in chunk-code.xsl). As far as I can see, with a namespaced document, chunkfast.xsl will populate it's tracking variable (chunk.hierarchy) by processing the input before namespaces are stripped. So, how does " count($node/ancestor::section)" ever count anything? What have I missed?
> 
> 
> 
> thanks (from a confused)
> 
> 
> nic
> --
> Nic Gibson
> Corbas Consulting
> Digital Publishing Consultancy and Training
> http://www.corbas.co.uk, +44 (0)7718 906817
> 
> Nic Gibson
> Corbas Consulting
> Digital Publishing Consultancy and Training
> http://www.corbas.co.uk, +44 (0)7718 906817
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> 
> 
> 

Nic Gibson
Corbas Consulting
Digital Publishing Consultancy and Training
http://www.corbas.co.uk, +44 (0)7718 906817	
	



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