summaryrefslogtreecommitdiff
path: root/docs/tutorials
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2008-07-25 00:14:11 +0000
committerChris McDonough <chrism@agendaless.com>2008-07-25 00:14:11 +0000
commit3c40c67500a765909d07c80339a76ede245a1d09 (patch)
tree44b4c7e60a61d0d20b74e97de9a976f3f35ddb4b /docs/tutorials
parent0fc14981f389a3da34ef2c3e3c53ae84ae79d2c8 (diff)
downloadpyramid-3c40c67500a765909d07c80339a76ede245a1d09.tar.gz
pyramid-3c40c67500a765909d07c80339a76ede245a1d09.tar.bz2
pyramid-3c40c67500a765909d07c80339a76ede245a1d09.zip
More glossary lovin.
Diffstat (limited to 'docs/tutorials')
-rw-r--r--docs/tutorials/lxmlgraph/background.rst8
-rw-r--r--docs/tutorials/lxmlgraph/step02.rst15
-rw-r--r--docs/tutorials/lxmlgraph/step03.rst5
3 files changed, 15 insertions, 13 deletions
diff --git a/docs/tutorials/lxmlgraph/background.rst b/docs/tutorials/lxmlgraph/background.rst
index 8fb2345ac..3413e0a9d 100644
--- a/docs/tutorials/lxmlgraph/background.rst
+++ b/docs/tutorials/lxmlgraph/background.rst
@@ -14,7 +14,7 @@ In summary:
- Represent a hierarchical site as hierarchical XML
- - Inject ``repoze.bfg`` semantics into elements using ``lxml``
+ - Inject ``repoze.bfg`` semantics into elements using :term:`lxml`
- Support flexible-but-fast rendering with XSLT
@@ -60,7 +60,7 @@ this method. Moreover, I want some specific behavior: run an XPath
express on the node to get the child with the ``@name`` attribute
matching the URL hop.
-Fortunately ``lxml`` makes this easy. I can inject my nodes with a
+Fortunately :term:`lxml` makes this easy. I can inject my nodes with a
class that I write, thus providing my own ``__getitem__`` behavior.
That class can also assert that my XML nodes provide an interface.
@@ -71,7 +71,7 @@ Neato torpedo. And stinking fast.
Next up, I need to provide views for the elements in the model. I
could, for example, use ZPT and manipulate the XML data using Python
-expressions against the lxml API. Or, I could use XSLT.
+expressions against the :term:`lxml` API. Or, I could use XSLT.
For the latter, I could register a different XSLT for every "view" on
every interface. Or, I could write one big XSLT, and let its template
@@ -95,7 +95,7 @@ investigations:
property, I can store ACL information on a single node, on an
ancestor, on the ``<site>`` root, on the Python class, or any
combination thereof. Additionally, I can wire up the
- ``__parent__`` attribute as a property that makes an lxml
+ ``__parent__`` attribute as a property that makes an :term:`lxml`
``node.getparent()`` call.
#. **Multiple views**. Instead of just having a single default view
diff --git a/docs/tutorials/lxmlgraph/step02.rst b/docs/tutorials/lxmlgraph/step02.rst
index b53fd0eff..a2c24b7a6 100644
--- a/docs/tutorials/lxmlgraph/step02.rst
+++ b/docs/tutorials/lxmlgraph/step02.rst
@@ -14,7 +14,7 @@ data. We will leverage the following ``repoze.bfg`` machinery:
Our application will need to do these things:
- - Use ``lxml`` Element classes to inject ``repoze.bfg`` behavior into
+ - Use :term:`lxml` Element classes to inject ``repoze.bfg`` behavior into
``lxml`` nodes
- That model class needs to implement the ``repoze.bfg`` publishing
@@ -55,18 +55,19 @@ containing node.
Module ``models.py``
------------------------------
-At a high level, we make write a class that "extends" ``lxml`` Element
-nodes, create an ``lxml`` parser, and register the custom class with the
-parser. Replace the contents of the autogenerated ``models.py`` with
-the content we show below.
+At a high level, we make write a class that "extends" ``lxml``
+``Element`` nodes, create an ``lxml`` parser, and register the custom
+class with the parser. Replace the contents of the autogenerated
+``models.py`` with the content we show below.
.. literalinclude:: step02/myapp/models.py
:linenos:
-#. Line 4 imports lxml.
+#. Line 4 imports ``lxml``.
#. Line 9 creates the custom class we are going to use to extend
- etree.ElementBase. The ``lxml`` website has great documentation on the
+ etree.ElementBase. The `<lxml website
+ <http://codespeak.net/lxml/>`_ has great documentation on the
various ways to inject custom Python behavior into XML.
#. Just as before, line 12 says that instances of this class support a
diff --git a/docs/tutorials/lxmlgraph/step03.rst b/docs/tutorials/lxmlgraph/step03.rst
index ca8e6837b..25d6ce638 100644
--- a/docs/tutorials/lxmlgraph/step03.rst
+++ b/docs/tutorials/lxmlgraph/step03.rst
@@ -73,8 +73,9 @@ Look, a template! Life is better with templating:
#. Line 6 sure looks interesting. It uses the ``node`` that we passed
in via ``render_template_to_response``. Since ``z3c.pt`` uses
Python as its expession language, we can put anything Python-legal
- between the braces. And since ``node`` is an lxml Element object,
- we just ask for its ``.tag``, like regular Python lxml code.
+ between the braces. And since ``node`` is an ``lxml`` ``Element``
+ object, we just ask for its ``.tag``, like regular Python ``lxml``
+ code.
Viewing the ZPT
------------------