W3C Forms teleconference June 1, 2011

* Present

Steven Pemberton, CWI/W3C (chair)
Phlip Fennell, MarkLogic
Leigh Klotz, Xerox (minutes)
Uli Lissé, DreamLabs
Alain Couthuries, AgenceXML
Erik Bruchez, Orbeon [joined late]

* Agenda

* Previous Minutes

* Amsterdam Editorial Meeting

Monday and Tuesday June 20-21, 2011

* Seneca BV Implementation

http://lists.w3.org/Archives/Public/public-forms/2011May/0030.html

* Interest Group

Steven Pemberton: It's possible we should have an interest group. The advantage I see is that it gets us in contact with Seneca, and EMC/Documentum.

* HTML5 Last Call

Steven Pemberton: Last call is coming up.

* Multiple MIP Bindings

http://lists.w3.org/Archives/Public/www-forms/2011May/0010.html

Steven Pemberton: Joern asks what if two type MIPs on the same node conflict.
Leigh Klotz: This should be fairly easy to answer.
Uli Lissé: John has already answered http://lists.w3.org/Archives/Public/www-forms/2011May/0011.html
Leigh Klotz: So it's identically invalid, according to John.
Steven Pemberton: So we're happy with John's answer.

* JSON Instances

http://lists.w3.org/Archives/Public/public-forms/2011May/0026.html

Steven Pemberton: Here is the updated entry, incorporating Alain's notes about arrays. http://www.w3.org/MarkUp/Forms/wiki/Json
Steven Pemberton: Nick and Alain asked for replacing type with xsi:type. I think that's quite possible. I found a place where you need an array and type number, so you can't use type for array. The first element of the array has both a marker that it's an array and a marker that it's a number, so the argument against using xsi:type disappears. But what do you gain by replacing type with xsi:type?
Leigh Klotz: You gain automatic validation.
Steven Pemberton: What's the equivalent of null?
Leigh Klotz: xsi:nil http://www.w3.org/TR/xmlschema-1 says An element may be valid without content if it has the attribute xsi:nil with the value true . An element so labeled must be empty, ...
Steven Pemberton: For {"val":null} I was suggesting <val type="null" />. But now I would say <val xsi:nil="true" />.
Leigh Klotz: It's a question of intent; without a Schema language for JSON it's hard to tell whether you want a value set back to null or the empty string. In JavaScript people check for "" or null anyway.
Steven Pemberton: That leads me back to type.
Leigh Klotz: We can make up our own rules. We should put on an xsi:type into these nodes.
Steven Pemberton: Do you have to put an xsi:type on everything?
Leigh Klotz: No type on strings.
Leigh Klotz: Steven or JSON objects.
Steven Pemberton: So we should put a type on nil?
Leigh Klotz: Either restriction of string of length 0 or just string, for default.
Steven Pemberton: If one of the fields says val:null then I want it to say that afterward.
Leigh Klotz: Yes, it's a confusing set of options. If a value comes in as 3, we don't know if they want null afterward, so all we can do is tell the author to set it to null.
Steven Pemberton: I kind of prefer type=null. xsi:type seems more complicated. There's a problem that JSON doesn't distinguish between integer, decimal, and float.
Leigh Klotz: Neither does XPath.
Steven Pemberton: So we need new types.
Leigh Klotz: We can use our XForms copies of the types and use xforms:string to mean either a string or null. xforms:integer is either an integer or null.
Steven Pemberton: I need to think about it a little longer but it sounds doable.
Alain Couthuries: If you want an empy string you need a MIP.
Leigh Klotz: That's the default type of xsd:string.
Steven Pemberton: {a: ""; b: null\}
Leigh Klotz: a is xsd:string, b is xforms:string
Alain Couthuries: Then string is an exception if we parse it as xsd:string instead of xforms:string.

Steven Pemberton: Let me think on that.
Steven Pemberton: Next, should we record the mediatype in the root element? The author doesn't have to know it's JSON.
Leigh Klotz: This XML document has some kind of grammar associated with it and you'd like to indicate it.
Steven Pemberton: Is there any advantage to doing this: <json mediatype="application/json">....
Leigh Klotz: As a marker? L34T just puts xsl:version="1.0" or xsl:version="2.0" on the root element.
Steven Pemberton: The serializer needs to know it came from an application/json resource. I don't think the root element name is enough. The processor has to remember.
Steven Pemberton: If it's not necessarily visible in the submission.
Leigh Klotz: The naive theory would be to have the form author write it in the submission. You're worried about content negotiation?
Steven Pemberton: So let the form serialize it in the same way.
Leigh Klotz: So you really want a mediatype on the instance, as metadata.
Alain Couthuries: Could it be a dynamic attribute?
Steven Pemberton: Maybe my question isn't clear. If the processor recognizes that it's getting JSON, and it re-serializes it, it does it as JSON.
Leigh Klotz: Would this serialize as XML? <xf:instance><json xmlns="" mediatype="application/json">...
Steven Pemberton: You'd have to say it yourself.
Leigh Klotz: It has to be metadata, because otherwise you might mis-serialize XML.
Steven Pemberton: I see. So not in the instance.
Leigh Klotz: But maybe xf:instance/@mediatype, default to application/xml, reset to value from connection response on replace="instance". Then you may need a way to read it, but otherwise it should be fairly easy.

Steven Pemberton: What about formfeed and other characters in text?
Leigh Klotz: Maybe hexbinary encode the whole string? Ugh.

Steven Pemberton: Is XML defined in terms of its serialization?
Leigh Klotz: It's defined in terms of the InfoSet. I think IBM proposed the InfoSet so that you could have MQ-Series an alternate serialization of XML and it can handle EBCDIC and so on.
Steven Pemberton: So it's painful if it has backslashed charcters in it.
Leigh Klotz: Maybe just leave them like that.
Steven Pemberton: Yes, maybe that's the answer. The length of the string would be different in JSON and XForms, but so what.
Alain Couthuries: We can't leave it as a backslash. A JavaScript implementation would convert it.
Leigh Klotz: Yes, but you serialize it as XML.
Alain Couthuries: It's not serialized, it's executed.
Steven Pemberton: So \f gets interpreted as a formfeed.
Leigh Klotz: That'a a formfeed in a string. I don't think you can stick that string in through a DOM interface.
Steven Pemberton: Here's the proposed implementation: {chars: "\f\b"} -> <chars>\f\b</chars>
Alain Couthuries: It has to be processed back. It is first processed.
Leigh Klotz: You can just stick it in there and either it goes in and you can't get it out as XML but you can get it out as text for JSON serialization, or you can't get it in there (gets and exception) and you have to encode it somehow.
Steven Pemberton: For now I think I'll leave the backslashed characters as is.
Alain Couthuries: It would be a problem for textarea for newlines.
Leigh Klotz: Newlines are OK.
Steven Pemberton: It's backspace and formfeed.
Leigh Klotz: Not tab, it's OK.
Steven Pemberton: I'll try to work these into the text.

* IRC Minutes

http://www.w3.org/2011/06/01-forms-minutes.html

* Meeting Ends