Site Banner Graphic

Knowledge Bits

Knobs, In Sacks

  • Absolute Values in XSLT

    Xslt Absolute Values

    Getting the Absolute Value of a number using native Xslt functions

    One way of doing it in Xslt 1.0. 

    Here is an example of one way of getting the Absolute Value of some amount in Xslt.  This uses the Xslt function format-number(num) to change the numerical value to a string, ignoring any negating hyphens.  Once done, XPath function number(string) is called to return to a numerical value. 

    Learn more…
  • XSLT Duplication

    Duplicating and Editing the Document Element

    How to use copy and copy-of to make small edits

    Need to add one to every index value in your Xml? Misspell a word--a thousand times over? Never fear--use Xslt to patch it up‼

    Learn more…