xsd datattypes - was: Monday 14 November, Weekly meeting

On 14 Nov 2011, at 19:03, Henry Story wrote:

> Hi,
> 
>   Below are the notes of this weeks weekly meeting that were typed into Skype.
> 
> The problem with Skype and conf calls is that it does not seem to be possible to get people to join a conversation that has started without calling all the other people on the conf call that did not join the conf call. Or at lead we seemed to have some difficulty with that. So we did not intend to call all 25 people in the meeting.
> 
> We discussed 2 things, and went past the hour
> 
> 1. rewriting the main protocol sequence in clearer language. I'll try to put forward a proposal for that later this week
> 2. a longish debate about using xsd:base64Binary or xsd:hexBinary where we discovered a few pros and cons
>  


Melvin pointed me to the "W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes" updated  21 July 2011
 http://www.w3.org/TR/xmlschema11-2/#base64Binary 

Here are a few points

http://www.w3.org/TR/xmlschema11-2/#base64Binary
   Definition:   base64Binary represents arbitrary Base64-encoded binary data.  For base64Binary data the entire binary stream is encoded using the Base64 Encoding defined in [RFC 3548], which is derived from the encoding described in [RFC 2045].
   Value Space: The ·value space· of base64Binary is the set of finite-length sequences of zero or more binary octets.  The length of a value is the number of octets.

  This allows for multiple line encodings.

http://www.w3.org/TR/xmlschema11-2/#hexBinary
  Definition:  hexBinary represents arbitrary hex-encoded binary data. 
  Value Space: The ·value space· of hexBinary is the set of finite-length sequences of zero or more binary octets.  The length of a value is the number of octets.
 The set recognized by hexBinary is the same as that recognized by the regular expression '([0-9a-fA-F]{2})*'.

 white space can be collapsed: which means

  After the processing implied by replace, contiguous sequences of #x20's are collapsed to a single #x20, and any #x20 at the start or end of the string is then removed.

 So hexBinarys cannot have white space between them.

So that means that the current score for plus and minus are

  + it could make things like making a simple SPARQL ASK query possible, which would be a lot more efficient
    one could query the DB with 

    SPARQL ASK {
       <http://bblfish.net/#hjs> cert:key [ rsa:public_exponent "9D79BFE2F4..."^^xsd:hexBinary;
                                            rsa:exponent 65537 ] .
    }
   
    which would be the same query as 

    SPARQL ASK {
       <http://bblfish.net/#hjs> cert:key [ rsa:public_exponent "ASF23SDF..."^^xsd:hexBinary;
                                            rsa:exponent 65537 ] .
    }

   - hex does not allow white space, making it more difficult to read. base64 does allow newlines it seems and white space perhaps"
   + it would be standard and supported by all tools ==> verify
   - xsd:base64Binary or xsd:hexBinary is a binary encoding, but we don't really know what it is and encoding of. The spec says "hexBinary represents arbitrary hex-encoded binary data.". http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#base64Binary
A modulus and an exponent is a number - a positive natural number to be precise = but arbitrary data could be anything. So there would be some research to be done here to see how one can use that if one wants it to be a number, or how one should specify it, and what the binary number ordering problems are that come with it." 


Henry

> 
> I think next week we'll try meeting on the W3C channel again, and see how that compares.
> 
> Some parts of this discussion can be seen below.
> 
> 
> [14/11/2011 16:22:20] Mike Jones: Henry?
> [14/11/2011 16:25:26] Henry Story added dominik_domel1, Melvin Carvalho to this conversation
> [14/11/2011 16:27:28] Mike Jones: one mo
> [14/11/2011 16:27:40] Mike Jones added bergos to this conversation
> [14/11/2011 16:27:45] bergos: bergos can’t be added to this conversation due to his/her privacy settings
> [14/11/2011 16:28:12] Henry Story: 
> [14/11/2011 16:28:35] Henry Story added bergos to this conversation
> [14/11/2011 16:31:11] Henry Story: The following steps are executed by Verification Agents and Identification Agents to determine the global identity of the requesting agent. Once this is known, the identity can be used to determine if access should be granted to the requested resource.
> 
> The Identification Agent (Bob's Browser) requests an action (GET, PUT, POST, DELETE, ... ) on a resource managed by the Verification Agent (Alice's Web Server) using HTTP over a TLS connection [HTTP-TLS] .
> [14/11/2011 16:33:10] Henry Story: The Identification Agent (Bob's Browser) requests an action (GET, PUT, POST, DELETE, ... ) on a resource managed by the Verification Agent (Alice's Web Server) using HTTP over a TLS connection [HTTP-TLS] .
> [14/11/2011 16:38:57] dominik_domel1: http://www.faqs.org/rfcs/rfc2119.html
> [14/11/2011 16:40:45] Henry Story: http://www.w3.org/2005/Incubator/webid/spec/#authentication-sequence
> [14/11/2011 16:41:45] Henry Story: 1. The Identification Agent attempts to establish a TLS conection
> [14/11/2011 16:43:16] Henry Story: 1. The User Agent attempts to establish a TLS conection [ to a server at a port ]
> [14/11/2011 16:47:00] Henry Story: Assuming it does establish the server identity
> [14/11/2011 16:49:35] Henry Story: 2. During the TLS communication, the server may wish to request the client's identity
> [14/11/2011 16:55:29] Melvin Carvalho: yep
> [14/11/2011 16:55:33] Melvin Carvalho: :)
> [14/11/2011 17:12:36] bergos: http://www.w3.org/2011/06/20-webid-minutes.html
> [14/11/2011 17:13:17] bergos: can you hear me?
> [14/11/2011 17:13:40] Henry Story: no I can't ehar you
> [14/11/2011 17:13:49] Melvin Carvalho: yes
> [14/11/2011 17:18:52] dominik_domel1: MicroTurtle for tweeter is interesting http://buzzword.org.uk/2009/microturtle/spec
> [14/11/2011 17:20:21] Melvin Carvalho: http://lists.w3.org/Archives/Public/public-rww/2011Oct/0043.html
> [14/11/2011 17:21:22] Melvin Carvalho: sorry here it is: https://plus.google.com/112399767740508618350/posts/dKamSePB4Yx
> [14/11/2011 17:21:30] Melvin Carvalho: kingsleys twitter idp
> [14/11/2011 17:22:40] dominik_domel1: +1 Bergi commit to W3C HG
> [14/11/2011 17:27:44] dominik_domel1: +1 Malvin literals -1 for dypedliteral with cert:hex
> [14/11/2011 17:28:01] Henry Story: a cert:key [ rsa:modulus "22 dd"^^xsd:hex
> [14/11/2011 17:29:57] dominik_domel1: now:
> rsa:modulus """
> ...
> 91:a1
> """^^cert:hex;
> [14/11/2011 17:30:13] dominik_domel1: we propose:
> rsa:modulus """
> ...
> 91:a1
> """;
> [14/11/2011 17:33:38] Melvin Carvalho: xsd:hexBinary
> [14/11/2011 17:33:45] Melvin Carvalho: http://books.xmlschemata.org/relaxng/ch19-77143.html
> [14/11/2011 17:33:59] dominik_domel1: I thing for users 1234 and 12:34 is the same complicated :)
> [14/11/2011 17:34:45] Henry Story: http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#hexBinary
> [14/11/2011 17:36:20] Melvin Carvalho: hexBinary has a lexical representation where each binary octet is encoded as a character tuple, consisting of two hexadecimal digits ([0-9a-fA-F]) representing the octet code. For example, "0FB7" is a hex encoding for the 16-bit integer 4023 (whose binary representation is 111110110111).
> [14/11/2011 17:38:14] Henry Story: i[Definition:]   hexBinary represents arbitrary hex-encoded binary data. The ·value space· of hexBinary is the set of finite-length sequences of binary octets.
> 
> 3.2.15.1 Lexical Representation
> 
> hexBinary has a lexical representation where each binary octet is encoded as a character tuple, consisting of two hexadecimal digits ([0-9a-fA-F]) representing the octet code. For example, "0FB7" is a hex encoding for the 16-bit integer 4023 (whose binary representation is 111110110111).
> 
> 3.2.15.2 Canonical Rrepresentation
> 
> The canonical representation for hexBinary is defined by prohibiting certain options from the Lexical Representation (§3.2.15.1). Specifically, the lower case hexadecimal digits ([a-f]) are not allowed.
> 
> 3.2.15.3 Constraining facets
> [14/11/2011 17:38:52] dominik_domel1: http://www.w3.org/TR/xmlschema-2/#hexBinary
> [14/11/2011 17:38:53] Henry Story: http://www.w3.org/TR/rdf-mt/
> [14/11/2011 17:39:11] Henry Story: http://www.w3.org/TR/rdf-mt/#dtype_interp
> [14/11/2011 17:42:18] dominik_domel1: in machine point of view hexBinary is better, for people cert:hex with chars like ":" and/or \n is more readable
> [14/11/2011 17:42:22] bergos: http://en.wikipedia.org/wiki/Endian
> [14/11/2011 17:48:05] dominik_domel1: all framework I know support xsd datatypes but cert:hex isn't support it all those tools
> [14/11/2011 17:50:04] Henry Story: http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#integer
> [14/11/2011 17:59:40] dominik_domel1: I think the compromise is use xsd:string wiht pattern and owl:withRestriction
> [14/11/2011 18:00:01] dominik_domel1: I send the example to mailing list
> [14/11/2011 18:01:39] Mike Jones: http://www.w3.org/TR/xmlschema-2/#base64Binary
> [14/11/2011 18:06:10] Henry Story: key exp [ cert:hex "heheheheh"
> [14/11/2011 18:06:21] dominik_domel1: maybe something like this in cert ont:
>       [ rdf:type             owl:Restriction ;
>         owl:onProperty       :hex ;
>         owl:someValuesFrom   
>          [ rdf:type             rdfs:Datatype ;
>            owl:onDatatype       xsd:string ;
>            owl:withRestrictions  ([xsd:pattern "REGEX*"])
>          ]
>       ] .
> [14/11/2011 18:11:32] dominik_domel1: xsd:pattern
> [14/11/2011 18:11:58] Mike Jones: example of hexBinary encoding text:
> http://books.xmlschemata.org/relaxng/ch19-77143.html
> [14/11/2011 18:15:39] Melvin Carvalho: :)
> [14/11/2011 18:18:23] Henry Story: 
> [14/11/2011 18:18:46] Henry Story: thanks
> [14/11/2011 18:19:01] Henry Story: I'll post that to the mailing list
> 

Social Web Architect
http://bblfish.net/

Received on Tuesday, 15 November 2011 11:31:10 UTC