Subject: Re: [xsl] xml-to-json: element found in the wrong namespace: q{}request. From: "Graydon graydon@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 17 May 2025 04:24:50 -0000 |
On Sat, May 17, 2025 at 04:05:19AM -0000, dvint@xxxxxxxxx scripsit: > <request > Quoting https://qt4cg.org/specifications/xpath-functions-40/Overview.html#json-to-xml-mapping "fn:xml-to-json Converts an XML tree, whose format corresponds to the XML representation of JSON defined in this specification, into a string conforming to the JSON grammar." So even the newest version of xml-to-json needs the specific format of XML as input. Validation of your example against https://qt4cg.org/specifications/xpath-functions-40/schema-for-json.xsd reports "Cannot find the declaration of element 'request'. I don't think it's possible to use the standard functions to convert your example. You'd have to write something that understood the XML vocabulary you're using. -- Graydon -- Graydon Saunders | graydonish@xxxxxxxxxxxx \xDE\xE6s ofer\xE9ode, \xF0isses sw\xE1 m\xE6g. -- Deor ("That passed, so may this.")
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xml-to-json: element found in, dvint@xxxxxxxxx | Thread | [xsl] Using saxon-js to run a javas, dvint@xxxxxxxxx |
[xsl] xml-to-json: element found in, dvint@xxxxxxxxx | Date | [xsl] Using saxon-js to run a javas, dvint@xxxxxxxxx |
Month |