It looks like the DocumentResult doesn't properly handle DTD declarations
yet. Maybe as a workaround for now use a StreamResult to get the text then
reparse it if you need to.

James
----- Original Message -----
From: "Tomasz Domin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 13, 2002 11:11 AM
Subject: [dom4j-user] Error in DocumentResult ?


> Hi
> I use dom4j and jaxp to process xml-s in order to produce wml pages and
> I've encountered a problem that makes me wonder if choosing dom4j was a
> good move ...
>
> I am trying to process given XML with a XSLT stylesheet with jaxp
> transformation API and DocumentResult as result as follows:
>
> DOMSource ds = new DOMSource(doc);
> DocumentResult result=new DocumentResult ();
> transformer.transform(ds, result);
>
> After transformation Document-type info is lost !!! ->
> result.getDocument().getDocType() returns null and
> XMLWriter.write(result.getDocument())
> does't output doctype declaration.
>
> Doc-type is set correctly in the xslt stylesheet's header:
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>   <xsl:output method="xml" encoding="UTF-8"
> media-type="text/vnd.wap.wml" doctype-public="-//WAPFORUM//DTD WML
> 1.1//EN" doctype-system="http://www.wapforum.org/DTD/wml_1.1.xml"; />
> ....
> I am using xalan 2.2 and dom4j 1.1
>
> Can you help ?
>
> Regards
> Tomasz Domin
>
>
>
>
>
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to