[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re:   json-to-xml namespace

Subject: Re:   json-to-xml namespace
From: "Andre Cusson akhu01@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Dec 2024 11:42:47 -0000
Re:   json-to-xml namespace
Hi,

These are firewall configurations and rules that get imported, processed,
managed and exported back.

Naturally, I would rather put the data in the proper ns than have to remove
one to give it another one, on import, and then reverse everything on
export.

It is not a big deal, a few templates at worst ;).

As for the map/function puzzle, I pointed it and so did you. That is 2
already. It is related to the fn namespace and the use of the map element.

Personally, I would keep the map elements that do fine there, and replace
the ns (or no ns preferably).

I understand that standardization is not trivial and I thank you for your
great support.

Regards

PS.
Over 50ys computing with hundreds of languages,
I have been using xslt for 25 years, a personal record.
There are good reasons for this.
Thank you.




Le mar. 10 dC)c. 2024, C  04 h 09, Alan Painter alan.painter@xxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> a C)crit :

> Adding to what Martin Honnen has mentioned in his mail:
>
> The function *xml-to-json()* is defined here in the spec:
> https://www.w3.org/TR/xpath-functions-31/#func-xml-to-json
>
> As shown in the definition, the XML elements produced by the
> conversion function are in the *xpath-functions* namespace.
>
> https://www.w3.org/TR/xpath-functions-31/#json-to-xml-mapping
>
> Having these elements in a dedicated namespace is to make sure that there
> is no clash with element names in the default namespace.
> This is literally the reason for using namespaces.
>
> Perhaps you could mention what you are trying to achieve in a larger
> sense.  We could then make some recommendations.
>
> On Tue, Dec 10, 2024 at 9:48b/AM Martin Honnen martin.honnen@xxxxxx <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>> The XML representation of JSON that XSLT  3 and XPath 3.1 define and
>> share puts those elements into that namespace, like most XML vocabularies
>> use a namespace.
>>
>> --
>> Gesendet mit der GMX Mail App
>>
>>
>> Am 10.12.24, 09:22 schrieb "Andre Cusson akhu01@xxxxxxxxx" <
>> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>:
>>>
>>> Hi,
>>>
>>> I am a little puzzled as I convert some json to xml, the json-to-xml
>>> function seems to put the resulting xml in the
>>> http://www.w3.org/2005/xpath-functions namespace, as specified on its
>>> root element.
>>> This root element has local-name() "map". xslt maps are functions, but
>>> this is an element not an xslt map.
>>> Why is this in a namespace?
>>> What am I missing
>>>
>>> Thank you.
>>> Regards.
>>> ac
>>>
>>> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>>> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/582271> (by
>>> email)
>>>
>> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/552232> (by
>> email)
>>
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3035779> (by
> email <>)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.