W3C home > Mailing lists > Public > www-style@w3.org > November 2001

RE: [xml-dev] Re: determining ID-ness in XML

From: Manos Batsis <m.batsis@bsnet.gr>
Date: Fri, 2 Nov 2001 17:17:04 +0200
Message-ID: <A35E2040C17F0C48B941B8F4D0DF122908E394@ermhs.Athens.BrokerSystems.gr>
To: <ldodds@ingenta.com>
Cc: "xml-dev" <xml-dev@lists.xml.org>, <www-style@w3.org>
> -----Original Message-----
> From: Leigh Dodds [mailto:ldodds@ingenta.com]
> 
> Something else to consider:
> 
> CSS provides a Selector based on ID [1]. 
> 
> The text at [1] acknowledges that ID linking is unreliable 
> (DTD might not be processed or might not exist), and presents 
> a work around: using attribute selectors.
> 
> Looks to me that any solution to the 'ID problem' will have to work 
> with CSS, and presumably impact the CSS specification as well, yes?

> [1] http://www.w3.org/TR/REC-CSS2/selector.html#id-selectors

Yes you cannot be sure that an UA will read the DTD (if any).
Attribute selectors will work just fine as long as you know the
attribute name and namespace of your ID attribute of choice:

@namespace xed url(http://www.foo.org/ns/manos/appSpace/xmledit1);

xed\:myIdAttr
{
/* style rules here */
}

IMHO though, this is not really a problem. From what I understand, it
was anticipated and somewhat ignored back when the CSS selector syntax
was designed. That's because using attribute selectors will be far more
safe than any mechanism trying to figure out what attribute plays the
role of ID anyway.

Kindest regards,

Manos
Received on Friday, 2 November 2001 10:15:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:11 GMT