• 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 Writing markup
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog SGML/XML parser
        • Writing markup
          • Writing documents
          • XML Quote primitives
          • XSD lexical forms
          • library(c14n2): C14n2 canonical XML documents
            • xml_write_canonical/3

9.4 library(c14n2): C14n2 canonical XML documents

C14n2 specifies a canonical XML document. This library writes such a document from an XML DOM as returned by the XML (or SGML) parser. The process takes two steps:

  • Normalise the DOM
  • Call xml_write/3 with appropriate flags
[det]xml_write_canonical(+Stream, +DOM, +Options)
Write an XML DOM using the canonical conventions as defined by C14n2. Namespace declarations in the canonical document depend on the original namespace declarations. For this reason the input document must be parsed (see load_structure/3) using the dialect xmlns and the option keep_prefix(true).

ClioPatria (version V3.1.1-51-ga0b30a5)