W3C home > Mailing lists > Public > public-qt-comments@w3.org > October 2002

RE: Canonical representations

From: Ashok Malhotra <ashokma@microsoft.com>
Date: Thu, 3 Oct 2002 05:44:59 -0700
Message-ID: <E5B814702B65CB4DA51644580E4853FB03E9FE66@red-msg-12.redmond.corp.microsoft.com>
To: "Natalie Gordon" <nfg@decisionsoft.com>, <public-qt-comments@w3.org>

In situations where a value can be represented lexically in more than
one way, XML Schema provides a canonical representation.  This is
primarily for software that generates XML so that it has a single
lexical representation to work with.  It is useful in other situations
as well but all the lexical representations are legal and a conformant
XML Schema processor must accept them all.

Thus, there is no requirement that the examples in the F&O return only
the canonical representation.  You may feel that this is desirable but
it is not necessary.

All the best, Ashok 
Ashok Malhotra              <mailto: ashokma@microsoft.com> 
Microsoft Corporation
212 Hessian Hills Road
Croton-On-Hudson, NY 10520 USA 
Redmond: 425-703-9462                New York: 914-271-6477 

-----Original Message-----
From: Natalie Gordon [mailto:nfg@decisionsoft.com] 
Sent: Thursday, October 03, 2002 3:26 AM
To: public-qt-comments@w3.org
Subject: Canonical representations


Looking at the canonical representation of a double in XML Schema 2 
Datatypes, it is specified that 'the exponent must be indicated by "E"'.

I read that as saying that an E must always be specified for a double, 
therefore 1.2 would be represented by 1.2E0 (likewise 12 would be 
represented by 1.2E1).  Is that the correct way to 
read this spec?

In the F&O spec Avg (14.4.2) and Sum (14.4.5) both return doubles.  But 
the examples of these seem to return decimals (ie. there is no 'E').
These are used in the XML Query Use Cases and seem to return decimals.

So either Avg and Sum should return decimals not doubles or my 
interpretation of a double is incorrect.

Any explanation would be appreciated.


Natalie Gordon, Software Engineer	  DecisionSoft Ltd.
Telephone: +44 (0) 1865 203192		  http://www.decisionsoft.com
Pathan Open Source XPath 2:
Received on Thursday, 3 October 2002 08:45:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:43 UTC