[Bug 1566] [FS] technical: 4.1.1 Literals

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1566


simeon@us.ibm.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Additional Comments From simeon@us.ibm.com  2005-07-20 23:31 -------
Michael,

Thanks for the comment. It seems that a somewhat cleaner way to write the
semantics would be to introduce an auxiliary judgment to go from
literalexpressions to literalvalues. This would be a bit less heavy-handed than
a function.

This could look as follows. Would that be better?

- Jerome

We could introduce an auxiliary judgement to go from the syntax tree
literal to the value literal. As follows.

Instead of writing:

  -------------------------------------------------------
  dynEnv |- IntegerLiteral => xs:integer (IntegerLiteral)


write:

  IntegerLiteral has literal value IntegerValue
  -------------------------------------------------------------
  dynEnv |- IntegerLiteral => IntegerLiteral of type xs:integer


Instead of writing:

  ---------------------------------------------------
  dynEnv |- DoubleLiteral => xs:double(DoubleLiteral)

write:

  DoubleLiteral has literal value DoubleValue
  --------------------------------------------------------
  dynEnv |- DoubleLiteral => DoubleValue of type xs:double

where the has literal value raises a static error if the literal
overflows.

Instead of writing:

  ---------------------------------------------------
  dynEnv |- StringLiteral => xs:string(StringLiteral)

write:

  StringLiteral has literal value StringValue
  --------------------------------------------------------
  dynEnv |- StringLiteral => StringValue of type xs:string

Where the judgment 'has literal value' deals with character
references, and predefined entity references.

Received on Wednesday, 20 July 2005 23:31:18 UTC