/**
 * xtc abstractions for invoking tools of xml-tools.
 *
 * @author  Martin Bravenboer
 */
module xml-xtc-tools
imports strategoxt-xtc-tools

strategies

  /**
   * Parses an XML document to an xml-doc term.
   */
  xtc-parse-xml-doc =
      xtc-sglr(!"xml.tbl", !"Document")
    ; xtc-implode-asfix

  /**
   * Parses an XML document to an xml-info term.
   */
  xtc-parse-xml-info =
      xtc-parse-xml-doc
    ; xtc-transform(!"xml-doc-strip-whitespace", pass-verbose)
    ; xtc-xml-doc2xml-info

  xtc-pp-xml-info =
      xtc-xml-info2xml-doc
    ; xtc-pp-xml-doc

  xtc-pp-xml-doc =
      xtc-transform(!"xml-doc2abox", pass-verbose)
    ; xtc-abox2text

strategies

  /**
   * Converts an xml-doc term to an xml-info term.
   */
  xtc-xml-doc2xml-info =
    xtc-transform(!"xml-doc2xml-info", pass-verbose)

  /**
   * Converts an xml-info term to an xml-doc term.
   */
  xtc-xml-info2xml-doc =
    xtc-transform(!"xml-info2xml-doc", pass-verbose)
