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 Yi...@netscape.net on 2002/09/08 08:44:53 UTC
Tag balancing in Neko Parser
I am using Neko 0.6.5
I have the simple page:
<html>
<body>
<p>
<button> a button </button> <br>
</p>
</body>
<html>
When i build a DOM using Neko parser, I notice this:
<p> </p>
<form>
<button>
</form>
A form tag was inserted, but the p tag was closed too early.
I would like to know why the P tag was closed before the newly inserted form tag. I expected it would still wrap around the button tag.
Thank you.
__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Tag balancing in Neko Parser
Posted by Andy Clark <an...@apache.org>.
YingLCS@netscape.net wrote:
> I would like to know why the P tag was closed before the
> newly inserted form tag. I expected it would still wrap
> around the button tag.
I've fixed the bug and the change will go into the next
release. In the meantime, you can change line 248 in
HTMLElements.java from:
ELEMENTS.addElement(new Element(FORM, "FORM", 0, new
short[]{BODY,TD}, null));
to:
ELEMENTS.addElement(new Element(FORM, "FORM", 0, new
short[]{BODY,TD,P,DIV}, null));
and rebuild the Jar file.
--
Andy Clark * andyc@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Tag balancing in Neko Parser
Posted by Andy Clark <an...@apache.org>.
Joseph Kesselman wrote:
> A quick look at the HTML spec says Form Controls (eg button) can be placed
> within a <p> but form can't -- so I suspect Neko is correctly inserting an
> implied </p> before the <form>.
I guess the question is really whether I should be auto-
inserting a <form> tag at all. I notice that Mozilla does
not add a <form> tag for a lone <button>. Hmmm...
--
Andy Clark * andyc@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Tag balancing in Neko Parser
Posted by Joseph Kesselman <ke...@us.ibm.com>.
A quick look at the HTML spec says Form Controls (eg button) can be placed
within a <p> but form can't -- so I suspect Neko is correctly inserting an
implied </p> before the <form>.
______________________________________
Joe Kesselman / IBM Research
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org