Commits

dirkbaechle committed 70b6dcd

- switched all docs to SCons XSD

Comments (0)

Files changed (74)

 
 # Do we have libxml2/libxslt/lxml?
 has_libxml2 = True
-has_lxml = True
 try:
     import libxml2
     import libxslt
 except:
     has_libxml2 = False
-try:
-    import lxml
-except:
-    has_lxml = False
+    try:
+        import lxml
+    except:
+        print("Failed to import either libxml2/libxslt or lxml")
+        sys.exit(1)
 
-try:
-  from lxml import etree
-except ImportError:
-  try:
-    # Python 2.5
-    import xml.etree.cElementTree as etree
-  except ImportError:
+has_etree = False
+if not has_libxml2:
     try:
-      # Python 2.5
-      import xml.etree.ElementTree as etree
+        from lxml import etree
+        has_etree = True
     except ImportError:
-      try:
-        # normal cElementTree install
-        import cElementTree as etree
-      except ImportError:
+        pass
+if not has_etree:
+    try:
+        # Python 2.5
+        import xml.etree.cElementTree as etree
+    except ImportError:
         try:
-          # normal ElementTree install
-          import elementtree.ElementTree as etree
+            # Python 2.5
+            import xml.etree.ElementTree as etree
         except ImportError:
-          print("Failed to import ElementTree from any known place")
-          sys.exit(1)
+            try:
+                # normal cElementTree install
+                import cElementTree as etree
+            except ImportError:
+                try:
+                    # normal ElementTree install
+                    import elementtree.ElementTree as etree
+                except ImportError:
+                    print("Failed to import ElementTree from any known place")
+                    sys.exit(1)
 
 re_entity = re.compile("\&([^;]+);")
 re_entity_header = re.compile("<!DOCTYPE\s+sconsdoc\s+[^\]]+\]>")
     THIS IS AN AUTOMATICALLY-GENERATED FILE.  DO NOT EDIT.
   """
 
+def isSConsXml(fpath):
+    """ Check whether the given file is a SCons XML file, i.e. it
+        contains the default target namespace definition.
+    """
+    try:
+        f = open(fpath,'r')
+        content = f.read()
+        f.close()
+        if content.find(dbxsd) >= 0:
+            return True
+    except:
+        pass
+    
+    return False 
+
 def xml_tree(root, comment=generated_comment):
     """ Return a XML file tree with the correct namespaces set,
         the element root as top entry and the given header comment.
     c = etree.Comment(comment)
     t.append(c)
 
-    # print etree.tostring(t, xml_declaration=True, encoding="UTF-8", pretty_print=True)
-
     return t
 
 def remove_entities(content):
 
 default_xsd = os.path.join('doc','xsd','scons.xsd')
 
+ARG = "dbscons"
+
+class Libxml2ValidityHandler:
+    
+    def __init__(self):
+        self.errors = []
+        self.warnings = []
+        
+    def error(self, msg, data):
+        if data != ARG:
+            raise Exception, "Error handler did not receive correct argument"
+        self.errors.append(msg)
+
+    def warning(self, msg, data):
+        if data != ARG:
+            raise Exception, "Warning handler did not receive correct argument"
+        self.warnings.append(msg)
+
 def validate_xml(fpath, xmlschema_context):
     if not has_libxml2:
-        # At the moment we prefer libxml2 over lxml, the latter can lead
-        # to conflicts when installed together with libxml2.
-        if has_lxml:
-            # Use lxml
-            xmlschema = etree.XMLSchema(xmlschema_context)
-            doc = etree.parse(fpath)
-            try:
-                xmlschema.assertValid(doc)
-            except:
-                return False
-            return True
-        else:
-            # Try xmllint as a last fallback
-            try:
-                import subprocess
-                p = subprocess.Popen(['xmllint','--noout','--noent','--schema',default_xsd,fpath],
-                                     stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-                sout, serr = p.communicate()
-                if serr and not 'validates' in serr:
-                    print serr
-                    return False
-                
-                return True
-                
-            except:
-                print "Can't validate %s! Neither lxml/libxml2, nor xmllint found." % fpath
-                return False
+        # Use lxml
+        xmlschema = etree.XMLSchema(xmlschema_context)
+        doc = etree.parse(fpath)
+        doc.xinclude()
+        try:
+            xmlschema.assertValid(doc)
+        except Exception, e:
+            print e
+            print "%s fails to validate" % fpath
+            return False
+        return True
 
+    # Create validation context
+    validation_context = xmlschema_context.schemaNewValidCtxt()
+    # Set error/warning handlers
+    eh = Libxml2ValidityHandler()
+    validation_context.setValidityErrorHandler(eh.error, eh.warning, ARG)
     # Read file and resolve entities
     doc = libxml2.readFile(fpath, None, libxml2.XML_PARSE_NOENT)
-    err = xmlschema_context.schemaValidateDoc(doc)
+    doc.xincludeProcessFlags(libxml2.XML_PARSE_NOENT)
+    err = validation_context.schemaValidateDoc(doc)
     # Cleanup
     doc.freeDoc()
-    
-    if err:
-        # TODO: print error message "Haha",err
+    del validation_context
+
+    if err or eh.errors:
+        for e in eh.errors:
+            print e.rstrip("\n")
+        print "%s fails to validate" % fpath
         return False
         
     return True
 
 def prettyprint_xml(fpath):
     if not has_libxml2:
-        # At the moment we prefer libxml2 over lxml, the latter can lead
-        # to conflicts when installed together with libxml2.
-        if has_lxml:
-            # Use lxml
-            fin = open(fpath,'r')
-            tree = etree.parse(fin)
-            pretty_content = etree.tostring(tree, pretty_print=True)
-            fin.close()
+        # Use lxml
+        fin = open(fpath,'r')
+        tree = etree.parse(fin)
+        pretty_content = etree.tostring(tree, pretty_print=True)
+        fin.close()
 
-            fout = open(fpath,'w')
-            fout.write(pretty_content)
-            fout.close()
-        else:
-            # Use xmllint as a last fallback
-            try:
-                import subprocess
-                p = subprocess.Popen(['xmllint', '-o', fpath, '--format', fpath],
-                                     stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-                sout, serr = p.communicate()
-            except:
-                print "Can't prettyprint %s! Neither lxml/libxml2, nor xmllint found." % fpath
-                return False
+        fout = open(fpath,'w')
+        fout.write(pretty_content)
+        fout.close()
 
     # Read file and resolve entities
-    doc = libxml2.readFile(fpath, None, libxml2.XML_PARSE_NOENT)
+    doc = libxml2.readFile(fpath, None, libxml2d.XML_PARSE_NOENT)
     err = xmlschema_context.schemaValidateDoc(doc)
     # Cleanup
     doc.freeDoc()
 
 perc="%"
 
-def validate_all_xml(dpath='src', xsdfile=default_xsd):
+def validate_all_xml(dpaths, xsdfile=default_xsd):
     xmlschema_context = None
     if not has_libxml2:
-        # At the moment we prefer libxml2 over lxml, the latter can lead
-        # to conflicts when installed together with libxml2.
-        if has_lxml:
-            # Use lxml
-            xmlschema_context = etree.parse(xsdfile)
+        # Use lxml
+        xmlschema_context = etree.parse(xsdfile)
     else:
         # Use libxml2 and prepare the schema validation context
         ctxt = libxml2.schemaNewParserCtxt(xsdfile)
-        schema = ctxt.schemaParse()
+        xmlschema_context = ctxt.schemaParse()
         del ctxt
-        xmlschema_context = schema.schemaNewValidCtxt()
     
     fpaths = []
-    for path, dirs, files in os.walk(dpath):
-        for f in files:
-            if f.endswith('.xml'):
-                fp = os.path.join(path, f)
-                fpaths.append(fp)
+    for dp in dpaths:
+        for path, dirs, files in os.walk(dp):
+            for f in files:
+                if f.endswith('.xml'):
+                    fp = os.path.join(path, f)
+                    if isSConsXml(fp):
+                        fpaths.append(fp)
                 
     fails = []
     for idx, fp in enumerate(fpaths):
     if has_libxml2:
         # Cleanup
         del xmlschema_context
-        del schema
 
     if fails:
         return False

bin/docs-update-generated.py

 #
 
 import os
+import SConsDoc
 
 # Directory where all generated files are stored
 gen_folder = 'doc/generated'
         for f in files:
             if f.endswith('.xml'):
                 fpath = os.path.join(path, f)
-                flist.append(fpath)
+                if SConsDoc.isSConsXml(fpath):
+                    flist.append(fpath)
 
     if flist:
         # Does the destination folder exist

bin/docs-validate.py

 # use different XML editors...
 #
 
+import os
 import SConsDoc
 
 if __name__ == "__main__":
-    if SConsDoc.validate_all_xml():
+    if SConsDoc.validate_all_xml(['src',
+                                  os.path.join('doc','design'),
+                                  os.path.join('doc','developer'),
+                                  os.path.join('doc','man'),
+                                  os.path.join('doc','python10'),
+                                  os.path.join('doc','reference'),
+                                  os.path.join('doc','user')
+                                  ]):
         print "OK"
     else:
         print "Validation failed! Please correct the errors above and try again."

bin/scons-proc.py

 
 # Step 3: Validating all input files
 print "Validating files against SCons XSD..."
-if SConsDoc.validate_all_xml():
+if SConsDoc.validate_all_xml(['src']):
     print "OK"
 else:
     print "Validation failed! Please correct the errors above and try again."

doc/design/MANIFEST

 main.xml
 native.xml
 overview.xml
-scons.mod
+summary.xml

doc/design/acks.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-acks"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Acknowledgements</title>
+
 <!--
 
-  Copyright (c) 2001, 2002, 2003 Steven Knight
+  __COPYRIGHT__
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
   </varlistentry>
  </variablelist>
 
+
+</chapter>

doc/design/bground.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-background"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Background</title>
+
 <!--
 
-  Copyright (c) 2001, 2002, 2003 Steven Knight
+  __COPYRIGHT__
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
   it would be a teensy bit easier to type.
 
  </para>
+
+</chapter>

doc/design/copyright.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<legalnotice xmlns="http://www.scons.org/dbxsd/v1.0"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+
 <!--
 
-  Copyright (c) 2001, 2002, 2003 Steven Knight
+  __COPYRIGHT__
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
 
  </para>
 </blockquote>
+
+</legalnotice>

doc/design/engine.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-engine"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Build Engine API</title>
+
 <!--
 
-  Copyright (c) 2001, 2002, 2003 Steven Knight
+  __COPYRIGHT__
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
   <para>
 
    &Builder; objects referenced in the &BUILDERMAP; do not need to be
-   listed separately in the &BUILDERS; variable.  The &consenv; will
+   listed separately in the <literal>BUILDERS</literal> variable.  The &consenv; will
    bind the union of the &Builder; objects listed in both variables.
 
   </para>
   <para>
 
    &Scanner; objects referenced in the &SCANNERMAP; do not need to
-   be listed separately in the &SCANNERS; variable.  The &consenv;
+   be listed separately in the <literal>SCANNERS</literal> variable.  The &consenv;
    will bind the union of the &Scanner; objects listed
    in both variables.
 
 	</programlisting>
 
 </section>
+
+</chapter>

doc/design/goals.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-goals"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Goals</title>
+
 <!--
 
-  Copyright (c) 2001, 2002, 2003 Steven Knight
+  __COPYRIGHT__
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
   </para>
 
 </section>
+
+</chapter>

doc/design/install.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-install"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Installation</title>
+
 <!--
 
-  Copyright (c) 2001, 2002, 2003 Steven Knight
+  __COPYRIGHT__
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
 <!--
 THIS CHAPTER NEEDS TO BE DISCUSSED AND WRITTEN.
 -->
+
+<para>
+
+</para>
+
+</chapter>

doc/design/intro.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-intro"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Introduction</title>
+
 <!--
 
-  Copyright (c) 2001, 2002, 2003 Steven Knight
+  __COPYRIGHT__
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
 -->
 
 </section>
+
+</chapter>

doc/design/issues.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-issues"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Other Issues</title>
+
 <!--
 
-  Copyright (c) 2001, 2002, 2003 Steven Knight
+  __COPYRIGHT__
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
    </para>
 
  </section>
+
+</chapter>

doc/design/main.xml

 
 <!--
 
-  Copyright (c) 2001, 2002, 2003 Steven Knight
+  __COPYRIGHT__
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
 
 -->
 
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
-[
+<!DOCTYPE sconsdoc [
 
-    <!--
-    We haven't updated the design document in ages.
-    Rather than fool people into thinking that it's
-    actually up-to-date and reflects the current design,
-    hard-code the version from back when we last updated it.
     <!ENTITY % version SYSTEM "../version.xml">
     %version;
-    -->
-    <!ENTITY builddate "2001/12/13 20:55:46">
-    <!ENTITY buildversion "0.91">
-    <!ENTITY buildrevision "0.01.D177">
 
-    <!--
-    Also freeze the scons.mod DTD extensions
-    to what they were way back when.
     <!ENTITY % scons SYSTEM "../scons.mod">
-    -->
-    <!ENTITY % scons SYSTEM "scons.mod">
     %scons;
 
-    <!ENTITY acks SYSTEM "acks.xml">
-    <!ENTITY bground SYSTEM "bground.xml">
-    <!ENTITY copyright SYSTEM "copyright.xml">
-    <!ENTITY engine SYSTEM "engine.xml">
-    <!ENTITY goals SYSTEM "goals.xml">
-    <!ENTITY install SYSTEM "install.xml">
-    <!ENTITY intro SYSTEM "intro.xml">
-    <!ENTITY issues SYSTEM "issues.xml">
-    <!ENTITY native SYSTEM "native.xml">
-    <!ENTITY overview SYSTEM "overview.xml">
-
 ]>
 
-<book>
+<book xmlns="http://www.scons.org/dbxsd/v1.0"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
   <bookinfo>
     <title>SCons Design version &buildversion;</title>
 
       <holder>Steven Knight</holder>
     </copyright>
 
-    <legalnotice>
-      &copyright;
-    </legalnotice>
+    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="copyright.xml"/>
 
     <releaseinfo>version &buildversion;</releaseinfo>
 
   </bookinfo>
 
-  <chapter id="chap-intro">
-    <title>Introduction</title>
-    &intro;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="intro.xml"/>
 
-  <chapter id="chap-goals">
-    <title>Goals</title>
-    &goals;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="goals.xml"/>
 
-  <chapter id="chap-overview">
-    <title>Overview</title>
-    &overview;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="overview.xml"/>
 
-  <chapter id="chap-engine">
-    <title>Build Engine API</title>
-    &engine;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="engine.xml"/>
 
-  <chapter id="chap-native">
-    <title>Native Python Interface</title>
-    &native;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="native.xml"/>
 
   <!--
 
-  <chapter id="chap-install">
-    <title>Installation</title>
-    &install;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="install.xml"/>
 
   -->
 
-  <chapter id="chap-issues">
-    <title>Other Issues</title>
-    &issues;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="issues.xml"/>
 
-  <chapter id="chap-background">
-    <title>Background</title>
-    &bground;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bground.xml"/>
 
-  <chapter id="chap-summary">
-    <title>Summary</title>
-    <para>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="summary.xml"/>
 
-      &SCons; offers a robust and feature-rich design for an SC-build
-      tool.  With a Build Engine based on the proven design of
-      the &Cons; utility, it offers increased simplification of the
-      user interface for unsophisticated users with the addition
-      of the "do-the-right-thing" <function>env.Make</function>
-      method, increased flexibility for sophisticated users with the
-      addition of &Builder; and &Scanner; objects, a mechanism to
-      allow tool-masters (and users) to share working construction
-      environments, and embeddability to provide reliable dependency
-      management in a variety of environments and interfaces.
-
-    </para>
-  </chapter>
-
-  <chapter id="chap-acks">
-    <title>Acknowledgements</title>
-    &acks;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acks.xml"/>
 
 </book>

doc/design/native.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-native"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Native Python Interface</title>
+
 <!--
 
-  Copyright (c) 2001, 2002, 2003 Steven Knight
+  __COPYRIGHT__
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
   <!-- END HTML -->
 
 </section>
+
+</chapter>

doc/design/overview.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-overview"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Overview</title>
+
 <!--
 
-  Copyright (c) 2001, 2002, 2003 Steven Knight
+  __COPYRIGHT__
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
  </section>
 
 </section>
+
+</chapter>

doc/design/scons.mod

-<!--
-
-  __COPYRIGHT__
-
-  An SCons-specific DTD module, for use with SCons DocBook
-  documentation, that contains names, phrases, acronyms, etc. used
-  throughout the SCons documentation.
-
--->
-
-
-
-<!--
-
-  Other applications that we reference.
-
--->
-
-<!ENTITY Aegis "<application>Aegis</application>">
-<!ENTITY Ant "<application>Ant</application>">
-<!ENTITY Autoconf "<application>Autoconf</application>">
-<!ENTITY Automake "<application>Automake</application>">
-<!ENTITY cc "<application>cc</application>">
-<!ENTITY Cons "<application>Cons</application>">
-<!ENTITY cp "<application>cp</application>">
-<!ENTITY csh "<application>csh</application>">
-<!ENTITY gcc "<application>gcc</application>">
-<!ENTITY Jam "<application>Jam</application>">
-<!ENTITY jar "<application>jar</application>">
-<!ENTITY javac "<application>javac</application>">
-<!ENTITY javah "<application>javah</application>">
-<!ENTITY Make "<application>Make</application>">
-<!ENTITY Makepp "<application>Make++</application>">
-<!ENTITY Python "<application>Python</application>">
-<!ENTITY ranlib "<application>ranlib</application>">
-<!ENTITY rmic "<application>rmic</application>">
-<!ENTITY SCons "<application>SCons</application>">
-<!ENTITY scons "<application>scons</application>">
-<!ENTITY ScCons "<application>ScCons</application>">
-<!ENTITY tar "<application>tar</application>">
-<!ENTITY touch "<application>touch</application>">
-<!ENTITY zip "<application>zip</application>">
-
-
-<!--
-
-  Classes.
-
--->
-
-<!ENTITY Action "<classname>Action</classname>">
-<!ENTITY ActionBase "<classname>ActionBase</classname>">
-<!ENTITY CommandAction "<classname>CommandAction</classname>">
-<!ENTITY FunctionAction "<classname>FunctionAction</classname>">
-<!ENTITY ListAction "<classname>ListAction</classname>">
-<!ENTITY Builder "<classname>Builder</classname>">
-<!ENTITY BuilderBase "<classname>BuilderBase</classname>">
-<!ENTITY CompositeBuilder "<classname>CompositeBuilder</classname>">
-<!ENTITY MultiStepBuilder "<classname>MultiStepBuilder</classname>">
-<!ENTITY Job "<classname>Job</classname>">
-<!ENTITY Jobs "<classname>Jobs</classname>">
-<!ENTITY Serial "<classname>Serial</classname>">
-<!ENTITY Parallel "<classname>Parallel</classname>">
-<!ENTITY Node "<classname>Node</classname>">
-<!ENTITY Node_FS "<classname>Node.FS</classname>">
-<!ENTITY Scanner "<classname>Scanner</classname>">
-<!ENTITY Sig "<classname>Sig</classname>">
-<!ENTITY Signature "<classname>Signature</classname>">
-<!ENTITY Taskmaster "<classname>Taskmaster</classname>">
-<!ENTITY TimeStamp "<classname>TimeStamp</classname>">
-<!ENTITY Walker "<classname>Walker</classname>">
-<!ENTITY Wrapper "<classname>Wrapper</classname>">
-
-
-
-<!--
-
-  Options, command-line.
-
--->
-
-<!ENTITY debug-explain "<literal>--debug=explain</literal>">
-<!ENTITY implicit-cache "<literal>--implicit-cache</literal>">
-<!ENTITY implicit-deps-changed "<literal>--implicit-deps-changed</literal>">
-<!ENTITY implicit-deps-unchanged "<literal>--implicit-deps-unchanged</literal>">
-<!ENTITY Q "<literal>-Q</literal>">
-
-<!--
-
-  Options, SConscript-settable.
-
--->
-
-<!ENTITY implicit_cache "<literal>implicit_cache</literal>">
-<!ENTITY implicit_deps_changed "<literal>implicit_deps_changed</literal>">
-<!ENTITY implicit_deps_unchanged "<literal>implicit_deps_unchanged</literal>">
-
-
-
-<!--
-
-  File and directory names.
-
--->
-
-<!ENTITY build "<filename>build</filename>">
-<!ENTITY Makefile "<filename>Makefile</filename>">
-<!ENTITY Makefiles "<filename>Makefiles</filename>">
-<!ENTITY SConscript "<filename>SConscript</filename>">
-<!ENTITY SConstruct "<filename>SConstruct</filename>">
-<!ENTITY Sconstruct "<filename>Sconstruct</filename>">
-<!ENTITY sconstruct "<filename>sconstruct</filename>">
-<!ENTITY sconsign "<filename>.sconsign</filename>">
-<!ENTITY src "<filename>src</filename>">
-
-
-
-<!--
-
-  Methods and functions.  This includes functions from both
-  the Build Engine and the Native Python Interface.
-
--->
-
-<!ENTITY Add "<function>Add</function>">
-<!ENTITY AddOptions "<function>AddOptions</function>">
-<!ENTITY Alias "<function>Alias</function>">
-<!ENTITY Aliases "<function>Aliases</function>">
-<!ENTITY Append "<function>Append</function>">
-<!ENTITY BoolOption "<function>BoolOption</function>">
-<!ENTITY Build "<function>Build</function>">
-<!ENTITY CacheDir "<function>CacheDir</function>">
-<!ENTITY Clean "<function>Clean</function>">
-<!ENTITY Clone "<function>Clone</function>">
-<!ENTITY Command "<function>Command</function>">
-<!ENTITY Configure "<function>Configure</function>">
-<!ENTITY Copy "<function>Copy</function>">
-<!ENTITY Default "<function>Default</function>">
-<!ENTITY DefaultRules "<function>DefaultRules</function>">
-<!ENTITY Depends "<function>Depends</function>">
-<!ENTITY Dir "<function>Dir</function>">
-<!ENTITY Entry "<function>Entry</function>">
-<!ENTITY EnumOption "<function>EnumOption</function>">
-<!ENTITY Environment "<function>Environment</function>">
-<!ENTITY Export "<function>Export</function>">
-<!ENTITY File "<function>File</function>">
-<!ENTITY Finish "<function>Finish</function>">
-<!ENTITY GenerateHelpText "<function>GenerateHelpText</function>">
-<!ENTITY Help "<function>Help</function>">
-<!ENTITY Ignore "<function>Ignore</function>">
-<!ENTITY Import "<function>Import</function>">
-<!ENTITY Install "<function>Install</function>">
-<!ENTITY InstallAs "<function>InstallAs</function>">
-<!ENTITY Link "<function>Link</function>">
-<!ENTITY ListOption "<function>ListOption</function>">
-<!ENTITY Local "<function>Local</function>">
-<!ENTITY Module "<function>Module</function>">
-<!ENTITY NoClean "<function>NoClean</function>">
-<!ENTITY Objects "<function>Objects</function>">
-<!ENTITY Options "<function>Options</function>">
-<!ENTITY PackageOption "<function>PackageOption</function>">
-<!ENTITY PathOption "<function>PathOption</function>">
-<!ENTITY Precious "<function>Precious</function>">
-<!ENTITY Prepend "<function>Prepend</function>">
-<!ENTITY Replace "<function>Replace</function>">
-<!ENTITY Repository "<function>Repository</function>">
-<!ENTITY Return "<function>Return</function>">
-<!ENTITY RuleSet "<function>RuleSet</function>">
-<!ENTITY Salt "<function>Salt</function>">
-<!ENTITY SetBuildSignatureType "<function>SetBuildSignatureType</function>">
-<!ENTITY SetContentSignatureType "<function>SetContentSignatureType</function>">
-<!ENTITY SourceSignature "<function>SourceSignature</function>">
-<!ENTITY SourceSignatures "<function>SourceSignatures</function>">
-<!ENTITY Split "<function>Split</function>">
-<!ENTITY TargetSignatures "<function>TargetSignatures</function>">
-<!ENTITY Task "<function>Task</function>">
-
-<!-- Environment methods -->
-<!ENTITY subst "<function>subst</function>">
-
-<!-- Configure context functions -->
-<!ENTITY Message "<function>Message</function>">
-<!ENTITY Result "<function>Result</function>">
-<!ENTITY CheckCHeader "<function>CheckCHeader</function>">
-<!ENTITY CheckCXXHeader "<function>CheckCXXHeader</function>">
-<!ENTITY CheckFunc "<function>CheckFunc</function>">
-<!ENTITY CheckHeader "<function>CheckHeader</function>">
-<!ENTITY CheckLib "<function>CheckLib</function>">
-<!ENTITY CheckLibWithHeader "<function>CheckLibWithHeader</function>">
-<!ENTITY CheckType "<function>CheckType</function>">
-<!ENTITY TryAction "<function>TryAction</function>">
-<!ENTITY TryBuild "<function>TryBuild</function>">
-<!ENTITY TryCompile "<function>TryCompile</function>">
-<!ENTITY TryLink "<function>TryLink</function>">
-<!ENTITY TryRun "<function>TryRun</function>">
-
-<!-- Python functions -->
-<!ENTITY str "<function>str</function>">
-<!ENTITY zipfile "<function>zipfile</function>">
-
-<!-- Obsolete, but referenced in old documents.  -->
-<!ENTITY Cache "<function>Cache</function>">
-
-
-
-<!--
-
-  Global variables.
-
--->
-
-<!ENTITY ARGUMENTS "<varname>ARGUMENTS</varname>">
-<!ENTITY BUILD_TARGETS "<varname>BUILD_TARGETS</varname>">
-<!ENTITY COMMAND_LINE_TARGETS "<varname>COMMAND_LINE_TARGETS</varname>">
-<!ENTITY DEFAULT_TARGETS "<varname>DEFAULT_TARGETS</varname>">
-
-
-
-<!--
-
-  Construction variables.
-
--->
-
-<!ENTITY BUILDERMAP "<varname>BUILDERMAP</varname>">
-<!ENTITY BUILDERS "<varname>BUILDERS</varname>">
-<!ENTITY CC "<varname>CC</varname>">
-<!ENTITY CCFLAGS "<varname>CCFLAGS</varname>">
-<!ENTITY CCCOM "<varname>CCCOM</varname>">
-<!ENTITY COLOR "<varname>COLOR</varname>">
-<!ENTITY COLORS "<varname>COLORS</varname>">
-<!ENTITY CONFIG "<varname>CONFIG</varname>">
-<!ENTITY CPPDEFINES "<varname>CPPDEFINES</varname>">
-<!ENTITY ENV "<varname>ENV</varname>">
-<!ENTITY JAVACLASSDIR "<varname>JAVACLASSDIR</varname>">
-<!ENTITY LIBDIRPREFIX "<varname>LIBDIRPREFIX</varname>">
-<!ENTITY LIBDIRSUFFIX "<varname>LIBDIRSUFFIX</varname>">
-<!ENTITY LIBLINKPREFIX "<varname>LIBLINKPREFIX</varname>">
-<!ENTITY LIBLINKSUFFIX "<varname>LIBLINKSUFFIX</varname>">
-<!ENTITY LIBPATH "<varname>LIBPATH</varname>">
-<!ENTITY LIBS "<varname>LIBS</varname>">
-<!ENTITY LINK "<varname>LINK</varname>">
-<!ENTITY LINKCOM "<varname>LINKCOM</varname>">
-<!ENTITY LINKFLAGS "<varname>LINKFLAGS</varname>">
-<!ENTITY RELEASE "<varname>RELEASE</varname>">
-<!ENTITY RELEASE_BUILD "<varname>RELEASE_BUILD</varname>">
-<!ENTITY SCANNERMAP "<varname>SCANNERMAP</varname>">
-<!ENTITY SCANNERS "<varname>SCANNERS</varname>">
-<!ENTITY TARFLAGS "<varname>TARFLAGS</varname>">
-<!ENTITY TARSUFFIX "<varname>TARSUFFIX</varname>">
-
-
-
-<!--
-
-  Environment variables.
-
--->
-
-<!ENTITY PATH "<varname>PATH</varname>">
-<!ENTITY PYTHONPATH "<varname>PYTHONPATH</varname>">
-<!ENTITY SCONSFLAGS "<varname>SCONSFLAGS</varname>">
-
-
-
-<!--
-
-  Function and method arguments.
-
--->
-
-<!ENTITY allowed_values "<varname>allowed_values</varname>">
-<!ENTITY build_dir "<varname>build_dir</varname>">
-<!ENTITY map "<varname>map</varname>">
-<!ENTITY ignorecase "<varname>ignorecase</varname>">
-<!ENTITY options "<varname>options</varname>">
-<!ENTITY exports "<varname>exports</varname>">
-<!ENTITY source "<varname>source</varname>">
-<!ENTITY target "<varname>target</varname>">
-
-
-
-<!--
-
-  Values of function and method arguments.
-
--->
-
-<!ENTITY all "<literal>all</literal>">
-<!ENTITY none "<literal>none</literal>">
-
-
-
-<!--
-
-  Builder and Scanner objects.
-
--->
-
-<!ENTITY BuildDir "<function>BuildDir</function>">
-<!ENTITY CFile "<function>CFile</function>">
-<!ENTITY CXXFile "<function>CXXFile</function>">
-<!ENTITY DVI "<function>DVI</function>">
-<!ENTITY Jar "<function>Jar</function>">
-<!ENTITY Java "<function>Java</function>">
-<!ENTITY JavaH "<function>JavaH</function>">
-<!ENTITY Library "<function>Library</function>">
-<!ENTITY Object "<function>Object</function>">
-<!ENTITY PCH "<function>PCH</function>">
-<!ENTITY PDF "<function>PDF</function>">
-<!ENTITY PostScript "<function>PostScript</function>">
-<!ENTITY Program "<function>Program</function>">
-<!ENTITY RES "<function>RES</function>">
-<!ENTITY RMIC "<function>RMIC</function>">
-<!ENTITY SharedLibrary "<function>SharedLibrary</function>">
-<!ENTITY SharedObject "<function>SharedObject</function>">
-<!ENTITY StaticLibrary "<function>StaticLibrary</function>">
-<!ENTITY StaticObject "<function>StaticObject</function>">
-<!ENTITY Tar "<function>Tar</function>">
-<!ENTITY Zip "<function>Zip</function>">
-
-<!-- Obsolete, but referenced in old documents.  -->
-<!ENTITY MakeBuilder "<function>Make</function>">
-
-
-
-<!--
-
-  Terms.  Define both singular and plural forms in various
-  case-sensitive combinations for use in titles, in-line, etc.
-
--->
-
-<!ENTITY buildfunc "<literal>builder function</literal>">
-<!ENTITY builder_method "<literal>builder method</literal>">
-
-<!ENTITY Configure_Contexts "<literal>Configure Contexts</literal>">
-<!ENTITY configure_context "<literal>configure context</literal>">
-
-<!ENTITY ConsEnv "<literal>Construction Environment</literal>">
-<!ENTITY ConsEnvs "<literal>Construction Environments</literal>">
-<!ENTITY Consenv "<literal>Construction environment</literal>">
-<!ENTITY Consenvs "<literal>Construction environments</literal>">
-<!ENTITY consenv "<literal>construction environment</literal>">
-<!ENTITY consenvs "<literal>construction environments</literal>">
-
-<!ENTITY ConsVar "<literal>Construction Variable</literal>">
-<!ENTITY ConsVars "<literal>Construction Variables</literal>">
-<!ENTITY Consvar "<literal>Construction variable</literal>">
-<!ENTITY Consvars "<literal>Construction variables</literal>">
-<!ENTITY consvar "<literal>construction variable</literal>">
-<!ENTITY consvars "<literal>construction variables</literal>">
-
-<!ENTITY CPPPATH "<literal>CPPPATH</literal>">
-
-<!ENTITY Dictionary "<literal>Dictionary</literal>">
-
-<!ENTITY Emitter "<literal>Emitter</literal>">
-<!ENTITY emitter "<literal>emitter</literal>">
-<!ENTITY Generator "<literal>Generator</literal>">
-<!ENTITY generator "<literal>generator</literal>">
-
-<!ENTITY Nodes "<literal>Nodes</literal>">
-
-<!ENTITY signature "<literal>signature</literal>">
-<!ENTITY buildsignature "<literal>build signature</literal>">
-
-<!ENTITY true "<literal>true</literal>">
-<!ENTITY false "<literal>false</literal>">
-
-<!ENTITY typedef "<literal>typedef</literal>">
-
-<!--
-
-  File and program names used in examples.
-
--->
-
-<!ENTITY bar "<application>bar</application>">
-<!ENTITY common1_c "<filename>common1.c</filename>">
-<!ENTITY common2_c "<filename>common2.c</filename>">
-<!ENTITY custom_py "<filename>custom.py</filename>">
-<!ENTITY goodbye "<application>goodbye</application>">
-<!ENTITY goodbye_o "<filename>goodbye.o</filename>">
-<!ENTITY goodbye_obj "<filename>goodbye.obj</filename>">
-<!ENTITY file_dll "<filename>file.dll</filename>">
-<!ENTITY file_in "<filename>file.in</filename>">
-<!ENTITY file_lib "<filename>file.lib</filename>">
-<!ENTITY file_o "<filename>file.o</filename>">
-<!ENTITY file_obj "<filename>file.obj</filename>">
-<!ENTITY file_out "<filename>file.out</filename>">
-<!ENTITY foo "<application>foo</application>">
-<!ENTITY foo_o "<filename>foo.o</filename>">
-<!ENTITY foo_obj "<filename>foo.obj</filename>">
-<!ENTITY hello "<application>hello</application>">
-<!ENTITY hello_c "<filename>hello.c</filename>">
-<!ENTITY hello_exe "<filename>hello.exe</filename>">
-<!ENTITY hello_h "<filename>hello.h</filename>">
-<!ENTITY hello_o "<filename>hello.o</filename>">
-<!ENTITY hello_obj "<filename>hello.obj</filename>">
-<!ENTITY libfile_a "<filename>libfile_a</filename>">
-<!ENTITY libfile_so "<filename>libfile_so</filename>">
-<!ENTITY new_hello "<application>new_hello</application>">
-<!ENTITY new_hello_exe "<application>new_hello.exe</application>">
-<!ENTITY prog "<filename>prog</filename>">
-<!ENTITY prog1 "<filename>prog1</filename>">
-<!ENTITY prog2 "<filename>prog2</filename>">
-<!ENTITY prog_c "<filename>prog.c</filename>">
-<!ENTITY prog_exe "<filename>prog.exe</filename>">
-<!ENTITY stdio_h "<filename>stdio.h</filename>">
-
-<!--
-
-  Punctuation.
-
--->
-
-<!ENTITY plus "<literal>+</literal>">
-<!ENTITY hash "<literal>#</literal>">
-
-<!--
-
-  Mailing lists
-
--->
-
-<!ENTITY scons-announce "<literal>announce@scons.tigris.org</literal>">
-<!ENTITY scons-devel "<literal>dev@scons.tigris.org</literal>">
-<!ENTITY scons-users "<literal>users@scons.tigris.org</literal>">

doc/design/summary.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-summary"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Summary</title>
+
+<!--
+
+  __COPYRIGHT__
+
+  Permission is hereby granted, free of charge, to any person obtaining
+  a copy of this software and associated documentation files (the
+  "Software"), to deal in the Software without restriction, including
+  without limitation the rights to use, copy, modify, merge, publish,
+  distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so, subject to
+  the following conditions:
+
+  The above copyright notice and this permission notice shall be included
+  in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-->
+
+  <para>
+
+    &SCons; offers a robust and feature-rich design for an SC-build
+    tool.  With a Build Engine based on the proven design of
+    the &Cons; utility, it offers increased simplification of the
+    user interface for unsophisticated users with the addition
+    of the "do-the-right-thing" <function>env.Make</function>
+    method, increased flexibility for sophisticated users with the
+    addition of &Builder; and &Scanner; objects, a mechanism to
+    allow tool-masters (and users) to share working construction
+    environments, and embeddability to provide reliable dependency
+    management in a variety of environments and interfaces.
+
+  </para>
+
+</chapter>

doc/developer/architecture.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-architecture"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Architecture</title>
+
 <!--
 
   __COPYRIGHT__
     </para>
 
   </section>
+
+</chapter>

doc/developer/branches.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-branches"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Branches</title>
+
 <!--
 
   __COPYRIGHT__
     </para>
 
   </section>
+
+</chapter>

doc/developer/copyright.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<legalnotice xmlns="http://www.scons.org/dbxsd/v1.0"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+
 <!--
 
   __COPYRIGHT__
 
  </para>
 </blockquote>
+
+</legalnotice>

doc/developer/cycle.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-development-cycle"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Development Cycle</title>
+
 <!--
 
   __COPYRIGHT__
     </para>
 
   </section>
+
+</chapter>

doc/developer/main.xml

 
 -->
 
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
-[
+<!DOCTYPE sconsdoc [
 
     <!ENTITY % version SYSTEM "../version.xml">
     %version;
     <!ENTITY % scons SYSTEM "../scons.mod">
     %scons;
 
-    <!ENTITY architecture SYSTEM "architecture.xml">
-    <!ENTITY branches SYSTEM "branches.xml">
-    <!ENTITY copyright SYSTEM "copyright.xml">
-    <!ENTITY cycle SYSTEM "cycle.xml">
-    <!ENTITY packaging SYSTEM "packaging.xml">
-    <!ENTITY preface SYSTEM "preface.xml">
-    <!ENTITY sourcetree SYSTEM "sourcetree.xml">
-    <!ENTITY testing SYSTEM "testing.xml">
-
 ]>
 
-<book>
+<book xmlns="http://www.scons.org/dbxsd/v1.0"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
   <bookinfo>
     <title>SCons Developer's Guide &buildversion;</title>
 
       <holder>Steven Knight</holder>
     </copyright>
 
-    <legalnotice>
-      &copyright;
-    </legalnotice>
+    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="copyright.xml"/>
 
     <releaseinfo>version &buildversion;</releaseinfo>
 
   </bookinfo>
 
-  <preface id="chap-preface">
-    <title>Preface</title>
-    &preface;
-  </preface>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="preface.xml"/>
 
-  <chapter id="chap-development-cycle">
-    <title>Development Cycle</title>
-    &cycle;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cycle.xml"/>
 
-  <chapter id="chap-source-tree">
-    <title>Source Tree</title>
-    &sourcetree;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sourcetree.xml"/>
 
-  <chapter id="chap-testing">
-    <title>Testing</title>
-    &testing;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="testing.xml"/>
 
-  <chapter id="chap-branches">
-    <title>Branches</title>
-    &branches;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="branches.xml"/>
 
-  <chapter id="chap-packaging">
-    <title>Packaging</title>
-    &packaging;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="packaging.xml"/>
 
-  <chapter id="chap-architecture">
-    <title>Architecture</title>
-    &architecture;
-  </chapter>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="architecture.xml"/>
 
 </book>

doc/developer/packaging.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-packaging"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Packaging</title>
+
 <!--
 
   __COPYRIGHT__
     </para>
 
   </section>
+
+</chapter>

doc/developer/preface.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-preface"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Preface</title>
+
 <!--
 
   __COPYRIGHT__
     </para>
 
   </section>
+
+</chapter>

doc/developer/sourcetree.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-source-tree"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Source Tree</title>
+
 <!--
 
   __COPYRIGHT__
     </para>
 
   </section>
+
+</chapter>

doc/developer/testing.xml

+<?xml version='1.0'?>
+<!DOCTYPE sconsdoc [
+    <!ENTITY % scons SYSTEM "../scons.mod">
+    %scons;
+]>
+
+<chapter id="chap-testing"
+         xmlns="http://www.scons.org/dbxsd/v1.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 scons.xsd">
+<title>Testing</title>
+
 <!--
 
   __COPYRIGHT__
     </para>
 
   </section>
+
+</chapter>

doc/man/scons.xml

 cp foo.in foo.out
 scons: done building targets.
 $
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>The status messages
 (everything except the line that reads "cp foo.in foo.out")
 <literallayout>
 import os
 env = Environment(ENV = {'PATH' : os.environ['PATH']})
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Similarly, if the commands use external environment variables
 like $PATH, $HOME, $JAVA_HOME, $LANG, $SHELL, $TERM, etc.,
 import os
 env = Environment(ENV = {'PATH' : os.environ['PATH'],
                          'HOME' : os.environ['HOME']})
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Or you may explicitly propagate the invoking user's
 complete external environment:</para>
 <literallayout>
 import os
 env = Environment(ENV = os.environ)
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>This comes at the expense of making your build
 dependent on the user's environment being set correctly,
 
 <literallayout>
 scons
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>will build all target files in or below the current directory.
 Explicit default targets
 
 <literallayout>
 scons .
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Building all target files,
 including any files outside of the current directory,
 
 <literallayout>
 scons /
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>or the path name(s) of the volume(s) in which all the targets
 should be built (on Windows systems):</para>
 
 <literallayout>
 scons C:\ D:\
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>To build only specific targets,
 supply them as command-line arguments:</para>
 
 <literallayout>
 scons foo bar
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>in which case only the specified targets will be built
 (along with any derived files on which they depend).</para>
 
 <literallayout>
 scons -c .
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>to remove all target files, or:</para>
 
 <literallayout>
 scons -c build export
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>to remove target files under build and export.
 Additional files or directories to remove can be specified using the
 
 <literallayout>
 scons src/subdir
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>or by changing directory and invoking scons with the
 <option>-u</option>
 <literallayout>
 cd src/subdir
 scons -u .
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para><command>scons</command>
 supports building multiple targets in parallel via a
 
 <literallayout>
 scons -j 4
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>builds four targets in parallel, for example.</para>
 
 
 <literallayout>
 scons debug=1 .
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>These variables are available in SConscript files
 through the ARGUMENTS dictionary,
     env = Environment(CCFLAGS = '-g')
 else:
     env = Environment()
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>The command-line variable arguments are also available
 in the ARGLIST list,
 
 <literallayout>
 $ scons --debug=includes foo.o
-</literallayout> <!-- .fi -->
+</literallayout>
 
   </listitem>
   </varlistentry>
 Building myprog.o with action(s):
   $SHCC $SHCFLAGS $SHCCFLAGS $CPPFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
 ...
-</literallayout> <!-- .fi -->
+</literallayout>
 
   </listitem>
   </varlistentry>
 -s, --silent, --quiet
 --taskmastertrace=FILE
 --tree=OPTIONS
-</literallayout> <!-- .fi -->
+</literallayout>
 
       </listitem>
       </varlistentry>
 scons: done reading SConscript files.
 scons&gt;&gt;&gt; build -n prog
 scons&gt;&gt;&gt; exit
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <variablelist>
   <varlistentry>
     %APPDATA%/scons/site_scons
     %HOME%/.scons/site_scons
     ./site_scons
-</literallayout> <!-- .fi -->
+</literallayout>
   </listitem>
   </varlistentry>
   <varlistentry>
     $HOME/Library/Application Support/SCons/site_scons
     $HOME/.scons/site_scons
     ./site_scons
-</literallayout> <!-- .fi -->
+</literallayout>
   </listitem>
   </varlistentry>
   <varlistentry>
     /usr/share/scons/site_scons
     $HOME/.scons/site_scons
     ./site_scons
-</literallayout> <!-- .fi -->
+</literallayout>
   </listitem>
   </varlistentry>
   <varlistentry>
     /usr/share/scons/site_scons
     $HOME/.scons/site_scons
     ./site_scons
-</literallayout> <!-- .fi -->
+</literallayout>
 
   </listitem>
   </varlistentry>
 # Prints all dependencies of target, with status information
 # and pruning dependencies of already-visited Nodes:
 scons --tree=all,prune,status target
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <variablelist>
   <varlistentry>
 
 <literallayout>
 env = Environment()
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Variables, called
 <emphasis>construction</emphasis>
 <literallayout>
 env = Environment(FOO = 'foo')
 env['BAR'] = 'bar'
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>As a convenience,
 construction variables may also be set or modified by the
 
 <literallayout>
 env = Environment(parse_flags = '-Iinclude -DEBUG -lm')
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>This example adds 'include' to
 <emphasis role="bold">CPPPATH</emphasis>,
 env = Environment(platform = 'os2')
 env = Environment(platform = 'posix')
 env = Environment(platform = 'win32')
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Specifying a platform initializes the appropriate
 construction variables in the environment
     env['VAR'] = 'xyzzy'
 
 env = Environment(platform = my_platform)
-</programlisting> <!-- .fi -->
+</programlisting>
 
 <para>Additionally, a specific set of tools
 with which to initialize the environment
 
 <literallayout>
 env = Environment(tools = ['msvc', 'lex'])
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Non-built-in tools may be specified using the toolpath argument:</para>
 
 <literallayout>
 env = Environment(tools = ['default', 'foo'], toolpath = ['tools'])
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>This looks for a tool specification in tools/foo.py (as well as
 using the ordinary default tools for the platform).  foo.py should
 base = Environment(toolpath=['custom_path'])
 derived = base.Clone(tools=['custom_tool'])
 derived.CustomBuilder()
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>The elements of the tools list may also
 be functions or callable objects,
     env['XYZZY'] = 'xyzzy'
 
 env = Environment(tools = [my_tool])
-</programlisting> <!-- .fi -->
+</programlisting>
 
 <para>The individual elements of the tools list
 may also themselves be two-element lists of the form
 # in SConstruct:
 env = Environment(tools = ['default', ('my_tool', {'arg1': 'abc'})],
                   toolpath=['tools'])
-</programlisting> <!-- .fi -->
+</programlisting>
 
 <para>The tool definition (i.e. my_tool()) can use the PLATFORM variable from
 the environment it receives to customize the tool for different platforms.</para>
 env.Program(target = 'bar', Split('bar.c foo.c'))
 env.Program(target = 'bar', env.Split('bar.c foo.c'))
 env.Program('bar', source = 'bar.c foo.c'.split())
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Target and source file names
 that are not absolute path names
 # Builds the program "other/foo" (relative to the top-level
 # SConstruct directory) from "subdir/foo.c":
 env.Program('#other/foo', 'foo.c')
-</programlisting> <!-- .fi -->
+</programlisting>
 
 <para>When the target shares the same base name
 as the source and only the suffix varies,
 env.Program('bar', source = 'bar.c')
 env.Program(source = 'bar.c')
 env.Program('bar.c')
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>As a convenience, a
 <emphasis role="bold">srcdir</emphasis>
 
 <literallayout>
 env.Program('build/prog', ['f1.c', 'f2.c'], srcdir='src')
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>It is possible to override or add construction variables when calling a
 builder method by passing additional keyword arguments.
 
 <literallayout>
 env.Program('hello', 'hello.c', LIBS=['gl', 'glut'])
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>or generate a shared library with a non-standard suffix:</para>
 
 env.SharedLibrary('word', 'word.cpp',
                   SHLIBSUFFIX='.ocx',
                   LIBSUFFIXES=['.ocx'])
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>(Note that both the $SHLIBSUFFIX and $LIBSUFFIXES variables must be set
 if you want SCons to search automatically
 
 <literallayout>
 env = Program('hello', 'hello.c', parse_flags = '-Iinclude -DEBUG -lm')
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>This example adds 'include' to
 <emphasis role="bold">CPPPATH</emphasis>,
 <literallayout>
 Program('hello', 'hello.c')
 SharedLibrary('word', 'word.cpp')
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>In this case,
 the methods are called internally using a default construction
 
 <literallayout>
 from SCons.Script import *
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>All builder methods return a list-like object
 containing Nodes that
 <literallayout>
 bar_obj_list = env.StaticObject('bar.c', CPPDEFINES='-DBAR')
 env.Program(source = ['foo.c', bar_obj_list, 'main.c'])
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Using a Node in this way
 makes for a more portable build
 objects = ['begin.o'] + foo + ['middle.o'] + bar + ['end.o']
 for object in objects:
     print str(object)
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Or you can use the
 <emphasis role="bold">Flatten</emphasis>()
 objects = Flatten(['begin.o', foo, 'middle.o', bar, 'end.o'])
 for object in objects:
     print str(object)
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Note also that because Builder calls return
 a list-like object, not an actual Python list,
 # Instead, use the .extend() method:
 object_files.extend(Object('bar.c'))
 
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>The path name for a Node's file may be used
 by passing the Node to the Python-builtin
 <literallayout>
 bar_obj_list = env.StaticObject('bar.c', CPPDEFINES='-DBAR')
 print "The path to bar_obj is:", str(bar_obj_list[0])
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Note again that because the Builder call returns a list,
 we have to access the first element in the list
 env.Command('sub/dir/foo.out', 'sub/dir/foo.in',
             "cp foo.in foo.out",
             chdir=1)
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Note that scons will
 <emphasis>not</emphasis>
 it looks like:</para>
 <literallayout>
 Function(<emphasis>arguments</emphasis>)
-</literallayout> <!-- .fi -->
+</literallayout>
 <para>and if you call something through a construction
 environment it looks like:</para>
 <literallayout>
 env.Function(<emphasis>arguments</emphasis>)
-</literallayout> <!-- .fi -->
+</literallayout>
 <para>If you can call the functionality in both ways,
 then both forms are listed.</para>
 
 
 <literallayout>
 from SCons.Script import *
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>Except where otherwise noted,
 the same-named
 env = Environment(FOO = 'foo')
 Default('$FOO')
 env.Default('$FOO')
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>In the above example,
 the first call to the global
 
 <literallayout>
 from SCons.Script import *
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <!-- '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -->
 <variablelist>
 print "third keyword, value =", third_tuple[0], third_tuple[1]
 for key, value in ARGLIST:
     # process key and value
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <!-- '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -->
   </listitem>
     env = Environment(CCFLAGS = '-g')
 else:
     env = Environment()
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <!-- '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -->
   </listitem>
     print "Don't forget to test the `foo' program!"
 if 'special/program' in BUILD_TARGETS:
     SConscript('special')
-</literallayout> <!-- .fi -->
+</literallayout>
   </listitem>
   </varlistentry>
 </variablelist>
<