This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

chunking all sections and links/xrefs


Hi there,
In my customization layer to the chunking stylesheets, I've hacked
chunk-common as shown below (working with v. 1.44) to cause it to chunk
all sections no matter how deep. So far so good. Unfortunately, now
links and xrefs from anyplace to text in a section or to a section no
longer work. The stylesheets report Error: no ID for constraint linkend:
blah. and the link is dead. 

I don't really understand how these stylesheets work. I was hoping that
by short circuiting the code that determines what a chunk is I could get
the desired result. Could someone point me in the right direction for
fixing the linking problem?

Thanks,
David

$ diff chunk-common.xsl chunk-common.hacked.xsl
51c51
< <xsl:param name="chunk.first.sections" select="'0'"/>
---
> <xsl:param name="chunk.first.sections" select="'1'"/>
110,122c110,111
<     <xsl:when test="$chunk.sections != 0
<                     and name($node)='sect1'
<                     and ($chunk.first.sections != 0
<                          or count($node/preceding-sibling::sect1) >
0)">
<       <xsl:text>1</xsl:text>
<     </xsl:when>
<     <xsl:when test="$chunk.sections != 0
<                     and name($node)='section'
<                     and count($node/parent::section) = 0
<                     and ($chunk.first.sections != 0
<                          or
count($node/preceding-sibling::section))>0">
<       <xsl:text>1</xsl:text>
<     </xsl:when>
---
>     <xsl:when test="name($node)='sect1'">1</xsl:when>
>     <xsl:when test="name($node)='section'">1</xsl:when>
778c767
<              |preceding::section[name(parent::*) != 'section'][1]
---
>              |preceding::section[1]
803c792
<              |following::section[name(parent::*) != 'section'][1]
---
>              |following::section[1]
823c812
<              |descendant::section[name(parent::*) !=
'section'][1])[1]"/>
---
>              |descendant::section[1])[1]"/>
964,965c953
<                      |/section
<                      |section[local-name(parent::*) != 'section']">
---
>                      |section">

Attachment: chunk-common.hacked.xsl
Description: chunk-common.hacked.xsl


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]