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]

[docbook-apps] Website DTD Patch: using tocskip for next and prev links


Hi all,

i am using tocskip attribute in layout.xml quite often to have a nice 
navigational menu with dummy entries which are linked to subsequent 
pages. 

But as website xsl stylesheets create next and prev links in the 
webpage footer and <link> tags in html <head> it doesn't  recognize 
the tocskip entry in layout.xml to skip it in those links, too.

Maybe there is a reason for this i can't see. But usually i like to 
skip these pages in next and previous links, too.

I introduced a new param sequential.links.with.tocskip to keep old 
behaviour as the default and changed some of the templates like 
next.page prev.page and so on.

Maybe this patch is useful for someone else and maybe it can be 
useful in the main distribution if it's worth it.

the diff file is attached to this mail. I hope attaching files is 
allowed.

kind regards,
Janning Vygen

-----------------------
PLANWERK 6 
websolutions

Herzogstraße 85
40215 Düsseldorf

fon 0211 - 601 59 19
fax 0211 - 601 59 17

vygen@planwerk6.de
http://www.planwerk6.de
-----------------------
diff ./param.xsl ../../website-2.5.0-patched/xsl/param.xsl
361,375d360
< <xsl:param name="sequential.links.with.tocskip" select="'1'"/>
< 
< <doc:param name="sequential.links.with.tocskip" xmlns="">
< <refpurpose>Keep tocentries with attribute tocskip in sequential flow
< of next and previous pages?</refpurpose>
< <refdescription>
< <para>The attribute tocskip (layout.dtd) is used to have dummy pages
< in the navigtional table. Those navigational entries are linked to the
< next page in sequential flow. This attribute applies this behaviour to
< "next page" and "previous page" links in the footer, html head and
< customization layers (using template "next.page")</para>
< </refdescription>
< </doc:param>
< 
< <!-- ==================================================================== -->
diff ./website-common.xsl ../../website-2.5.0-patched/xsl/website-common.xsl
584a585
> 
586c587
<                 select="$tocentry/following::tocentry[1]"/>
---
>                 select="$tocentry/following::tocentry[$sequential.links.with.tocskip or not(@tocskip = '1')][1]"/>
588c589
<                 select="$tocentry/descendant::tocentry[1]"/>
---
>                 select="$tocentry/descendant::tocentry[$sequential.links.with.tocskip or not(@tocskip = '1')][1]"/>
601a603
> 
611c613
<                         |$tocentry/ancestor::toc)[last()]"/>
---
>                         |$tocentry/ancestor::toc)[$sequential.links.with.tocskip or not(@tocskip = '1')][last()]"/>
613c615
<                 select="$tocentry/preceding-sibling::tocentry[1]"/>
---
>                 select="$tocentry/preceding-sibling::tocentry[$sequential.links.with.tocskip or not(@tocskip = '1')][1]"/>
646c648
<       <xsl:value-of select="$tocentry/ancestor::tocentry[1]/@id"/>
---
>       <xsl:value-of select="$tocentry/ancestor::tocentry[$sequential.links.with.tocskip or not(@tocskip = '1')][1]/@id"/>
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org.

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