On Mon, Jul 16, 2012 at 6:09 AM, stuart shepherd <[email protected]> wrote: > <xsl:template match="//control[name='DelaySeconds']/numeric/max"> > <xsl:element name="{name(.)}"> > <xsl:value-of select="translate(string(.), '110', '5')" /> > </xsl:element> > </xsl:template>
I think you could just do <xsl:template match="//control[name='DelaySeconds']/numeric/max[. = 110]/text()"> <xsl:text>5</xsl:text> </xsl:template> Actually I guess you don't care about the original value so you don't even need the [. = 110] part. > I've tried using replace instead of translate but I get the error message > > xmlXPathCompOpEval: function replace not found > XPath error : Unregistered function replace is an Exslt function, add xmlns:str="http://exslt.org/strings" to your root node, then you can call str:replace. _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] https://mail.gnome.org/mailman/listinfo/xml
