xml - How to apply math function to node value? -



xml - How to apply math function to node value? -

i have xml file set of dates negative when it's bce , positive if ce. need alter negative values positive multiplying -1, how do that?

<xsl:choose> <xsl:when test="node &lt; 0"> <p><xsl:value-of select="node"/> bce</p> <!-- how multiply -1? --> </xsl:when> <xsl:otherwise> <p><xsl:value-of select="node"/> ce</p> </xsl:otherwise> </xsl:choose>

i need alter negative values positive multiplying -1, how do that?

<xsl:value-of select="-node"/>

note:

<xsl:when test="value < 0">

is not valid expression; must escape < operator:

<xsl:when test="value &lt; 0">

xml xslt xhtml

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -