| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | SPDX-FileCopyrightText: 2023 Bruno Victal <[email protected]> |
| 4 | SPDX-License-Identifier: ISC |
| 5 | |
| 6 | Fix uri attributes to point to paths in the store. |
| 7 | --> |
| 8 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
| 9 | <xsl:output method="xml"/> |
| 10 | <xsl:param name="prefix">/</xsl:param> |
| 11 | <!-- begin identity transform --> |
| 12 | <xsl:template match="@*|node()"> |
| 13 | <xsl:copy> |
| 14 | <xsl:apply-templates select="@*|node()"/> |
| 15 | </xsl:copy> |
| 16 | </xsl:template> |
| 17 | <!-- end identity transform --> |
| 18 | |
| 19 | <xsl:template match="@uri"> |
| 20 | <xsl:attribute name="uri"> |
| 21 | <xsl:value-of select="concat('file://', $prefix, '/', .)"/> |
| 22 | </xsl:attribute> |
| 23 | </xsl:template> |
| 24 | </xsl:stylesheet> |