Re: XPath & CSS, again

Bert Bos wrote:
> Converting to lowercase has no built-in function in XPath (1.0). You
> can do it in XSLT with a few variables and a couple of lines of code.

Ah! It does, though it is not exactly short:

translate(@class,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')

Though that doesn’t take care of non-roman characters and accented 
characters. But I wonder if that’s the case for CSS as well... Is Á the 
same as á? Is あ the same as ア? I guess it’s probably somewhere in the 
spec.


> CSS can select generated content, because there is only a handful of
> things that *can* be generated.
> 
> How would XPath select generated content? Generated content, by
> definition, is not in the document. It is not any of the node types
> that XPath has expressions for. It only exists *after* the style sheet
> has been applied.

Of course, it would be possible to define functions, like div/after(), 
div/before(), div/marker(). Just like there’s div/text(). But I agree 
that combining XPath and CSS won’t work comfortably. Both because of 
feasibility reasons, and because people will wonder why the hell there 
are two different selector syntaxes (and why they would have to learn 
them both).


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san!!

Received on Monday, 11 April 2005 22:22:58 UTC