Revision 641,
801 bytes
checked in by gosiaw, 12 years ago
(diff) |
Auxiliary xslt which moves information about each debb component into a separate file
|
Rev | Line | |
---|
[641] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
| 2 | <xsl:stylesheet version="2.0" |
---|
| 3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
| 4 | <xsl:template match="/"> |
---|
| 5 | <!-- Copy everything about each DEBB into a separate file --> |
---|
| 6 | <xsl:for-each select="//*[ComponentId]"> |
---|
| 7 | |
---|
| 8 | <xsl:variable name="oldComponentId"> |
---|
| 9 | <xsl:value-of select="ComponentId" /> |
---|
| 10 | </xsl:variable> |
---|
| 11 | <!-- Remove slash from debb component id, as it causes problems --> |
---|
| 12 | <xsl:variable name="newComponentId"> |
---|
| 13 | <xsl:value-of select="translate($oldComponentId, '/', '_')" /> |
---|
| 14 | </xsl:variable> |
---|
| 15 | <xsl:value-of select="$newComponentId" /> |
---|
| 16 | |
---|
| 17 | <xsl:result-document method="xml" |
---|
| 18 | href="xml/debb_component_{$newComponentId}.xml" > |
---|
| 19 | <xsl:copy-of select="." /> |
---|
| 20 | </xsl:result-document> |
---|
| 21 | </xsl:for-each> |
---|
| 22 | </xsl:template> |
---|
| 23 | </xsl:stylesheet> |
---|
Note: See
TracBrowser
for help on using the repository browser.