summaryrefslogtreecommitdiff
path: root/xslt/mallard/common
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2009-06-01 02:58:51 -0500
committerShaun McCance <shaunm@gnome.org>2009-06-01 02:58:51 -0500
commitb6eb32f41becc5550c1f512ea7635de786d7ac3b (patch)
tree0935d18b820fc2749881fe1f79565181a72bca11 /xslt/mallard/common
parentbe7d9e4a7349bc10bd9c162b5a4b306872b17b43 (diff)
downloadyelp-tools-b6eb32f41becc5550c1f512ea7635de786d7ac3b.tar.gz
Build and stylesheet changes prepping for Yelp work
Diffstat (limited to 'xslt/mallard/common')
-rw-r--r--xslt/mallard/common/Makefile.am2
-rw-r--r--xslt/mallard/common/mal-chunk.xsl85
-rw-r--r--xslt/mallard/common/mal-link.xsl4
3 files changed, 88 insertions, 3 deletions
diff --git a/xslt/mallard/common/Makefile.am b/xslt/mallard/common/Makefile.am
index 9c808fc..9501408 100644
--- a/xslt/mallard/common/Makefile.am
+++ b/xslt/mallard/common/Makefile.am
@@ -1,5 +1,5 @@
xsldir=$(datadir)/xml/gnome/xslt/mallard/common
-xsl_DATA = mal-link.xsl
+xsl_DATA = mal-chunk.xsl mal-link.xsl
EXTRA_DIST=$(xsl_DATA)
diff --git a/xslt/mallard/common/mal-chunk.xsl b/xslt/mallard/common/mal-chunk.xsl
new file mode 100644
index 0000000..72531c3
--- /dev/null
+++ b/xslt/mallard/common/mal-chunk.xsl
@@ -0,0 +1,85 @@
+<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
+<!--
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option) any
+later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this program; see the file COPYING.LGPL. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ extension-element-prefixes="exsl"
+ version="1.0">
+
+<!--!!==========================================================================
+Chunking
+
+REMARK: Describe this module
+-->
+
+
+<!--@@==========================================================================
+mal.chunk.chunk_top
+Whether the top-level page should be output with the chunking mechanism
+
+REMARK: Describe what this does
+-->
+<xsl:param name="mal.chunk.chunk_top" select="false()"/>
+
+
+<!--@@==========================================================================
+mal.chunk.extension
+The default file extension for new output documents
+
+REMARK: Describe what this does
+-->
+<xsl:param name="mal.chunk.extension"/>
+
+
+<!--@@==========================================================================
+mal.chunk.doctype_public
+The public DOCTYPE for output files
+
+REMARK: Describe this
+-->
+<xsl:param name="mal.chunk.doctype_public"/>
+
+
+<!--@@==========================================================================
+mal.chunk.doctype_system
+The system DOCTYPE for output files
+
+REMARK: Describe this
+-->
+<xsl:param name="mal.chunk.doctype_system"/>
+
+
+<!--**==========================================================================
+mal.chunk
+Creates a new page of output
+$node: The source element for the output page
+$href: The name of the file for the output page
+
+REMARK: Describe
+-->
+<xsl:template name="mal.chunk">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="href" select="concat($node/@id, $mal.chunk.extension)"/>
+ <exsl:document href="{$href}"
+ doctype-public="{$mal.chunk.doctype_public}"
+ doctype-system="{$mal.chunk.doctype_system}">
+ <xsl:apply-templates mode="mal.chunk.content.mode" select="$node"/>
+ </exsl:document>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xslt/mallard/common/mal-link.xsl b/xslt/mallard/common/mal-link.xsl
index de5817d..fd00a77 100644
--- a/xslt/mallard/common/mal-link.xsl
+++ b/xslt/mallard/common/mal-link.xsl
@@ -127,12 +127,12 @@ $href: The #{href} attribute of ${link}
<xsl:variable name="pageid" select="substring-before($xref, '#')"/>
<xsl:variable name="sectionid" select="substring-after($xref, '#')"/>
<xsl:if test="$pageid != ''">
- <xsl:value-of select="concat($pageid, $mal.extension)"/>
+ <xsl:value-of select="concat($pageid, $mal.chunk.extension)"/>
</xsl:if>
<xsl:value-of select="concat('#', $sectionid)"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="concat($xref, $mal.extension)"/>
+ <xsl:value-of select="concat($xref, $mal.chunk.extension)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>