@main[]
$template[^xdoc::create{
}]
1. original template: ^taint[as-is][^template.string[]]
transform OK: ^transform[1]
2. libxml modifies template: ^taint[as-is][^template.string[]]
but transform OK as we cache compiled one: ^transform[2]
$m[^template.documentElement.selectSingle[*[1]]]
$m.nodeValue[test]
3. after manual template modification: ^taint[as-is][^template.string[]]
transform still OK: ^transform[3]
$new[^template.documentElement.appendChild[^template.createElementNS[http://www.w3.org/1999/XSL/Transform;xsl:template]]]
^new.setAttribute[match;root]
$new.nodeValue[works]
4. new templates are not ignored: ^taint[as-is][^template.string[]]
transform: ^transform[4]
@transform[param]
$doc[^xdoc::create{
$param}]
$result[^doc.transform[$template]]
$result[^result.string[ $.omit-xml-declaration[yes] ]]