[Home] [By Thread] [By Date] [Recent Entries]


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 08 October 2002 05:28, Joe Forrest wrote:
> Is "--" allowed in the content of comment in a XML by
> any means and call it legal XML?.

Maybe try replacing one or both of the dashes with its equivilant character 
reference: "-".  I haven't tried this, and chances are it won't work 
because I don't believe XML processors are supposed to process entities in 
comments.  It's worth a try, though, because the grammar definitely will not 
allow it in any way.  <![CDATA[]]> is useless, again because it should not be 
processed inside of a command, and because I don't believe many or any HTML 
browsers support it.  Someone please correct me if I'm wrong.

Another option would be to simply remove the <!-- --> around your script.  
You're using XHTML, and any modern browser that can read XHTML won't have a 
problem without the comment.  If you want to support older browsers, then 
XHTML might pose other problems, such as with empty elements that are closed 
with "/>".  Not to mention that older browsers won't support the Javascript 
anyway.

Good luck!

- -- 
Peter Davis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9otQXhDAgUT1yirARAlqbAJ9AIQ5TkwkU3XKcs473Nud6HQBIRwCfdXeQ
3h2cRb2P7b1uxW7qcVcRfXo=
=Uk/9
-----END PGP SIGNATURE-----


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member