[CSS] replace()

Oxygen general issues.
Tanking
Posts: 25
Joined: Fri Mar 20, 2009 5:28 pm

[CSS] replace()

Post by Tanking »

Hi there,

I have tried working around the text-transformation not working in CSS by using the Oxygen replace function which can process regular perl-like regular expression.

But I have not be able to. For example:

someXmlNodeLocalName:before(
content:replace(attr(label), "([a-z})", "\u$1", true);
}

the problems are:
- The selector seems to be selecting lower case and upper case ( not that important)
- The replace statement actually adds an '\u' character before the value of $1 instead of upper-casing.

Anyone got a solution for this?

Cheers in advance.
jerome poupard
AMConresearch
164 Daniel St. N., Suite 202
Arnprior, Ontario
K7S 2L3
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: [CSS] replace()

Post by sorin_ristache »

Hello,

The \u and \l constructs (turn the following character to uppercase/lowercase) that you know from Perl are not supported in a regexp. Oxygen uses the Java support for regexps which uses \u for a Unicode codepoint, not for turning characters to uppercase. I am sorry, I think you do not have a solution for transforming between lowercase and uppercase from the CSS stylesheet in the current version of Oxygen. Author mode was designed mainly to display the content of the XML document as it is so you will have to preprocess the XML document (with an XSLT stylesheet for example) if you want such changes.


I hope this helps,
Sorin
Post Reply