summaryrefslogtreecommitdiff
path: root/docs/xslt
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-03-12 22:34:38 +0000
committerGerald W. Carter <jerry@samba.org>2008-04-23 08:46:19 -0500
commit9c72dd78f25be4a7ffa5af5a242670ec76930d6f (patch)
tree719cf9faacc847b400354a33bfdf5a2d2cee4ca7 /docs/xslt
parent50834aa64b51b039724b34eb491013c4323946ff (diff)
downloadsamba-9c72dd78f25be4a7ffa5af5a242670ec76930d6f.tar.gz
samba-9c72dd78f25be4a7ffa5af5a242670ec76930d6f.tar.bz2
samba-9c72dd78f25be4a7ffa5af5a242670ec76930d6f.zip
Use new definition of <smbconfoption>, fixes a bunch of
validity errors. (This used to be commit 3eb5c35e47951f320f7c2f4cd478a95f6d48236e)
Diffstat (limited to 'docs/xslt')
-rw-r--r--docs/xslt/expand-sambadoc.xsl14
-rw-r--r--docs/xslt/generate-attributions.xsl3
-rw-r--r--docs/xslt/sambadoc2pearson.xsl8
-rw-r--r--docs/xslt/upgrade.pl10
4 files changed, 21 insertions, 14 deletions
diff --git a/docs/xslt/expand-sambadoc.xsl b/docs/xslt/expand-sambadoc.xsl
index e82f219cf4..39e9e0a16b 100644
--- a/docs/xslt/expand-sambadoc.xsl
+++ b/docs/xslt/expand-sambadoc.xsl
@@ -7,10 +7,8 @@
(C) Alexander Bokovoy 2002-2004
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:exsl="http://exslt.org/common"
xmlns:samba="http://samba.org/common"
- version="1.1"
- extension-element-prefixes="exsl">
+ version="1.1">
<xsl:import href="../settings.xsl"/>
@@ -83,18 +81,18 @@
<xsl:element name="member">
<xsl:element name="indexterm">
<xsl:element name="primary">
- <xsl:value-of select="name"/>
+ <xsl:value-of select="@name"/>
</xsl:element>
</xsl:element>
<xsl:element name="parameter">
<xsl:text disable-output-escaping="yes">
&lt;?latex \hspace{1cm} ?&gt;
</xsl:text>
- <xsl:value-of select="name"/>
+ <xsl:value-of select="@name"/>
<xsl:choose>
- <xsl:when test="value != ''">
+ <xsl:when test="text() != ''">
<xsl:text> = </xsl:text>
- <xsl:value-of select="value"/>
+ <xsl:value-of select="text()"/>
</xsl:when>
</xsl:choose>
</xsl:element>
@@ -126,7 +124,7 @@
<!-- Include an index term -->
<xsl:element name="indexterm">
<xsl:element name="primary">
- <xsl:value-of select="name"/>
+ <xsl:value-of select="@name"/>
</xsl:element>
</xsl:element>
diff --git a/docs/xslt/generate-attributions.xsl b/docs/xslt/generate-attributions.xsl
index 95650cfb77..a6e7f98e16 100644
--- a/docs/xslt/generate-attributions.xsl
+++ b/docs/xslt/generate-attributions.xsl
@@ -4,7 +4,6 @@
(C) Jelmer Vernooij 2003
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"
version="1.1">
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
@@ -57,7 +56,7 @@
<xsl:when test="affiliation/address/email != ''">
<xsl:text> &lt;</xsl:text>
<xsl:element name="ulink">
- <xsl:attribute name="samba:noescape">
+ <xsl:attribute name="noescape">
<xsl:text>1</xsl:text>
</xsl:attribute>
<xsl:attribute name="url">
diff --git a/docs/xslt/sambadoc2pearson.xsl b/docs/xslt/sambadoc2pearson.xsl
index d98e4485f0..23bc30985c 100644
--- a/docs/xslt/sambadoc2pearson.xsl
+++ b/docs/xslt/sambadoc2pearson.xsl
@@ -23,7 +23,7 @@
</xsl:template>
<xsl:template match="smbconfexample/smbconfoption|smbconfblock/smbconfoption">
- <xsl:text> </xsl:text><xsl:value-of select="name"/><xsl:text> = </xsl:text><xsl:value-of select="value"/><xsl:text>&#10;</xsl:text>
+ <xsl:text> </xsl:text><xsl:value-of select="@name"/><xsl:text> = </xsl:text><xsl:value-of select="text()"/><xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="smbconfexample">
@@ -78,10 +78,10 @@
</xsl:template>
<xsl:template match="smbconfoption">
- <code><xsl:value-of select="name"/></code>
- <xsl:if test="value != ''">
+ <code><xsl:value-of select="@name"/></code>
+ <xsl:if test="text() != ''">
<xsl:text> = </xsl:text>
- <xsl:value-of select="value"/>
+ <xsl:value-of select="text()"/>
</xsl:if>
<xsl:text>&#10;</xsl:text>
</xsl:template>
diff --git a/docs/xslt/upgrade.pl b/docs/xslt/upgrade.pl
new file mode 100644
index 0000000000..8f0a82f0e7
--- /dev/null
+++ b/docs/xslt/upgrade.pl
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+# Update documents to the Samba DTD V1.0
+
+undef $/;
+
+while(<>) {
+ s/<smbconfoption><name>(.*?)<\/name><value>(.*?)<\/value><\/smbconfoption>/<smbconfoption name=\"\1\">\2<\/smbconfoption>/g;
+ s/<smbconfoption><name>(.*?)<\/name><\/smbconfoption>/<smbconfoption name=\"\1\"\/>/g;
+ print $_;
+}