From 0b1ac3e9d5787aef621553848cd4077fd4baeade Mon Sep 17 00:00:00 2001 From: "Thomas B. Ruecker" Date: Sat, 16 May 2015 16:33:15 +0000 Subject: [PATCH] Essential part of upstream pull req No. 20 https://github.com/doekman/xml2json-xslt/pull/20 Some numeric values would not get formatted to valid JSON. This incorporates the suggestions from issue #15. Also fixed whitespace of original patch. Additional fix for related issue will follow. --- web/xml2json.xslt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/web/xml2json.xslt b/web/xml2json.xslt index 96233be9..618bd2fa 100644 --- a/web/xml2json.xslt +++ b/web/xml2json.xslt @@ -125,8 +125,22 @@ - + (starts-with(.,'0' ) and . != '0' and not(starts-with(.,'0.' ))) or + (starts-with(.,'-0' ) and . != '-0' and not(starts-with(.,'-0.' ))))]"> + + + + + + + + + + + + + +