[DFDL-WG] DFDL infoset and hexBinary
Mike Beckerle
beckerle at us.ibm.com
Fri Nov 16 15:23:59 CST 2007
What is the DFDL infoset value for a hexBinary type element?
Our doc says an element of type hexBinary has a value member in the
infoset whose type is a hexBinary, but what is a hexBinary anyway?
Consider this 12 bytes of data, dumped here as hex:
003100320033004100420043
If that's a string in UTF-16BE encoding, it looks like "123ABC"
It is 12 bytes long.
Suppose we describe this using this DFDL:
<element name="a" type="hexBinary" length='12' />
As I understand it, this is correct XSD in that the length of a hexBinary
is always specified as the number of 'octets' of the binary data, not
characters.
Now, the contents of the basic XML infoset for an element matching this
schema are these 24 characters: "003100320033004100420043". This is
because the XML infoset has no idea what this string is because it is not
schema aware.
An XML document corresponding to this might look like:
<! xml version='1.0' encoding="UTF-16BE" !>
<a>003100320033004100420043</a>
So, the question is......
What are the contents of the DFDL Infoset for a hexBinary like this? Same
24 characters? or 12 'octets' of data?
This is essentially the answer to the question "what IS a hexBinary?" or
maybe "what is a hexBinary in the PSVI other than just a string?"
...mikeb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ogf.org/pipermail/dfdl-wg/attachments/20071116/62d12348/attachment.html
More information about the dfdl-wg
mailing list