namespace dc = "http://purl.org/dc/elements/1.1/"
namespace h = "http://www.w3.org/1999/xhtml"
dc:title [
  "fpx: Floating Point numbers in XML"
]
dc:description [
  "RELAX NG schema for lexical representations of floating point numbers. Ultimately this is essentially a datatypeLibrary for use in RelaxNG, although not yet implemented as such."
]
dc:author [ "Toby White" ]
dc:rights [ "© Copyright Toby White <tow@uszla.me.uk> 2006, 2007." ]
dc:date ["20072901"]

boolean = xsd:token { pattern = "true|false" }
listOfBooleans = xsd:token { pattern = "(true|false)(\s+(true|false))*" }

positiveInteger = xsd:token { pattern = "\d+" }
listOfPositiveIntegers = xsd:token { pattern = "(\d+)(\s+\d+)*" }

integer = xsd:token { pattern = "[+\-]?\d+" }
listOfIntegers = xsd:token { pattern = "([+\-]?\d+)(\s+[+\-]?\d+)*" }

realNumber = xsd:token { pattern = "[+\-]\d+(\.\d*)?" }
listOfRealNumbers = xsd:token { pattern = "([+\-]\d+(\.\d*)?)(\s+[+\-]\d+(\.\d*)?)*" }

realNumberWithExponent =
  xsd:token { pattern = "[+\-]?\d+(\.\d*)?([dDeE][+\-]?\d+)?" }
listOfRealNumbersWithExponent =
  xsd:token { pattern = "([+\-]?\d+(\.\d*)?([dDeE][+\-]?\d+)?)(\s+[+\-]?\d+(\.\d*)?([dDeE][+\-]?\d+)?)*" }

complexNumberWithExponent =
  xsd:token {
    pattern =
      "\(\s*[+\-]?\d+(\.\d*)?([dDeE][+\-]?\d+)?\s*\)\+i\(\s*[+\-]?\d+(\.\d*)?([dDeE][+\-]?\d+)?\s*\)"
  }
listOfComplexNumbersWithExponent =
  xsd:token {
    pattern =
      "\(\s*[+\-]?\d+(\.\d*)?([dDeE][+\-]?\d+)?\s*\)\+i\(\s*[+\-]?\d+(\.\d*)?([dDeE][+\-]?\d+)?\s*\)(\s+\(\s*[+\-]?\d+(\.\d*)?([dDeE][+\-]?\d+)?\s*\)\+i\(\s*[+\-]?\d+(\.\d*)?([dDeE][+\-]?\d+)?\s*\))*"
  }
