Menu

#23 ENDTAG_OPTIONAL not yet supported

open
8
2004-11-20
2004-03-03
No

This is, I think / hope, the last fundamental bug
effecting the SourceFileParser and states. In fixing
bug nr. 906138 (
http://sourceforge.net/tracker/index.php?func=detail&aid=906138&group_id=85372&atid=575984
), I've introduced another.

Basically the following ligimate markup will result in
a closing tag not found type error;

<p runat="server">
<p>This is a paragraph which has not been closed
</p>

The closing </p> tag will be assumed to be belonging to
the unclosed paragraph, when really it's intended to
belong to the preceeding ServerTagComponentTag.

The <p /> tag is about the only example I can think of
where someone is likely to have this problem when
working with HTML. It's unlikely we'll see things like;

<hr runat="server">
<hr>
</hr>

or otherwise.

Right now I don't think there's anyway to catch this in
the SourceFileParser and the only possibility I can
think of is using a SaxFilter, which will only be able
to report an error, rather than fix the problem.

In other words, unless anyone's got any ideas, think
this will have to be a pain we have to live with.

Discussion

  • Jeff Moore

    Jeff Moore - 2004-03-05

    Logged In: YES
    user_id=31876

    the tags that have this bug are the ENDTAG_OPTIONAL tags.

     
  • Jeff Moore

    Jeff Moore - 2004-11-20
    • summary: ServerTagComponentTag will not be closed in rare instances --> ENDTAG_OPTIONAL not yet supported
     
  • Jeff Moore

    Jeff Moore - 2004-11-20

    Logged In: YES
    user_id=31876

    Who can tell which opening tag, the ending tag was intended to go to. Is
    there a guideline in the specification?

    In any case, for ENDTAG_OPTIONAL tags, we could not be reporting an
    error if there is a failure to close them.

     

Log in to post a comment.