-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON reader fails on rootless JSON instances #3
Comments
Yes, no kidding there's much it doesn't do. Thanks for trying @joshualubell ! I guess this demo is going to require more definition to complete. There are several options. Covering the full range of possible JSON inputs (in some way) is probably a good idea in any case. How should a rootless JSON instance look? (What happens under a reference implementation of XPath 3.0 With respect to project definition, what will make the demo, as demo, serve better? Completeness and some level of assurance of completeness? Unit testing the Javascript function that produces XML for further consumption? Extending that function to provide cleaner exception handling? Related to this issue is what should happen when something is loaded that does not parse as JSON. |
I think the challenge has to do with what Michael Kay discussed in his Balisage talk: that maps and arrays are basic to JSON but not XML (although they were added to XPath 3.1). It's quite common for a JSON text to be either.
https://www.w3.org/TR/xpath-functions-31/#func-json-to-xml has examples showing output from json-to-xml when the input is a map. Also, the spec says that json-to-xml raises an error condition if the input does not conform to the JSON grammar as defined in RFC 7159.
Therefore, I think you can use json-to-xml both to determine whether your JSON Reader input is grammatically correct and as the first step of your rendering pipeline.
Josh
Joshua Lubell
Systems Integration Division
Engineering Laboratory
National Institute of Standards and Technology
Gaithersburg, Maryland, USA
From: Wendell Piez ***@***.***>
Sent: Friday, September 30, 2022 5:51 PM
To: usnistgov/xslt-blender ***@***.***>
Cc: Lubell, Joshua (Fed) ***@***.***>; Mention ***@***.***>
Subject: Re: [usnistgov/xslt-blender] JSON reader fails on rootless JSON instances (Issue #3)
Yes, no kidding there's much it doesn't do. Thanks for trying @joshualubell<https://github.com/joshualubell> !
I guess this demo is going to require more definition to complete. There are several options. Covering the full range of possible JSON inputs (in some way) is probably a good idea in any case.
How should a rootless JSON instance look? (What happens under a reference implementation of XPath 3.0 json-to-xml()?) This would give us a development target.
With respect to project definition, what will make the demo, as demo, serve better? Completeness and some level of assurance of completeness? Unit testing the Javascript function that produces XML for further consumption? Extending that function to provide cleaner exception handling?
Related to this issue is what should happen when something is loaded that does not parse as JSON.
-
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACRBFFQ2B67SWLLWXCMBQ4TWA5OCZANCNFSM6AAAAAAQZ7IHWI>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
For example, an OLIR derived relationship mapping report.
derived-relationship-mapping.zip
The text was updated successfully, but these errors were encountered: