Project

Profile

Help

Bug #1992 ยป bug9.5.1.4.xsl

John Lumley, 2014-01-30 11:17

 
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:math="http://www.w3.org/2005/xpath-functions/math" xmlns:xp="http://saxonica.com/xpathParse"
exclude-result-prefixes="xs math" version="3.0">
<xsl:mode on-no-match="shallow-copy"/>
<xsl:function name="xp:is.AVT" as="xs:boolean">
<xsl:param name="test" as="attribute()"/>
<xsl:sequence select="contains($test,'{')"/>
</xsl:function>

<xsl:template match="@*[xp:is.AVT(.)]">
<xsl:attribute name="{local-name(.)}" select="'IS-AVT'||."/>
</xsl:template>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
    (1-1/1)