Project

Profile

Help

java.lang.NullPointerException while streaming » Example1.xsl

Gerben Abbink, 2014-04-24 20:13

 
<?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"
exclude-result-prefixes="#all"
version="3.0">
<xsl:output method="xml"/>
<xsl:template match="/">
<xsl:stream href="Example1.xml">
<count>
<xsl:for-each select="BookCatalogue">
<xsl:iterate select="Book">
<xsl:param name="count" select="0" as="xs:decimal"/>
<xsl:on-completion>
<xsl:value-of select="$count"/>
</xsl:on-completion>
<xsl:next-iteration>
<xsl:with-param name="count" select="$count+1"/>
</xsl:next-iteration>
</xsl:iterate>
</xsl:for-each>
</count>
</xsl:stream>
</xsl:template>
</xsl:stylesheet>
(1-1/3)