[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: json-to-xml namespace
Also, going back to your original question: > This root element has local-name() "map". xslt maps are functions, but this is an element not an xslt map. There is some confusion in this question between the *"map"* type in XPath/XSLT and an XML element with a local-name of *"map"*. They are not the same thing, even if they have the same name. https://www.w3.org/TR/xpath-31/#id-maps A "map" *type* is indeed a function; however, it is not an XML element. The function *xml-to-json() *produces an XML element. I recommend that you describe what you are trying to achieve. On Tue, Dec 10, 2024 at 10:09b/AM Alan Painter alan.painter@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > 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/552232> (by > email <>)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|