Saturday 15 May 2010

xml - How do I compare two hex codes including # and make them lower case in XSLT? -



xml - How do I compare two hex codes including # and make them lower case in XSLT? -

when comparing 2 hex codes not recognise #ffffff , #ffffff equal. there way of formatting #ffffff lower case somehow?

the hex codes totally random , cannot utilize lower-case() function xslt 2.0 i'm using v.1. found several potential answers here translate(), none of them seem work.

here how compare:

<xsl:choose> <xsl:when test="$current_node_backgroundcolor = $preceding_node_backgroundcolor"> (...)

i'd appreciate kind of help! thanks!

try:

<xsl:when test="translate($current_node_backgroundcolor, 'abcdef', 'abcdef') = translate($preceding_node_backgroundcolor, 'abcdef', 'abcdef')">

xml xslt hex string-comparison

No comments:

Post a Comment