Implementation Defined Behaviour

Numbers
Bindings
Parsing of PCDATA
The <define> Function
The <get> Function
Arithmetic Operators
Comparison Functions
Redefining Builtin Functions
Namespaces

The specification of the XEXPR language is laid out in a W3C note of 21 November 2000. However, the specification leaves quite a bit of information to be deduced from the examples and leaves other parts of the language loosly specified. This chapter documents the way that libxexpr implements the language and gives the rationale for each decision taken.

Numbers

Numbers are defined in pseudo-BNF as:

number         : whitespace sign simple-number whitespace
	       ;

whitespace     : [ \t\n]*
	       ;

sign           : [+-]?
	       ;

simple-number  : 0x[0-9A-Fa-f]+
	       | [0-9]+
	       | [0-9]+\.[0-9]+
	       | [0-9]+\.[0-9]+[eE][+-][0-9]+
	       ;

that is: they have an optional leading sign and may be surrounded with whitespace.

Rationale

While negative numbers can be created using <subtract> without the need for any signs, this seems overly cumbersome.

The examples in the specification make it clear that where two numbers are seperated by a space, this should be parsed as just two numbers and not two numbers plus an interveening string which a strict reading of the specification would imply.