File:  [parser3project] / parser3 / tests / 362.html
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Tue Dec 15 16:41:08 2020 UTC (5 years, 5 months ago) by moko
Branches: MAIN
CVS tags: release_3_5_1, release_3_5_0, release_3_4_6, HEAD
test updated after changes after upgrade to libxml2-2.9.9 were made (related to bug #1108)

@main[]
$template[^xdoc::create{<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="*">
	<xsl:value-of select="."/>
    </xsl:template>
</xsl:stylesheet>}]


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{<?xml version="1.0" encoding="utf-8"?>
<root>$param</root>}]

$result[^doc.transform[$template]]
$result[^result.string[ $.omit-xml-declaration[yes] ]]

E-mail: