File:  [parser3project] / parser3 / tests / 296.html
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Sun Oct 20 18:36:08 2013 UTC (12 years, 10 months ago) by moko
Branches: MAIN
CVS tags: HEAD
test for xsl exception for issue #938 added.

@main[]

$document[^xdoc::create{<?xml version="1.0"?><document>test</document>}]

$new[^document.transform[parser://xsl/1]]
"^new.string[]"

^try_catch{
    $new[^document.transform[parser://xsl/2]]
}

@xsl[param]
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
^if($param eq '/1'){ok}{<fail>} : <xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>


@try_catch[code]
^try{
	$code
}{
	$exception.handled(true)
	$result[Exception: $exception.source - $exception.comment]
}

E-mail: