|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Preventing tags from collapsing
I inserted an html comment: <script ...><!--Leave this here to solve and IE bug--></script> If you do that in an HTML file (rather than an XHTML File) you are relying on bugs "or quirks compatibility mode or whatever you want to call it" <script> in HTML is a normal element with PCDATA content so within such an element <!--Leave this here to solve and IE bug--> is a comment, and will be ignored. However in HTML <script> is a CDATA element (an element type that does not exist in XML) which means that < inside script is _not_ takken as a start of markup unless it is followed by /script> which means you can write a , b in your javascript but also means <!--Leave this here to solve and IE bug--> is _not_ a comment it is a string of text in the element content and in a conforming system would be passed as part of the element content to the script interpretter which would then report a script error. The fact that your browser doesn't do that and filters out this text as it "looks like" a comment is just typical browser behaviour working on hueristics rather than implementing languages as specified. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








