summaryrefslogtreecommitdiff
path: root/docs/xslt
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-06-12 16:31:19 +0000
committerGerald W. Carter <jerry@samba.org>2008-04-23 08:46:45 -0500
commitdc448bdfbb479a245028c6f2b30b32d3cc7f0b50 (patch)
treec7103888b886594d6a5cecee7e2872f86dba340f /docs/xslt
parentc8d6660c18545132e2fa975701e3f39e7d4d048b (diff)
downloadsamba-dc448bdfbb479a245028c6f2b30b32d3cc7f0b50.tar.gz
samba-dc448bdfbb479a245028c6f2b30b32d3cc7f0b50.tar.bz2
samba-dc448bdfbb479a245028c6f2b30b32d3cc7f0b50.zip
Get rid of unused elements, simply image handling
(This used to be commit 8fb0bb8ce4668ee0ed1e247dad57c9e9a5a233f6)
Diffstat (limited to 'docs/xslt')
-rw-r--r--docs/xslt/expand-sambadoc.xsl146
-rw-r--r--docs/xslt/extract-smbfiles.xsl41
-rw-r--r--docs/xslt/sambadoc2pearson.xsl4
3 files changed, 54 insertions, 137 deletions
diff --git a/docs/xslt/expand-sambadoc.xsl b/docs/xslt/expand-sambadoc.xsl
index 87806a2aa2..5ded8c703b 100644
--- a/docs/xslt/expand-sambadoc.xsl
+++ b/docs/xslt/expand-sambadoc.xsl
@@ -4,7 +4,6 @@
Published under the GNU GPL
(C) Jelmer Vernooij 2002-2004
- (C) Alexander Bokovoy 2002-2004
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"
@@ -152,101 +151,64 @@
<xsl:apply-templates/>
</xsl:template>
- <xsl:template match="smbfile">
- <xsl:apply-templates/>
- </xsl:template>
-
- <xsl:template match="image">
- <xsl:element name="figure">
- <xsl:attribute name="id">
- <xsl:choose>
- <xsl:when test="@id != ''">
- <xsl:value-of select="@id"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="imagefile"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
-
- <xsl:element name="title">
- <xsl:if test="imagedescription = ''">
- <xsl:message><xsl:text>imagedescription of image with id </xsl:text><xsl:value-of select="@id"/><xsl:text> is empty.</xsl:text></xsl:message>
- </xsl:if>
- <xsl:value-of select="imagedescription"/>
- </xsl:element>
- <xsl:element name="mediaobject">
- <xsl:element name="imageobject">
- <xsl:attribute name="role"><xsl:text>latex</xsl:text></xsl:attribute>
- <xsl:element name="imagedata">
- <xsl:attribute name="fileref">
- <xsl:value-of select="$latex.imagebasedir"/><xsl:text>images/</xsl:text><xsl:value-of select="imagefile"/></xsl:attribute>
- <xsl:attribute name="scale">
- <xsl:choose>
- <xsl:when test="@scale != ''">
- <xsl:value-of select="@scale"/>
- </xsl:when>
-
- <xsl:when test="imagefile/@scale != ''">
- <xsl:value-of select="imagefile/@scale"/>
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:text>50</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:attribute name="scalefit"><xsl:text>1</xsl:text></xsl:attribute>
- </xsl:element>
+ <xsl:template match="imagefile">
+ <xsl:element name="mediaobject">
+ <xsl:element name="imageobject">
+ <xsl:attribute name="role"><xsl:text>latex</xsl:text></xsl:attribute>
+ <xsl:element name="imagedata">
+ <xsl:attribute name="fileref">
+ <xsl:value-of select="$latex.imagebasedir"/><xsl:text>images/</xsl:text><xsl:value-of select="text()"/></xsl:attribute>
+ <xsl:attribute name="scale">
+ <xsl:choose>
+ <xsl:when test="@scale != ''">
+ <xsl:value-of select="@scale"/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:text>50</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="scalefit"><xsl:text>1</xsl:text></xsl:attribute>
</xsl:element>
- <xsl:element name="imageobject">
- <xsl:attribute name="role"><xsl:text>html</xsl:text></xsl:attribute>
- <xsl:element name="imagedata">
- <xsl:attribute name="fileref">
- <xsl:text>images/</xsl:text><xsl:value-of select="imagefile"/><xsl:text>.png</xsl:text></xsl:attribute>
- <xsl:attribute name="scale">
- <xsl:choose>
- <xsl:when test="@scale != ''">
- <xsl:value-of select="@scale"/>
- </xsl:when>
-
- <xsl:when test="imagefile/@scale != ''">
- <xsl:value-of select="imagefile/@scale"/>
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:text>100</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:attribute name="scalefit"><xsl:text>1</xsl:text></xsl:attribute>
- </xsl:element>
+ </xsl:element>
+ <xsl:element name="imageobject">
+ <xsl:attribute name="role"><xsl:text>html</xsl:text></xsl:attribute>
+ <xsl:element name="imagedata">
+ <xsl:attribute name="fileref">
+ <xsl:text>images/</xsl:text><xsl:value-of select="imagefile"/><xsl:text>.png</xsl:text></xsl:attribute>
+ <xsl:attribute name="scale">
+ <xsl:choose>
+ <xsl:when test="@scale != ''">
+ <xsl:value-of select="@scale"/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:text>100</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="scalefit"><xsl:text>1</xsl:text></xsl:attribute>
</xsl:element>
- <xsl:element name="imageobject">
- <xsl:element name="imagedata">
- <xsl:attribute name="fileref">
- <xsl:text>images/</xsl:text><xsl:value-of select="imagefile"/><xsl:text>.png</xsl:text></xsl:attribute>
- <xsl:attribute name="scale">
- <xsl:choose>
- <xsl:when test="@scale != ''">
- <xsl:value-of select="@scale"/>
- </xsl:when>
-
- <xsl:when test="imagefile/@scale != ''">
- <xsl:value-of select="imagefile/@scale"/>
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:text>50</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:attribute name="scalefit"><xsl:text>1</xsl:text></xsl:attribute>
- </xsl:element>
+ </xsl:element>
+ <xsl:element name="imageobject">
+ <xsl:element name="imagedata">
+ <xsl:attribute name="fileref">
+ <xsl:text>images/</xsl:text><xsl:value-of select="imagefile"/><xsl:text>.png</xsl:text></xsl:attribute>
+ <xsl:attribute name="scale">
+ <xsl:choose>
+ <xsl:when test="@scale != ''">
+ <xsl:value-of select="@scale"/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:text>50</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="scalefit"><xsl:text>1</xsl:text></xsl:attribute>
</xsl:element>
-
</xsl:element>
</xsl:element>
</xsl:template>
-
</xsl:stylesheet>
diff --git a/docs/xslt/extract-smbfiles.xsl b/docs/xslt/extract-smbfiles.xsl
deleted file mode 100644
index 997320de4a..0000000000
--- a/docs/xslt/extract-smbfiles.xsl
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version='1.0'?>
-<!-- vim:set sts=2 shiftwidth=2 syntax=xml: -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:exsl="http://exslt.org/common"
- xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"
- version="1.1"
- extension-element-prefixes="exsl">
-
-<xsl:output method="xml"/>
-
-<!-- Parse all varlistentries and extract those of them which are descriptions of smb.conf
- parameters. We determine them by existence of <anchor> element inside <term> element.
- If <anchor> is there, then its 'id' attribute is translated to lower case and is used
- as basis for file name for that parameter.
--->
-<xsl:template match="smbfile">
- <!-- reconstruct varlistentry - not all of them will go into separate files
- and also we must repair the main varlistentry itself.
- -->
- <xsl:variable name="content">
- <xsl:apply-templates/>
- </xsl:variable>
- <!-- Now put varlistentry into separate file _if_ it has anchor associated with it -->
- <xsl:variable name="filename"><xsl:text>output/examples/</xsl:text><xsl:value-of select="@name"/></xsl:variable>
- <!-- Debug message for an operator, just to show progress of processing :) -->
- <xsl:message>
- <xsl:text>Writing </xsl:text>
- <xsl:value-of select="$filename"/>
- </xsl:message>
- <!-- Write finally varlistentry to a separate file -->
- <exsl:document href="{$filename}"
- method="xml"
- encoding="UTF-8"
- indent="yes"
- omit-xml-declaration="yes">
- <xsl:copy-of select="$content"/>
- </exsl:document>
-</xsl:template>
-
-</xsl:stylesheet>
-
diff --git a/docs/xslt/sambadoc2pearson.xsl b/docs/xslt/sambadoc2pearson.xsl
index 23bc30985c..5028d05064 100644
--- a/docs/xslt/sambadoc2pearson.xsl
+++ b/docs/xslt/sambadoc2pearson.xsl
@@ -13,10 +13,6 @@
<xsl:strip-space elements="smbconfoption smbconfsection"/>
- <xsl:template match="smbfile">
- <xsl:apply-templates/>
- </xsl:template>
-
<xsl:template match="smbconfexample/smbconfsection|smbconfblock/smbconfsection">
<xsl:text>&#10;</xsl:text>
<xsl:value-of select="."/><xsl:text>&#10;</xsl:text>