Subject:Standardizing IP addresses Author:Brian Newman Date:02 Dec 2009 06:36 PM
I've got a requirement to standardize IP addresses.
I need to strip leading zeroes from each octet.
So, 001.010.100.000
becomes
1.10.100.0
I am developing in .NET framework and my XML processor is XmlCompiledTransform (so, I'm limited to Xslt 1.0/XPath 1.0).
Has anyone done this kind of thing before? Is there an elegant solution or just one very very ugly hack?
Subject:Standardizing IP addresses Author:(Deleted User) Date:03 Dec 2009 10:38 AM
Hi Brian,
basically you should use substring-after and substring-before to isolate the substrings between dots, and then build the new string by processing those part with string(number(str))