templateIntrospection =
function(ctxt, node)
{
template = xsltGetCurrentTemplate(ctxt)
cat("Current node name:", xmlName(xsltGetCurrentInputNode(ctxt)), "\n")
print(template)
paste(xmlName(node[[1]]), "->", template$match)
}
class(templateIntrospection) = "XSLTContextFunction"
doc = xsltApplyStyleSheet("currentTemplate.xml", "currentTemplate.xsl")
cat(saveXML(doc))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.