Volker, This isn't a Xalan issue, but a problem with your stylesheet. Firstly, you shouldn't declare that your stylesheet is an html document. It is an XSL file and there is no publicly defined DTD for xsl documents. The simple solution is to remove the DOCTYPE declaration and replace the named entities with character references, ie. replace with   This a common issue with XSL and I know that a previous thread on this list discussed it in more. The name of that thread was (incorrectly named) "HTML tags in XML". If you need further help, I would suggest the Mulberry xsl-list at
http://www.mulberrytech.com/xsl/xsl-list/ John -----Original Message----- From: Volker L�deling [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 8:01 AM To: Xalan Users Subject: Problem with entities in XSL transformations Hi, I have a little problem transforming XML documents into HTML. I'm running into trouble as soon as my stylesheet contains HTML entities. One simple example: <!-- Stylesheet start --> <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" omit-xml-declaration="yes" encoding="ISO-8859-1"/> <xsl:template match='top'> <html> <body> Hello World! </body> </html> </xsl:template> </xsl:stylesheet> <!-- Stylesheet end --> My Java code that does the transformation: <!-- start code --> TransformerFactory f = TransformerFactory.newInstance(); Transformer t = f.newTransformer(new StreamSource(/* source XSL */))); StreamSource source = new StreamSource(/* XML source */); StreamResult result = new StreamResult(/* output stream */); t.transform(source, result); <!-- end code --> I'm using Xalan 2.5. Whenever I run my application, Xalan tries to load the DTD given in the DOCTYPE. Since I am on a slow network, this takes several seconds. When I am trying this without being connected to the Internet, transformation fails, because Xalan cannot contact www.w3.org. Xalan obviously tries to resolve " ", and therefore it needs to check the DTD to find out what " " means. Is there a way to disable this feature? I really don't need Xalan to resolve anything, since all entities will be interpreted by the target Web browser. I guess that this is quite a basic question, but I just can't find a solution. Thanks in advance for any help you can give me, Volker
