From 99d23c58a12364922bd5c72b3fe6195e88cb48f1 Mon Sep 17 00:00:00 2001 From: "Celestin, Nick" Date: Wed, 13 Jul 2016 16:54:18 -0400 Subject: [PATCH 1/4] feature: force-string type hinting --- conf/xml-to-json.xsl | 7 ++++--- input/tests/general.xml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/conf/xml-to-json.xsl b/conf/xml-to-json.xsl index cd17aed..5ff98e9 100755 --- a/conf/xml-to-json.xsl +++ b/conf/xml-to-json.xsl @@ -184,6 +184,7 @@ + @@ -196,7 +197,7 @@ - + @@ -313,7 +314,7 @@ - + @ @@ -410,7 +411,7 @@ * The value is not a valid JSON number (i.e. '01', '+1', '1.', and '.5' are not valid JSON numbers.) * The value does not equal the any of the following strings: 'false', 'true', 'null'. --> - + "" diff --git a/input/tests/general.xml b/input/tests/general.xml index 08a2a93..62424b8 100755 --- a/input/tests/general.xml +++ b/input/tests/general.xml @@ -7,6 +7,36 @@ false + + + + 1234 + + + + + + + + + + root + + + + element + 1234 + + + + + + + + + + + From 950570fa2061171a577550db25cbbd1d5df7201b Mon Sep 17 00:00:00 2001 From: "Celestin, Nick" Date: Tue, 9 Aug 2016 15:05:38 -0400 Subject: [PATCH 2/4] fix: self-terminated force-array element creates empty array --- conf/xml-to-json.xsl | 55 +++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/conf/xml-to-json.xsl b/conf/xml-to-json.xsl index 5ff98e9..e1742cd 100755 --- a/conf/xml-to-json.xsl +++ b/conf/xml-to-json.xsl @@ -1,8 +1,8 @@ + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:json="http://json.org/"> @@ -93,23 +93,23 @@ be used on the command line. --> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +