"Garcia, Armando (Armando)" wrote:
>
> Consider the following element:
>
> <!ELEMENT Activity (Description?, Limit?, ..... )>
> <!ATTLIST Activity
> id ID #REQUIRED
> Name CDATA #IMPLIED
> >
>
> I'm trying to reder it with the following CSS2
>
> Activity {
> content: "Name: " attr(Name) " id:" attr(id);
> }
>
> But I never get attr(Name) displayed. If you change Name to name (DTD and
> document) then it works.
>
> Is there a constrain on capitalized attribute names?
No, this is an XXE bug. Here is why:
in a CSS, a reference to the attribute A of the element which is the
subject of the selector is specified using construct attr(A).
CSS being case insentive, all CSS identifiers are converted to
lower-case character strings (except in selectors).
Therefore, if you specify attribute name A as an identifier, A is
automatically converted to lower-case, which may be a problem because
XML is case-sensitive.
In order to specify non-lower-case attribute names, one must specify A
as a quoted CSS string rather than a CSS identifier. Example: specify
attr("HRef") rather than attr(HRef).
Unfortunately, a bug prevented XXE from accepting construct
attr(string).
I have released Patch 3 (
http://www.xmlmind.com/xmleditor/download.shtml ) which fixes this bug.
Do not forget to change attr(Name) to attr("Name") in your style sheet.