xsl param patch
- From: James Henstridge <james daa com au>
- To: gtk-doc-list gnome org
- Subject: xsl param patch
- Date: Thu, 08 Aug 2002 19:09:56 +0800
I would like to apply the attached patch to gtk-doc. If no one has any
objections, I will commit it in a few days.
This patch changes the way the "$module/" prefixes are added in the
index.sgml file when gtkdoc-mkhtml is running in XSLT mode. Instead of
postprocessing with sed, the module name is passed in as a parameter to
the style sheet, and the stylesheet adds prepends it. The main reason
for this is that I wanted the book name available for another addition I
will post soon (generation of .devhelp files).
James.
--
Email: james daa com au | Linux.conf.au http://linux.conf.au/
WWW: http://www.daa.com.au/~james/ | Jan 22-25 Perth, Western Australia.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk-doc/ChangeLog,v
retrieving revision 1.116
diff -u -p -r1.116 ChangeLog
--- ChangeLog 14 Jun 2002 17:19:45 -0000 1.116
+++ ChangeLog 8 Aug 2002 11:04:04 -0000
@@ -1,3 +1,11 @@
+2002-08-08 James Henstridge <james daa com au>
+
+ * gtk-doc.xsl: add a gtkdoc.bookname param, and include it in the
+ index.sgml output (if not empty).
+
+ * gtkdoc-mkhtml.in: only perform the sed operation if we are using
+ Jade, and pass the module name as a parameter when using xsltproc.
+
2002-06-14 jacob berkman <jacob ximian com>
* gtkdoc-mkdb.in: do the version check before help, so --version
Index: gtkdoc-mkhtml.in
===================================================================
RCS file: /cvs/gnome/gtk-doc/gtkdoc-mkhtml.in,v
retrieving revision 1.9
diff -u -p -r1.9 gtkdoc-mkhtml.in
--- gtkdoc-mkhtml.in 13 Jun 2002 17:22:25 -0000 1.9
+++ gtkdoc-mkhtml.in 8 Aug 2002 11:04:04 -0000
@@ -34,13 +34,13 @@ if test -f index.sgml; then
fi
if $is_xml; then
- @XSLTPROC@ --xinclude $gtkdocdir/gtk-doc.xsl $document
+ @XSLTPROC@ --xinclude --stringparam gtkdoc.bookname $module $gtkdocdir/gtk-doc.xsl $document
else
@JADE@ -t sgml -w no-idref -d $gtkdocdir/gtk-doc.dsl \
$gtkdocdir/gtk-doc.dcl $document
-fi
-sed s%href=\"%href=\"$module/% < index.sgml > index.sgml.tmp && mv index.sgml.tmp index.sgml
+ sed s%href=\"%href=\"$module/% < index.sgml > index.sgml.tmp && mv index.sgml.tmp index.sgml
+fi
echo "timestamp" > ../html.stamp
Index: gtk-doc.xsl
===================================================================
RCS file: /cvs/gnome/gtk-doc/gtk-doc.xsl,v
retrieving revision 1.1
diff -u -p -r1.1 gtk-doc.xsl
--- gtk-doc.xsl 13 Jun 2002 17:22:25 -0000 1.1
+++ gtk-doc.xsl 8 Aug 2002 11:04:05 -0000
@@ -18,6 +18,8 @@
<xsl:param name="refentry.generate.name" select="0"/>
<xsl:param name="refentry.generate.title" select="1"/>
+ <!-- this gets set on the command line ... -->
+ <xsl:param name="gtkdoc.bookname" select="''"/>
<!-- ========================================================= -->
<!-- template to create the index.sgml anchor index -->
@@ -46,6 +48,10 @@
<xsl:text><ANCHOR id="</xsl:text>
<xsl:value-of select="@id"/>
<xsl:text>" href="</xsl:text>
+ <xsl:if test="$gtkdoc.bookname">
+ <xsl:value-of select="$gtkdoc.bookname"/>
+ <xsl:text>/</xsl:text>
+ </xsl:if>
<xsl:call-template name="href.target"/>
<xsl:text>">
</xsl:text>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]