Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 1329 → Rev 1330

/mozilla/common/deploy/update.xsl
0,0 → 1,50
<?xml version="1.0"?>
 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
 
<xsl:output indent="yes"/>
<xsl:param name="dir" />
<xsl:variable name="meta" select="document(concat($dir, '/meta.xml'))" />
 
<xsl:template match="/">
<r:RDF>
<xsl:for-each select="r:RDF/r:Description">
<xsl:variable name="updateLink">
<xsl:value-of select="em:homepageURL" /><xsl:value-of select="$meta//meta/xpiName" />
</xsl:variable>
 
<r:Description>
<xsl:attribute name="r:about">
<xsl:text>urn:mozilla:extension:</xsl:text>
<xsl:value-of select="em:id" />
</xsl:attribute>
<em:updates>
<r:Seq>
<r:li>
<r:Description>
<em:version><xsl:value-of select="em:version" /></em:version>
<xsl:for-each select="em:targetApplication">
<em:targetApplication>
<r:Description>
<em:id><xsl:value-of select="r:Description/em:id" /></em:id>
<em:minVersion><xsl:value-of select="r:Description/em:minVersion" /></em:minVersion>
<em:maxVersion><xsl:value-of select="r:Description/em:maxVersion" /></em:maxVersion>
<em:updateLink><xsl:copy-of select="$updateLink" /></em:updateLink>
</r:Description>
</em:targetApplication>
</xsl:for-each>
</r:Description>
</r:li>
</r:Seq>
</em:updates>
<em:version><xsl:value-of select="em:version" /></em:version>
<em:updateLink><xsl:copy-of select="$updateLink" /></em:updateLink>
<em:updateHash></em:updateHash>
</r:Description>
</xsl:for-each>
</r:RDF>
</xsl:template>
</xsl:stylesheet>