On 04/15/2016 06:08 PM, today wrote:
Is any better way to express this condition
Yes. Use XPath in a language like XSLT2.
which is to detect words in a table that have some ending, group them together in a class
You mean change their position in the output?
and colorize the columns in a particular color and highlight the
lines that fall under the condition.
You must post some sample data that this can be tested on. It is
impossible to understand your example, because we cannot see the
input, and your condition elements are not referred to in your results,
so it is impossible to see which of them is being applied.
<CONDITIONS>
<condition col="x" line="2" operator="and" line="4" TextEnd="e"></condition>
<condition col="x" line="5" operator="and" line="6" TextEnd="a"></condition>
<condition col="x" line="10" TextEnd="er"></condition>
</CONDITIONS>
If I understand this right,
<xsl:template match="something which matches lines 2 and 4 and col x">
<xsl:choose>
<xsl:when test="ends-with(.,'e') or
ends-with(.,'a') or
ends-with(.,'er')">
-- do something --
</xsl:when>
<xsl:otherwise>
-- do something else --
</xsl:otherwise>
</xsl:template>
But you need to provide us with a LOT more information.
///Peter
--
XML FAQ:
http://xml.silmaril.ie/
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)