Re: Data Model WD - canonical lexical representations

Hi Jeni,

Thank you for catching these. We will add an issue entitled
"Lexical representation of Schema primitive types" for tracking
purposes. We will take this up with XML Schema and work with them
to define the canonical lexical representation for these types.

Regarding xs:QName, we are currently working on various
namespace related issues including the ones that effect canonical
lexical representation and hoping to include the resolution of them
in our next draft.

Best regards,
Marton Nagy


> 
> Date: Sun, 13 Jan 2002 14:21:37 +0000
> From: Jeni Tennison <jeni@jenitennison.com>
> Message-ID: <58539046948.20020113142137@jenitennison.com>
> To: www-xml-query-comments@w3.org
> Subject: Data Model WD - canonical lexical representations
> 
> Hi,
> 
> Looking at the string-value accessor for simple typed values - while I
> think it's right to use the canonical lexical representation of the
> values, unfortunately the XML Schema Datatypes Rec doesn't detail the
> canonical lexical representation of all of the primitive types. In
> particular, no canonical lexical representation is specified for:
> 
>   - xs:string, xs:base64Binary, xs:anyURI (but that's OK, I think we
>     can guess)
> 
>   - xs:duration - presumably the lexical representation contains all
>     components of the duration (years, months, days, hours, minutes
>     and seconds, even those that occur 0 times? Or are these omitted?
>     In the latter case, what's the canonical lexical representation of
>     PT0S? Since the number of seconds can be a decimal, is this
>     decimal represented with a decimal point (i.e. using the canonical
>     lexical representation for xs:decimal)?
> 
>   - xs:date - what happens to the timezone component? Presumably,
>     unlike xs:dateTime and xs:time, this isn't normalized to Z?
>     (And similarly for xs:gYearMonth, xs:gYear, xs:gMonthDay,
>     xs:Month, and xs:Day)
> 
>   - xs:QName and xs:NOTATION - these are the trickiest (their value
>     spaces are the same). The XML Schema Rec states that the lexical
>     representation of a QName depends on the in-scope namespaces. When
>     you're doing a query/transformation, which namespace declarations
>     do you use - the ones in the query/stylesheet or the ones from the
>     source document? What if there's more than one namespace
>     declaration for the namespace URI? What if there aren't any?
> 
>     The difficulty with using the original prefix for the QName is
>     that the definition of a canonical lexical representation is that
>     two equal values have exactly the same canonical lexical
>     representation. Equality of QNames should be based purely on the
>     namespace URI and local name, not on the prefix. One possibility
>     would be to introduce something like:
> 
>       {namespace-uri}local-name
> 
>     but this is not, of course, a valid lexical representation of a
>     QName.
> 
> 
> Cheers,
> 
> Jeni
> ---
> Jeni Tennison
> http://www.jenitennison.com/
> 

Received on Tuesday, 22 January 2002 16:00:42 UTC