]> granicus.if.org Git - docbook-dsssl/commitdiff
Made make-catalog.xsl general-purpose and moved to releasetools
authorMichael Smith <xmldoc@users.sourceforge.net>
Mon, 3 Oct 2005 04:54:27 +0000 (04:54 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Mon, 3 Oct 2005 04:54:27 +0000 (04:54 +0000)
dir so it can be used with other modules.

releasetools/Targets.mk
releasetools/Variables.mk
releasetools/make-catalog.xsl [new file with mode: 0644]
xsl/common/make-catalog.xsl [deleted file]

index cdeebcb27f4244d84c3d4ba705fbf214f1968b80..786a729c7713df22e0e87c2653fd7a85094be01e 100644 (file)
@@ -22,10 +22,13 @@ RELEASE-NOTES.pdf: RELEASE-NOTES.xml
        done
 
 install.sh: .CatalogManager.properties.example .urilist
-       cp -p $(INSTALL_SH) install.sh
+       cp $(INSTALL_SH) install.sh
 
-catalog.xml: $(DISTRIB_MAKECATALOG)
-       $(XSLT) -output catalog.xml $(DISTRIB_MAKECATALOG) $(DISTRIB_MAKECATALOG)
+.make-catalog.xsl: $(MAKECATALOG)
+       cp $< $@
+
+catalog.xml: .make-catalog.xsl
+       $(XSLT) -output $@ $< $< DISTRO="$(DISTRO)"
 
 distrib: all $(DISTRIB_DEPENDS) RELEASE-NOTES.txt RELEASE-NOTES.pdf $(NEWSFILE) install.sh
 
@@ -186,3 +189,4 @@ release-clean: clean
        rm -f install.sh
        rm -f .CatalogManager.properties.example
        rm -f .urilist
+       rm -f .make-catalog.xsl
index 20f7b34bbe0d0d4708133fe524afcba203e0d85f..7c77b79cc0f3775c8ba503b75b0451219e174762 100644 (file)
@@ -10,6 +10,7 @@
 
 CATALOGMANAGER=$(DOCBOOK_CVS)/releasetools/.CatalogManager.properties.example
 INSTALL_SH=$(DOCBOOK_CVS)/releasetools/install.sh
+MAKECATALOG=$(DOCBOOK_CVS)/releasetools/make-catalog.xsl
 
 # stylesheet for generating HTML version of release notes
 DOC-LINK-STYLE=$(DOCBOOK_CVS)/xsl/docsrc/doc-link-docbook.xsl
@@ -95,7 +96,8 @@ ZIP_EXCLUDES = \
  Makefile$$ \
  Makefile[.] \
  README\.CVS \
- RELEASE-NOTES\.fo
+ RELEASE-NOTES\.fo \
+ \.make-catalog\.xsl
 
 # list of executables that are included in all distributions
 EXECUTABLES = install.sh
diff --git a/releasetools/make-catalog.xsl b/releasetools/make-catalog.xsl
new file mode 100644 (file)
index 0000000..8a3d2cd
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fm="http://freshmeat.net/projects/freshmeat-submit/"
+                exclude-result-prefixes="fm"
+                version='1.0'>
+
+<xsl:output indent="yes"/>
+
+<!-- ********************************************************************
+     $Id$
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:include href="VERSION"/>
+<xsl:param name="PROJECT">
+  <xsl:value-of select="string(document('VERSION')//fm:Project[1])"/>
+</xsl:param>
+<xsl:param name="BRANCH">
+  <xsl:value-of select="string(document('VERSION')//fm:Branch[1])"/>
+</xsl:param>
+<xsl:param name="URI_BASE">http://docbook.sourceforge.net/release</xsl:param>
+<xsl:param name="DISTRO"/>
+<xsl:param name="SUBDIR">current</xsl:param>
+
+<xsl:param name="COMMENT">
+  <xsl:text> XML Catalog file for </xsl:text>
+  <xsl:value-of select="$PROJECT"/>
+  <xsl:text> </xsl:text>
+  <xsl:value-of select="$BRANCH"/>
+  <xsl:text> v</xsl:text><xsl:value-of select="$VERSION"/>
+  <xsl:text> </xsl:text>
+</xsl:param>
+
+<xsl:template match="/">
+
+  <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+    <xsl:text>&#10;</xsl:text>
+    <xsl:comment><xsl:value-of select="$COMMENT"/></xsl:comment>
+
+    <rewriteURI uriStartString="{$URI_BASE}/{$DISTRO}/{$SUBDIR}/" rewritePrefix="./"/>
+    <rewriteSystem systemIdStartString="{$URI_BASE}/{$DISTRO}/{$SUBDIR}/" rewritePrefix="./"/>
+
+    <rewriteURI uriStartString="{$URI_BASE}/{$DISTRO}/{$VERSION}/" rewritePrefix="./"/>
+    <rewriteSystem systemIdStartString="{$URI_BASE}/{$DISTRO}/{$VERSION}/" rewritePrefix="./"/>
+
+  </catalog>
+
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xsl/common/make-catalog.xsl b/xsl/common/make-catalog.xsl
deleted file mode 100644 (file)
index 97de15c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
-
-<xsl:output indent="yes"/>
-
-<!-- ********************************************************************
-     $Id$
-     ********************************************************************
-
-     This file is part of the XSL DocBook Stylesheet distribution.
-     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
-     and other information.
-
-     ******************************************************************** -->
-
-<!-- ==================================================================== -->
-
-<xsl:include href="../VERSION"/>
-
-<xsl:template match="/">
-
-  <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
-    <xsl:text>&#10;</xsl:text>
-    <xsl:comment>  XML Catalog file for DocBook XSL Stylesheets distribution </xsl:comment>
-
-    <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
-    <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
-
-    <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/{$VERSION}/" rewritePrefix="./"/>
-    <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/{$VERSION}/" rewritePrefix="./"/>
-
-  </catalog>
-
-</xsl:template>
-
-</xsl:stylesheet>