• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

9.3 XSD lexical forms
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog SGML/XML parser
        • Writing markup
          • XSD lexical forms
            • xsd_number_string/2
            • xsd_time_string/3
Availability::- use_module(library(sgml)).(can be autoloaded)
[det]xsd_number_string(?Number, ?String)
This predicate is similar to number_string/2, but accepts floating point numbers according to the XML syntax rather than the Prolog syntax. In particular, XML does not require a‘0’(zero) before and after the decimal dot and accepts the constants NaN and INF. If a Prolog float is converted into a string it returns the XML canonical form. This form always has one digit before the decimal dot, at least one digit after it and an exponential component using the capital E. This predicate behaves as number_string/2 for integers.

Throws a syntax_error(xsd_number) if String is given and is not a well-formed XSD number.

ClioPatria (version V3.1.1-51-ga0b30a5)