Hello,
When I tried to transform an xsl stylesheet with Xalan in java by using the
following
sourcecode:
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.io.IOException;
import java.io.File;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.apache.xalan.templates.*;
import org.apache.xerces.*;
import org.apache.xalan.*;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import java.io.FileOutputStream;
import org.apache.xerces.jaxp.DocumentBuilderFactoryImpl ;
import javax.xml.parsers.SAXParserFactory ;
import org.apache.xerces.jaxp.SAXParserFactoryImpl;
public class Document1 extends Object
{
public static void main(String argv[])throws ParserConfigurationException,
IOException,
SAXException,TransformerConfigurationException,TransformerException
{
StreamSource ssr = new
StreamSource("E:\\Xalan\\xalan-j_2_2_D11\\samples\\SAX2SAX\\foo.xsl");
TransformerFactory tf = TransformerFactory.newInstance();
Transformer t = tf.newTransformer(ssr);
StreamSource ss =new
StreamSource("E:\\Xalan\\xalan-j_2_2_D11\\samples\\ApplyXPath\\foo.xml");
StreamResult sr = new StreamResult(new FileOutputStream("E:\\Eigene
Dateien\\foo.out"));
t.transform(ss,sr);
}
}
The system always throws a Transformer Configuration Exception, which says,
that the Namespace is not supported by Sax Parser. I checked the xml,xsl
sourcecode, and tried to change the namespace in the xsl document without
success. I cant find any error in my transforming sourcecode, perhaps you
can. Please inform me as soon as possible about what is wrong
Greetings
Stephan M�ller
---------------------------------------------------------
This Mail has been checked for Viruses
Attention: Encrypted mails can NOT be checked!
**
Diese Mail wurde auf Viren geprueft
Hinweis: Verschluesselte mails koennen NICHT auf Viren geprueft werden!
---------------------------------------------------------