You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Michael Nielsen (Info)" <mi...@dsb.dk> on 2002/11/28 14:23:12 UTC
transform of empty elements
Hi
I have this problem when using I.E. 6 for displaying parsed XHTML.
Take this for instance:
<tr><td><textareal class="someclass" name="somename"></textarea></td></tr>
The above will be parsed as:
<tr><td><textareal class="someclass" name="somename"/></td></tr>
Guess what! I.E.6 displays this af a textarea with the </td></tr> as content
inside.
My question is, how do I make the parser understand to leave tags the way
they are without parsing to empty tags?
I use the org.apache.xerces.parsers.DOMParser.
Thanx in advance
/Michael
RE: transform of empty elements
Posted by Simon Kitching <si...@ecnetwork.co.nz>.
On Fri, 2002-11-29 at 02:55, Antony Quinn wrote:
> Michael,
>
> I had a similar problem with <script> tags in IE.
>
> Xerces (quite rightly) converts <script src="some.js"></script> to <script
> src="some.js"/>. This is fine in Mozilla but IE won't accept it.
>
> The only solution I found is to be a full-top (period) between the tags, ie:
> <script src="some.js">.</script>
>
> I guess you don't want to have full-stops or other characters appearing
> between your <textarea> tags.
>
> Does anyone have a better solution?
>
> Regards/mvh,
>
> Antony
Well, perhaps you could put some whitespace between the opening and
closing tags, then set preserve-space to true for the troublesome
elements? That might prevent the serializer from coalescing the begin
and end tags.
Cheers,
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
RE: transform of empty elements
Posted by Antony Quinn <an...@caret.cam.ac.uk>.
Michael,
I had a similar problem with <script> tags in IE.
Xerces (quite rightly) converts <script src="some.js"></script> to <script
src="some.js"/>. This is fine in Mozilla but IE won't accept it.
The only solution I found is to be a full-top (period) between the tags, ie:
<script src="some.js">.</script>
I guess you don't want to have full-stops or other characters appearing
between your <textarea> tags.
Does anyone have a better solution?
Regards/mvh,
Antony
-----Original Message-----
From: Michael Nielsen (Info) [mailto:min@dsb.dk]
Sent: 28 November 2002 13:23
To: 'xerces-j-user@xml.apache.org'
Subject: transform of empty elements
Hi
I have this problem when using I.E. 6 for displaying parsed XHTML.
Take this for instance:
<tr><td><textareal class="someclass" name="somename"></textarea></td></tr>
The above will be parsed as:
<tr><td><textareal class="someclass" name="somename"/></td></tr>
Guess what! I.E.6 displays this af a textarea with the </td></tr> as content
inside.
My question is, how do I make the parser understand to leave tags the way
they are without parsing to empty tags?
I use the org.apache.xerces.parsers.DOMParser.
Thanx in advance
/Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org