This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
At some stage we changed the namespace used for elements in the "xml representation of JSON" schema to use the standard F+O namespace. We then changed the stylesheet for xml-to-json transformation accordingly. A consequence of this change is that the stylesheet now has used-defined functions in the F+O namespace, which is not allowed (the namespace is reserved). Also the following sentence in the spec (ยง22.4) is no longer true: This stylesheet includes a function j:xml-to-json which, apart from being in a different namespace, is functionally identical to the xml-to-json function described in the previous section. The j:xml-to-json namespace is currently in the same namespace as the standard fn:xml-to-json function.
Reclassified as editorial. I have made the changes needed to the stylesheet. But leaving the bug open until the revised version is tested.
I have been testing the revised stylesheet and came across a few issues, not all directly related to the stylesheet itself. The function entry points to the stylesheet should be declared as streamable stylesheet functions with streamability="absorbing". To test streamable use of the stylesheet I wanted to compare the results with streamed application of fn:xml-to-json() and I found that we had no tests for this, and it wasn't implemented in Saxon. So I've been developing tests (and an implementation that passes them) for fn:xml-to-json() and will come back to the stylesheet when that work is complete.
I have now adapted the test set for fn:xml-to-json so the same tests are run with both the built-in function an the XSLT stylesheet, and both appear to give the same results, so I am now happy to close this bug.