This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5793 - Cross-reference "as if"
Summary: Cross-reference "as if"
Status: VERIFIED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: NoReply
Depends on:
Blocks:
 
Reported: 2008-06-24 12:09 UTC by Henri Sivonen
Modified: 2010-10-04 14:27 UTC (History)
3 users (show)

See Also:


Attachments

Description Henri Sivonen 2008-06-24 12:09:04 UTC
In the handling of p, li, dd and dt, the spec tells the tree builder to "act as if" a given tag had been seen. It isn't quite clear what exactly happens in each instance. The spec would be easier to follow if the "act as if" steps were inlined and the always-dead branches pruned.
Comment 1 Ian 'Hixie' Hickson 2008-06-24 20:52:28 UTC
"Act as if" is all over the spec. I prefer writing the spec that way because if I ever change what happens at the other end, I have to go and fix a bazillion places that refer to it. What is unclear? What are the various options that you think it might mean?

(In my implementation, "act as if a token was seen" literally just re-entrantly invokes the tree construction step with a fake token.)
Comment 2 Henri Sivonen 2008-06-25 07:58:19 UTC
(In reply to comment #1)
> "Act as if" is all over the spec. I prefer writing the spec that way because if
> I ever change what happens at the other end, I have to go and fix a bazillion
> places that refer to it. 

That makes sense.

> What is unclear? What are the various options that you
> think it might mean?

It's not about what it might mean. The effect of a token is split in different places. This makes it inconvenient to figure out the full effect of the token by reading the spec on screen. (I gave up on trying to form a merged understanding directly from the spec. Instead of I wrote code for different parts of the spec and then merged the code.)

It would help if "act as if 'foo' end tag had been seen" was linked to the definition of what to do with a 'foo' end tag.
Comment 3 Ian 'Hixie' Hickson 2008-06-25 07:59:41 UTC
Hm yes, hyperlinks would make sense. Shall we repurpose this bug to that end?
Comment 4 Henri Sivonen 2008-06-25 09:51:17 UTC
Yeah, let's do that.
Comment 5 Ian 'Hixie' Hickson 2008-06-30 23:16:24 UTC
So I tried doing this and I failed. Many of the "act as if" points are late-binding dynamic dispatch type points. For example, you come across an <li> while dealing with SVG, and so you fake a </p>, but that has to go through the rules for foreign content first. So I can't point from the <li> rules to the </p> rules in "in body". The same applies to any number of other cases. I am not confident that I can include the right links for every case.
Comment 6 Maciej Stachowiak 2010-03-14 13:14:25 UTC
This bug predates the HTML Working Group Decision Policy.

If you are satisfied with the resolution of this bug, please change the state of this bug to CLOSED. If
you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

This bug is now being moved to VERIFIED. Please respond within two weeks. If this bug is not closed, reopened or escalated within two weeks, it may be marked as NoReply and will no longer be considered a pending comment.