Sha256: 57cbd6c77ae74200b74cc7c075f4a416ff7647f542a460e601bd676f28f357c8
Contents?: true
Size: 1004 Bytes
Versions: 3
Compression:
Stored size: 1004 Bytes
Contents
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet exclude-result-prefixes="#all" version="2.0" xmlns:x="http://www.jenitennison.com/xslt/xspec" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- Makes absolute URI from @schematron and resolves it with catalog. Output XML structure is for Ant <xmlproperty> task. --> <xsl:template as="element(xspec)" match="document-node()"> <xspec> <schematron> <uri> <!-- Resolve with node base URI --> <xsl:variable as="xs:anyURI" name="schematron-uri" select="/x:description/@schematron/resolve-uri(., base-uri())" /> <!-- Resolve with calalog --> <xsl:variable as="xs:anyURI" name="schematron-uri" select="doc($schematron-uri)/base-uri()" /> <!-- Can be 'file:C:/...' for some reason. Fix it. --> <xsl:value-of select="replace($schematron-uri, '^(file:)([^/])', '$1/$2')" /> </uri> </schematron> </xspec> </xsl:template> </xsl:stylesheet>
Version data entries
3 entries across 3 versions & 1 rubygems