Project

Profile

Help

Bug #2021 ยป Public_Map_Error.xsl

David Rudel, 2014-03-10 18:35

 
<?xml version="1.0" encoding="UTF-8" ?>

<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://saxon.sf.net/"
xmlns:map="http://www.w3.org/2005/xpath-functions/map"
>

<xsl:variable name="path" select="replace(base-uri(),'(.*/)[^/]+?.xml','$1')"/>
<xsl:variable name="empty.map" as="map(*)">
<xsl:map/>
</xsl:variable>
<xsl:variable name="problem.map" as="map(*)">
<xsl:map>
<xsl:variable name="a" select="$empty.map(1)/@a"/>
<xsl:variable name="b" select="$empty.map($a)"/>
<xsl:map-entry key="1">
<xsl:for-each select="$b">
<xsl:variable name="c" select="$empty.map($a)"/>
<xsl:sequence select="."/>
</xsl:for-each>
</xsl:map-entry>
</xsl:map>
</xsl:variable>
<xsl:template match="/">
<xsl:result-document href="{$path||'output.xml'}">
<xsl:value-of select="map:keys($problem.map)"/>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>
    (1-1/1)