summaryrefslogtreecommitdiff
path: root/Build/cdbuild/updatetpm.xsl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2005-12-27 23:56:17 +0000
committerKarl Berry <karl@freefriends.org>2005-12-27 23:56:17 +0000
commit577983747d8680b8defbfdd03a9d50bad6fd54b7 (patch)
tree16b160f53c6c4c309c07db2c5b095d3abb16f69a /Build/cdbuild/updatetpm.xsl
parent07fed0169bae91dfb5616f9d19e7969727e19d4d (diff)
initial Build
git-svn-id: svn://tug.org/texlive/trunk@4 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/cdbuild/updatetpm.xsl')
-rw-r--r--Build/cdbuild/updatetpm.xsl102
1 files changed, 102 insertions, 0 deletions
diff --git a/Build/cdbuild/updatetpm.xsl b/Build/cdbuild/updatetpm.xsl
new file mode 100644
index 00000000000..4e4a205d3c7
--- /dev/null
+++ b/Build/cdbuild/updatetpm.xsl
@@ -0,0 +1,102 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:TPM="http://texlive.dante.de/"
+ version="1.0">
+
+<xsl:param name="TMP"/>
+<xsl:param name="binaries"/>
+<xsl:param name="files"/>
+<xsl:param name="Who"/>
+<xsl:param name="When"/>
+<xsl:output indent="yes"
+ method="xml"
+ omit-xml-declaration="yes"
+ doctype-system="../tpm.dtd"/>
+<xsl:template match="*|@*|processing-instruction()">
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="TPM:Size"/>
+<xsl:template match="TPM:Title">
+ <xsl:copy-of select="."/>
+ <TPM:Size><xsl:value-of select="sum(//TPM:*/@size)"/></TPM:Size>
+</xsl:template>
+
+<xsl:template match="TPM:Date">
+ <TPM:Date><xsl:value-of select="$When"/></TPM:Date>
+</xsl:template>
+
+<xsl:template match="TPM:Creator">
+ <TPM:Creator><xsl:value-of select="$Who"/></TPM:Creator>
+</xsl:template>
+
+<xsl:template match="text()">
+ <xsl:value-of select="."/> <!-- could normalize() here -->
+</xsl:template>
+
+<xsl:template match="TPM:BinFiles">
+<xsl:choose>
+<xsl:when test="$binaries">
+<xsl:if test="not(preceding-sibling::TPM:BinFiles)">
+ <xsl:message>add binaries for <xsl:value-of select="../TPM:Name"/></xsl:message>
+ <xsl:for-each
+ select="document(concat('/texlive/Build/cdbuild/list.',../TPM:Name))/bin/*">
+ <xsl:copy-of select="."/>
+ </xsl:for-each>
+</xsl:if>
+</xsl:when>
+<xsl:otherwise>
+ <xsl:copy-of select="."/>
+</xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
+
+<xsl:template match="TPM:DocFiles">
+<xsl:choose>
+<xsl:when test="$files">
+ <xsl:for-each
+ select="document(concat($TMP,../TPM:Name,'.doc'))/*">
+ <xsl:copy-of select="."/>
+ </xsl:for-each>
+</xsl:when>
+<xsl:otherwise>
+ <xsl:copy-of select="."/>
+</xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
+<xsl:template match="TPM:RunFiles">
+<xsl:choose>
+<xsl:when test="$files">
+ <xsl:for-each
+ select="document(concat($TMP,../TPM:Name,'.run'))/*">
+ <xsl:copy-of select="."/>
+ </xsl:for-each>
+</xsl:when>
+<xsl:otherwise>
+ <xsl:copy-of select="."/>
+</xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
+<xsl:template match="TPM:SourceFiles">
+<xsl:choose>
+<xsl:when test="$files">
+ <xsl:for-each
+ select="document(concat($TMP,../TPM:Name,'.src'))/*">
+ <xsl:copy-of select="."/>
+ </xsl:for-each>
+</xsl:when>
+<xsl:otherwise>
+ <xsl:copy-of select="."/>
+</xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
+
+
+</xsl:stylesheet>
+