Benoit Maisonny wrote:
> I may have found a bug in XXE's behaviour when styling processing
> instructions. Basically, the PI target is not well recognised if it
> contains upper case letters.
>
> A document containing:
>
> <?Test pi1?>
> <?test pi2?>
>
> and using the following CSS:
>
> *::processing-instruction(Test) {
> background-color: blue;
> }
>
> *::processing-instruction(test) {
> background-color: yellow;
> }
>
> If both "test" and "Test" are defined in CSS, then pi1 has a light green
> background (default PI rule) and pi2 has a yellow background.
>
> If only "test" is defined in CSS, the result is the same (which is
> correct, here).
>
> If only "Test" is defined in CSS, then pi1 is still in light green but
> pi2 is in blue.
In CSS, identifiers are almost always (to make it simple[*])
case-insensitive. That is, both Test and test are parsed as test.
Using CSS strings instead of CSS identifiers should work fine. Example:
---
*::processing-instruction("Test") {
background-color: blue;
}
*::processing-instruction("test") {
background-color: yellow;
}
---
---
[*] There is a small bug indeed, because at least in selectors,
identifiers should be case-sensitive.
This is of course the case for standard selectors.
However, in ``proprietary extensions'' such as
::processing-instruction(), ::comment(), ::attribute(), etc, for obscure
implementation reasons, this bug is hard to fix.