Hi,
is there info on how to create xsl programmatically using the API? i tried using various classes in the org.apache.xalan.templates package but keep on running into errors when trying to nest elements. say creating an element like,


<xsl:template match="/">
        <html>
</xsl:template>

i use the following code,

Stylesheet sheet = new StylesheetRoot(null);
ElemTemplate template = new ElemTemplate();
template.setMatch(new XPath("/", null, null, XPath.MATCH));
template.setStylesheet(sheet);
org.w3c.dom.Element testEle = template.createElement("Test");
template.appendChild(testEle);

can anyone helped?

thanks very much,

Jeff



Reply via email to