Re: [XBL] Conformance

Cameron McCormack:
> >   The language in this specification assumes that the user agent expands
> >   all entity references, and therefore does not include entity reference
> >   nodes in the DOM. If user agents do include entity reference nodes in
> >   the DOM, then user agents must handle them as if they were fully
> >   expanded when implementing this specification.
> > 
> > Language doesn’t include entity reference nodes in the DOM, user 
> > agents do.  (Language also doesn’t make assumptions, the authors of 
> > the specification do.)  By saying that UAs “must handle them as if 
> > they were fully expanded”, does this mean that they need to actually 
> > expand them? What if they cannot be expanded (the external DTD wasn’t 
> > fetched)?

Ian Hickson:
> The language doesn't include them in the DOM; the second part of the 
> sentence is using the UAs as the subject.

My mistake, I misread the sentence.

> It doesn't mean they have to expand them, it merely means that they must 
> be treated as if they were expanded.
> 
> Could you give an example of what you think this leaves unclear? I don't 
> really see a problem with this text. I'm not really sure how else to 
> phrase it.

Say you had:

  <!DOCTYPE blah SYSTEM "blah.dtd">
  <?xbl href="bindings.xbl"?>
  <blah>
    <something>&abc;</something>
  </blah>

and bindings.xbl had:

  <xbl xmlns="…">
    <binding element="something">
      <template>
        <something-else xbl:attr="def=xbl:text"/>
      </template>
    </binding>
  </xbl>

If it’s not a validating parser, blah.dtd might not be fetched, and the
&abc; would stay in the document as an entity reference node.  But the
UA “must handle them [the entity references] as if they were fully
expanded”, which it can’t do unless it actually does fetch blah.dtd,
because it can’t know if &abc; would expand to some text nodes.

-- 
Cameron McCormack, http://mcc.id.au/
 xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

Received on Saturday, 13 January 2007 05:33:03 UTC