<?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>27489</bug_id>
          
          <creation_ts>2014-12-03 01:54:10 +0000</creation_ts>
          <short_desc>[XSLT30] XHTML representation of JSON</short_desc>
          <delta_ts>2015-10-29 09:50:42 +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>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brett Zamir">brettz9</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>abel.braaksma</cc>
          
          <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>115817</commentid>
    <comment_count>0</comment_count>
    <who name="Brett Zamir">brettz9</who>
    <bug_when>2014-12-03 01:54:10 +0000</bug_when>
    <thetext>Looks like I may be too late for this, but I wanted to recommend consideration of using an XHTML representation of JSON which would have the advantages of:

1. Being able to be created in a WYSIWYG fashion and supplied in environments which only allowed X/HTML.
2. Being human readable without transformations

I started such a format at http://brettz9.github.io/jhtml/ (though I indicated some changes I might like to make to the &quot;spec&quot;: https://github.com/brettz9/jhtml#user-content-possible-future-spec-modifications )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115822</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-12-03 07:54:48 +0000</bug_when>
    <thetext>I don&apos;t see a spec anywhere, only a simple example. Are we expected to infer the spec?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115823</commentid>
    <comment_count>2</comment_count>
    <who name="Brett Zamir">brettz9</who>
    <bug_when>2014-12-03 08:05:45 +0000</bug_when>
    <thetext>It&apos;s not well or formally written, but I have some rules documented at https://github.com/brettz9/jhtml#user-content-rules with some possible desired changes at https://github.com/brettz9/jhtml#user-content-possible-future-spec-modifications . But the demo source should be pretty self-explanatory too though, I think. But again, I know not very formal...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115839</commentid>
    <comment_count>3</comment_count>
    <who name="Brett Zamir">brettz9</who>
    <bug_when>2014-12-03 16:02:40 +0000</bug_when>
    <thetext>And my apologies... I should clarify that the following unfinished branch reflects my most recently intended syntax: https://github.com/brettz9/jhtml/tree/unfinished-new-spec

The README of this branch (and its index.html demo file) follow even simpler rules (though the JavaScript library has not been updated to transform the new structure).

Besides simplification and avoidance of hidden properties (by avoiding most of the hidden Microdata properties I had formerly employed), the reason for the new rules is that in now requiring the &lt;i&gt; tag on null, boolean, and numbers, they can always be visually distinguished from strings even when no CSS is applied.

As far as other design choices, my hope was to make as little markup required as possible to allow for hand-coding. 

Finally, although HTML&apos;s &quot;Microdata&quot; (as I required to be present at the root of these JSON-as-XHTML structures) is not intended for denoting hierarchical relationships, its itemtype attribute it is the closest thing to namespaces in plain HTML, and it also should allow for XML/XHTML environments to uniquely distinguish such encodings from regular XHTML (since using the XHTML namespace would still be desirable for rendering the documents in XHTML environments).

Also, as Microdata attributes are purely to be used for semantic purposes, it can be safe for HTML editors and such to whitelist.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116521</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-12-18 21:32:00 +0000</bug_when>
    <thetext>The WG considered this suggestion today.

We felt that there might well be cases where a mapping of JSON to XHTML of the kind described here might be useful, but that such a mapping could be achieved by taking the output of the json-to-xml function and transforming it using template rules. The mapping defined in the specification was never intended to meet everyone&apos;s final needs, merely to be a lossless representation of the JSON content that could readily be transformed into whatever form the application finds convenient.

Many thanks for bringing this idea to our attention. We are closing the bug report with no action.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>