#!/home/marcel/Languages/Perl6/Projects/Semi-xml/bin/sxml2xml.pl6
#
---
options/xml-prelude/show:       1;
options/doctype/show:           1;
options/doctype/definition: [
        <!ENTITY library "Library">
        <!ENTITY nbsp " ">
#        <!ENTITY % isoamsa SYSTEM "/home/marcel/Languages/Perl/Lib/Modules/Data2any-Xml/Entities/isoamsa.ent">
#        %isoamsa\;
#        <!ENTITY % isopub SYSTEM "/home/marcel/Languages/Perl/Lib/Modules/Data2any-Xml/Entities/isopub.ent">
#        #%isopub\;
];

output/filepath:                .;

output/program/xml:     | xmllint --format - > MongoDB.xml;
output/program/chk:
        | tee MongoDB.xml | xmllint --format -
        | rnv /usr/share/xml/docbook5/schema/rng/5.0/docbook.rnc
        ;
output/program/pdf:
        | xsltproc --encoding utf-8 --xinclude stylesheet.xsl -
        | xep -fo - -pdf MongoDB.pdf
        ;

#module/file:                            SxmlLib::File;
---
$article xmlns=http://docbook.org/ns/docbook
      xmlns:xi=http://www.w3.org/2001/XInclude
      xmlns:xl=http://www.w3.org/1999/xlink
      version=5.0
      xml:lang=en [
  $title [ Perl 6 MongoDB driver ]
  $info [
    $author [
      $personname [
        $firstname [ Marcel ]
        $surname [ Timmerman ]
      ]
      $email [ mt1957@gmail.com ]
    ]

    $address [
      $city [ Haarlem ]
      $country [ Netherlands ]
    ]

    $copyright [
      $year [ 2015, 2016 ... Inf ]
      $holder [ Marcel Timmerman ]
    ]

    $date [ $!SxmlCore.date [] ]
    $abstract [
      $para [
        MongoDB is a $*citation[NoSQL] database which uses $*abbrev[BSON] to 
        store and load information in a database. For Perl 6 there are two
        driver libraries $*citation[MongoDB] and $*citation[BSON]. BSON is a
        binary version of the javascript JSON.
      ]

      $para [
        The latest version of this document is generated on date
        $!SxmlCore.date []
      ]
    ]
  ]
  
  $sect1 [
    $title [Introduction]
    $para [
    ]
  ]

  $sect1 [
    $title [Implementation]
    $para [
    ]
  ]

  $sect1 [
    $title [Dependencies]
    $para [
    ]
    $sect2 [
      $title [BSON]
      $para [
      ]
    ]
  ]

  $sect1 [
    $title [Examples]
    $para [
    ]
    $sect2 [
      $title [Starting and stopping]
      $para [
      ]
    ]
  ]


#   $bibliolist:
#      $title: Bibliography
  $bibliography [
    $biblioentry [
#      $abbrev [MIMETYPES]
#      $title [A list of all mimetypes]
#      $abstract [A list of mimetypes can be found on the]
#      $ulink url=http://www.sitepoint.com/web-foundations/mime-types-complete-list/ [
#      ]
    ]
  ]
]
