I use this code:
//creating the xsl-document
org.w3c.dom.Document doc = null;
javax.xml.parsers.DocumentBuilderFactory dbf =
javax.xml.parsers.DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
javax.xml.parsers.DocumentBuilder dBuilder =
dbf.newDocumentBuilder();
doc = dBuilder.newDocument();
org.w3c.dom.Element root = d.createElementNS("xsl", "stylesheet");
doc.appendChild(root);
root.setAttributeNS("xmlns", "xsl",
"http://www.w3.org/1999/XSL/Transform");
root.setAttribute("version", "1.0");
...generating the rest of the doc...
javax.xml.transform.Source style = new javax.xml.transform.dom.DOMSource(doc) ;
javax.xml.transform.TransformerFactory tFactory =
javax.xml.transform.TransformerFactory.newInstance();
javax.xml.transform.Transformer transformer = tFactory.newTransformer(style); // here the exception is thrown
>List: xalan-j-users >Subject: RE: transformation xsl probelms >From: "Gary L Peskin" <[EMAIL PROTECTED]> >Date: 2001-12-15 4:16:52 >[Download message RAW]
>When building the Nodes xmlSourceDoc and xslSourceDoc, be sure that >you've turned on namespace awareness in the parser. If you're building >these Nodes manually, be sure you use the namespace-aware DOM L2 calls.
>Gary
