[xsl] xml-to-json: element found in the wrong namespace: q{}request.

Subject: [xsl] xml-to-json: element found in the wrong namespace: q{}request.
From: "dvint@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 17 May 2025 04:05:11 -0000
I'm not finding this documented in the spec. I'm using xlst 3.0 and trying to send this content to xml-to-json.

<request >
	<auth>
		<type>basic</type>
		<basic>
			<key>username</key>
			<value>{{adminAppID}}</value>
			<type>string</type>
		</basic>
		<basic>
			<key>password</key>
			<value>{{adminAppSecret}}</value>
			<type>string</type>
		</basic>
		<basic>
			<key>saveHelperData</key>
			<type>any</type>
		</basic>
		<basic>
			<key>showPassword</key>
			<value>False</value>
			<type>boolean</type>
		</basic>
	</auth>
	<method>POST</method>
	<header>
		<entry>
			<key>Authorization</key>
			<value>Basic {{adminAppID:adminAppSecret}}</value>
		</entry>
		<entry>
			<key>Content-Type</key>
			<value>application/x-www-form-urlencoded</value>
		</entry>
	</header>
	<body>
		<mode>urlencoded</mode>
		<urlencoded>
			<key>grant_type</key>
			<value>client_credentials</value>
			<description>Required</description>
			<type>text</type>
		</urlencoded>
	</body>
	<url>
		<raw>{{authPath}}/{{adminEnvID}}/as/token</raw>
		<host>{{authPath}}</host>
		<path>{{adminEnvID}}</path>
		<path>as</path>
		<path>token</path>
	</url>
	<filepath>src/create-a-test-environment/step-1-get-access-token.mdx</filepath>
</request>

Seems like I'm running into this problem, but not really understanding the spec'ez https://github.com/eXist-db/exist/issues/5543

I tried to just add the xmlns="http://www.w3.org/2005/xpath-functions"; to request, but that didn't seem to change anything.

Am I stuck with using XML generated by json-to-xml() if I want to use xml-to-json() to get back?

Anyone know of a good tutorial on the various json functions? I came across some samples in the oXygen install that uses a bunch of thing I didn't know about or understand how they are actually working, but they look interesting.

..dan

Current Thread