Le 11 oct. 2006 à 08:48, Ian Hickson a écrit :

On Tue, 10 Oct 2006, Karl Dubost wrote:

<xbl xmlns="http://www.w3.org/ns/xbl";>
 <binding id="nav-then-main" xml:id="foo">
  <template xml:id="nav-then-main">
   <div id="wrapper">
    <div id="col2"><content includes=".nav"/></div>
    <div id="col1"><content includes=".main"/></div>
   </div>
  </template>
  <resources>
   <style>
    #wrapper { display: table-row; }
    #col1, #col2 { display: table-cell; }
   </style>
  </resources>
 </binding>
</xbl>

authorized?

Does the xml:id specification allow it? If so, then it's allowed.

http://www.w3.org/TR/xml11/#id
http://www.w3.org/TR/REC-xml/#id
I do not think it is allowed.

Is "xml:id" attribute forbidden on xbl elements?

It has nothing to do with XBL, and XBL doesn't disallow it (it just says
that unexpected attributes are in error; if the UA is expecting the
attribute, then it's allowed).

Here it seems that something and its contrary is said.

* XBL specification defines XBL technologies
* unexpected attributes are defined by the specification
if not, that will have to be defined, back to the comment on expected context.

Following the paragraph above:

        1. XBL doesn't disallow xml:id
        2. unexpected attributes (xml:id) are in error

then XBL disallow xml:id

UA implements a lot of technologies. It is orthogonal to the point here, when UA implement XBL, they have to follow the requirements defined in the specification.



The two specifications are completely orthogonal and there does not
seem to be any good reason for them to unnecessarily cross-reference
each other.

XBL is using XML namespaces and XML specifications. It mentioned them.

Well, it has to mention them, since it is dependent on them. Their rules
directly affect XBL. Without them, XBL would be drastically different.


xml:base is mentioned too.

Again, it has to be, because there are things that xml:base affects in XBL
quite fundamentally.


Is "xml:id" attribute forbidden on xbl elements?
If not, why not using it, more than defining id?

Why use it? It's longer and makes DOM manipulation a lot harder. All the
other languages that we'd expect authors to use with XBL use "id", not
"xml:id", and consistency is key in language design. Also, XBL isn't the
kind of language you would use in an automated environment (which is
xml:id's main benefit). In conclusion, I don't see any advantage to
forcing authors to use "xml:id" instead of "id". As noted earlier, if
authors _want_ to use xml:id, they are of course allowed to do so.

It doesn't seem they are allowed to do so by specification definition. Though it is unrelated to the issue of using xml:id in XBL instead of id.

The explanation given about the ease of use are justifications which seem to be reasonable.

I am then satisfied with my initial comments.

--
Karl Dubost - http://www.w3.org/People/karl/
W3C Conformance Manager, QA Activity Lead
  QA Weblog - http://www.w3.org/QA/
     *** Be Strict To Be Cool ***




Reply via email to