<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29790</bug_id>
          
          <creation_ts>2016-08-23 20:57:30 +0000</creation_ts>
          <short_desc>[xslt30] Sample stylesheet for xml-to-json conversion uses a reserved namespace</short_desc>
          <delta_ts>2017-01-12 21:44:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 3.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>127214</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-08-23 20:57:30 +0000</bug_when>
    <thetext>At some stage we changed the namespace used for elements in the &quot;xml representation of JSON&quot; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127363</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-09-09 22:04:57 +0000</bug_when>
    <thetext>Reclassified as editorial.

I have made the changes needed to the stylesheet.

But leaving the bug open until the revised version is tested.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127669</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-10-06 12:34:20 +0000</bug_when>
    <thetext>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=&quot;absorbing&quot;.

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&apos;t implemented in Saxon. So I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128360</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-01-12 00:23:13 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>