-
1. Re: Do I have a parser config problem?
markcharles Feb 26, 2003 6:26 PM (in response to markcharles)Well, there was no config problem. I decided to try parsing the .xsl file into a DOM tree, then pass the DOM object to the Transformer like this:
InputStream xslFile=getServletConfig().getServletContext().getResourceAsStream("/joblist_html.xsl");
Document xslDoc = null;
try {
dbf=DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder db=dbf.newDocumentBuilder();
xslDoc = db.parse(xslFile);
}
TransformerFactory tf=TransformerFactory.newInstance();
try {
Transformer t = tf.newTransformer(new DOMSource(xslDoc));
t.transform(new DOMSource(xmlDoc),new StreamResult(out));
}
MCharles -
2. Re: Do I have a parser config problem?
markcharles Feb 26, 2003 6:28 PM (in response to markcharles)Well, there was no config problem. I decided to try parsing the .xsl file into a DOM tree, then pass the DOM object to the Transformer like this:
InputStream xslFile=getServletConfig().getServletContext().getResourceAsStream("/joblist_html.xsl");
Document xslDoc = null;
try {
dbf=DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder db=dbf.newDocumentBuilder();
xslDoc = db.parse(xslFile);
}
TransformerFactory tf=TransformerFactory.newInstance();
try {
Transformer t = tf.newTransformer(new DOMSource(xslDoc));
t.transform(new DOMSource(xmlDoc),new StreamResult(out));
}
MCharles