xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Hau <jh...@doc.ic.ac.uk>
Subject create xsl programmatically using xalan API?
Date Thu, 13 May 2004 16:04:59 GMT
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


Mime
View raw message