Subject: [xsl] How to unescape slash character using xml-to-json ? From: "Matthieu RICAUD-DUSSARGET m.ricaud-dussarget@xxxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 23 Oct 2019 22:59:25 -0000 |
Hi all, I need to generate this json output : {"test":"foo/bar"} I use XSLT3 function fn:xml-to-json to do this. My input is : <fn:map xmlns:fn="http://www.w3.org/2005/xpath-functions"> <fn:string key="test" escaped="false">foo/bar</fn:string> </fn:map> But I always get this result with escaped slash : {"test":"foo\/bar"} Reading the spec at https://www.w3.org/TR/xslt-30/#func-xml-to-json at paragraph "Strings are escaped as follows:" it looks like I can't unescape "/" (solidus?) character. Is there really no way to do that using XSLT3 json functionality ? Did I missed something obvious ? Here is a running test : https://xsltfiddle.liberty-development.net/bwdwrV Thanks in advance, Cordialement, [cid:image002.jpg@xxxxxxxxxxxxxxxxx]Matthieu RICAUD-DUSSARGET Expert XML SI EDITORIAL Til. +33 6 63 25 95 58 80, avenue de la Marne 92120 Montrouge [demime 1.01d removed an attachment of type image/jpeg which had a name of image001.jpg] [demime 1.01d removed an attachment of type image/jpeg which had a name of image002.jpg]
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Separator for xsl:number , Rick Quatro rick@xxx | Thread | Re: [xsl] How to unescape slash cha, Tim Thompson timatho |
Re: [xsl] Separator for xsl:number , Michael Kay mike@xxx | Date | Re: [xsl] Separator for xsl:number , Rick Quatro rick@xxx |
Month |