[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-dev
Subject:    Re: XHTML Output Format
From:       Cameron Hart <cam () bitshifter ! net ! nz>
Date:       2003-03-19 8:34:38
[Download RAW message or body]

 > Until today, I was using the Method.HTML output format. I tried to
 > switch to Method.HTML, but since the script  tags are not serialized
 > as CDATA (I have lots of inline dynamic scripts), it makes it
 > unusable.

This behaviour is correct to the XML spec, but unfortunately doesn't 
work in any web browser I know of. The only way I've got around it is 
post-processing the output of serializer and removing the CDATA 
comments. There's an article on Netscape devedge that says that only way 
to safetly include Javascript and CSS in an XHTML page is to load them 
from external files.

The other problem I had with XHTML serialization was it closed empty 
elements. So if there was a <b></b> in my input document it ended up as 
a <b /> in my output which caused problems for most browsers as well. 
There is the new DOM3 save stuff as well, I haven't looked into it 
myself. It might have more options for getting around these problems though.

Cam.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic