changeset 394:cab6b0256019 trunk

Minor doc fixes.
author cmlenz
date Thu, 28 Dec 2006 17:50:40 +0000
parents 1dc3d3df4a85
children 7016f404b915
files doc/streams.txt doc/text-templates.txt doc/xml-templates.txt doc/xpath.txt setup.py
diffstat 5 files changed, 31 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/doc/streams.txt
+++ b/doc/streams.txt
@@ -202,7 +202,7 @@
 what the ``data`` item of the event tuple looks like. The different kinds of
 events are documented below.
 
-.. note:: The ``data`` item is generally immutable. It the data is to be
+.. note:: The ``data`` item is generally immutable. If the data is to be
    modified when processing a stream, it must be replaced by a new tuple.
    Effectively, this means the entire event tuple is immutable.
 
@@ -229,7 +229,7 @@
 
 TEXT
 ----
-Character data outside of elements and other nodes.
+Character data outside of elements and comments.
 
 For text events, the ``data`` item should be a unicode object::
 
--- a/doc/text-templates.txt
+++ b/doc/text-templates.txt
@@ -72,9 +72,10 @@
 
 .. _python: http://www.python.org/
 
-If the expression starts with a letter and contains only letters and digits,
-the curly braces may be omitted. In all other cases, the braces are required
-so that the template processors knows where the expression ends::
+If the expression starts with a letter and contains only letters, digits, dots,
+and underscores, the curly braces may be omitted. In all other cases, the
+braces are required so that the template processor knows where the expression
+ends::
 
   >>> from genshi.template import TextTemplate
   >>> tmpl = TextTemplate('${items[0].capitalize()} item')
--- a/doc/xml-templates.txt
+++ b/doc/xml-templates.txt
@@ -74,9 +74,10 @@
 Expressions need to prefixed with a dollar sign (``$``) and usually enclosed in
 curly braces (``{…}``).
 
-If the expression starts with a letter and contains only letters and digits,
-the curly braces may be omitted. In all other cases, the braces are required so
-that the template processors knows where the expression ends::
+If the expression starts with a letter and contains only letters, digits, dots,
+and underscores, the curly braces may be omitted. In all other cases, the
+braces are required so that the template processor knows where the expression
+ends::
 
   >>> from genshi.template import MarkupTemplate
   >>> tmpl = MarkupTemplate('<em>${items[0].capitalize()} item</em>')
@@ -123,7 +124,7 @@
 template is rendered in a number of ways: Genshi provides directives for
 conditionals and looping, among others.
 
-To use directives in a template, the namespace should be declared, which is
+To use directives in a template, the namespace must be declared, which is
 usually done on the root element::
 
   <html xmlns="http://www.w3.org/1999/xhtml"
@@ -302,14 +303,14 @@
     </p>
   </div>
 
-If a macro doesn't require parameters, it can be defined as well as called
-without the parenthesis. For example::
+If a macro doesn't require parameters, it can be defined without the 
+parenthesis. For example::
 
   <div>
     <p py:def="greeting" class="greeting">
       Hello, world!
     </p>
-    ${greeting}
+    ${greeting()}
   </div>
 
 The above would be rendered to::
--- a/doc/xpath.txt
+++ b/doc/xpath.txt
@@ -36,7 +36,7 @@
 for I don't know). Basically, any path expression that would require buffering
 of the stream is not supported.
 
-Predicates are of course supported, but Path expressions *inside* predicates
+Predicates are of course supported, but path expressions *inside* predicates
 are restricted to attribute lookups (again due to the lack of buffering).
 
 Most of the XPath functions and operators are supported, however they
--- a/setup.py
+++ b/setup.py
@@ -22,22 +22,6 @@
     from distutils.core import setup
 
 
-class test_doc(Command):
-    description = 'Tests the code examples in the documentation'
-    user_options = []
-
-    def initialize_options(self):
-        pass
-
-    def finalize_options(self):
-        pass
-
-    def run(self):
-        for filename in glob('doc/*.txt'):
-            print 'testing documentation file %s' % filename
-            doctest.testfile(filename, False, optionflags=doctest.ELLIPSIS)
-
-
 class build_doc(Command):
     description = 'Builds the documentation'
     user_options = []
@@ -61,6 +45,22 @@
                                 argv=['--config=%s' % conf, source, dest])
 
 
+class test_doc(Command):
+    description = 'Tests the code examples in the documentation'
+    user_options = []
+
+    def initialize_options(self):
+        pass
+
+    def finalize_options(self):
+        pass
+
+    def run(self):
+        for filename in glob('doc/*.txt'):
+            print 'testing documentation file %s' % filename
+            doctest.testfile(filename, False, optionflags=doctest.ELLIPSIS)
+
+
 setup(
     name = 'Genshi',
     version = '0.4',
Copyright (C) 2012-2017 Edgewall Software