[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Trouble with value-of and node selection
Hi,
I'm hoping I can give you all enough information to point me in the
right direction with this.
This is a restating of my earlier problem with subversion keyword
substitution after some feedback from Claus Rasmussen. Thanks to the
feedback I have a better understanding of what it is I'm trying to
achieve - but not a full understanding...
What I'm trying to achieve is the inclusion of the value-of releaseinfo
from each article in the chunked output html files. For example, the
article background.xml is broken into 8 chunks and I would like the line
$Id: background.xml 555 2005-10-11 23:33:16Z gmp0 $ to be included in
the footer of each chunk. The article maintenance.xml is broken into 7
chunks and I would like the line $Id: maintenance.xml 508 2005-10-03
14:04:12Z gmp0 $ in the footer of each of these chunks.
From Claus I tried modifying my user.footer.navigation template without
success:
<xsl:template name="user.footer.navigation">
<xsl:param name="node" select="."/>
<p class="Footer"> Authorised by ...</p>
<p class="revisiondate">
<xsl:value-of select="ancestor::releaseinfo[1]"/>
</p>
</xsl:template>
The failure is the value-of not being included. The generated html
files include the line <p class="revisiondate"></p>.
I have also tried using ancestor-or-self::releaseinfo[1] without success.
Following the example at
http://www.sagehill.net/docbookxsl/HtmlCustomEx.html#HTMLHeaders I can
include the releaseinfo data from book/bookinfo in the footer of every
html file, but this does not reflect the commit date of the article that
contains the content being displayed.
The details of my project are:
In book.xml (DTD 4.3) I have:
<book>
<title>Foo</title>
<bookinfo>
...
<releaseinfo>$Id: book.xml 525 2005-10-11 09:48:16Z gmp0 $</releasinfo>
</bookinfo>
<preface>
...
</preface>
<xi:include href="background.xml" .../>
<xi:include href="maintenance.xml" .../>
...
<xi:include href="glossary.xml" .../>
</book>
In each of my articles I have:
<article>
<title>Foo2</title>
<articleinfo>
<releaseinfo>$Id: background.xml 555 2005-10-11 23:33:16Z gmp0
$</releaseinfo>
</articleinfo>
...
</article>
The $Id is a keyword substitution that occurs when each file is
committed to the Subversion repository. Each file has unique $Id value.
I have a lot of customisations spread throughout several different xsl
files. When I transform this book to html I call the
html_custom_layer.xsl file which has the following lines:
1 <xsl:import href="http://...url.../docbook/xsl/html/chunk.xsl"/>
2 <xsl:import href="http://...url.../custom/itr_custom_layer.xsl"/>
3 <xsl:import href="http://...url.../custom/itr_html_custom_layer.xsl"/>
4 <xsl:import href="custom_layer.xsl"/>
Where:
1 is the 1.68.1 stylesheet
2 contains department wide customisations for all outputs
- formal.title.placement
- xref.with.number.and.title
- use.role.for.mediaobject
- customised labelling for articles
- localisation for article custom labels
3 contains department wide html only customisations
- admon.*
- navig.*
- supress.(footer/header.)navigation 0
- template user.header.navigation
- template user.footer.navigation
- template header.navigation
- template footer.navigation
4 contains book only customisations
- draft.mode
Some extra things I looked at:
In user.footer.navigation I have tried using preceding::releaseinfo[1]
with some success, see ASCII art below
|------article1-($Id1)--|-----article2--($Id2)--|
|-file1-|-file2-|-file3-|-file4-|-file5-|-file6-|
|-no$Id-|-$Id1--|-$Id1--|-$Id1--|-$Id2--|-$Id2--|
When I tried using following::releaseinfo[1] in user.footer.navigation
it was different again...
|------article1-($Id1)--|-----article2--($Id2)--|
|-file1-|-file2-|-file3-|-file4-|-file5-|-file6-|
|-$Id2--|-$Id2--|-$Id2--|-$Id3--|-$Id3--|-$Id3--|
Geoff
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]