diff options
| author | Chris McDonough <chrism@plope.com> | 2011-01-18 12:25:56 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-01-18 12:25:56 -0500 |
| commit | c9c3c487bcaedeca97bb6463a00188b0dc01203a (patch) | |
| tree | 5de4e743b2c007c0d5202db7be883d21cfe2bc88 /docs/zcml/configure.rst | |
| parent | 47af907429cb038108d8daa8dafcc86fd7bf2be4 (diff) | |
| download | pyramid-c9c3c487bcaedeca97bb6463a00188b0dc01203a.tar.gz pyramid-c9c3c487bcaedeca97bb6463a00188b0dc01203a.tar.bz2 pyramid-c9c3c487bcaedeca97bb6463a00188b0dc01203a.zip | |
- Most references to ZCML in narrative chapters have been removed or
redirected to ``pyramid_zcml`` locations.
Diffstat (limited to 'docs/zcml/configure.rst')
| -rw-r--r-- | docs/zcml/configure.rst | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/docs/zcml/configure.rst b/docs/zcml/configure.rst deleted file mode 100644 index cab8ec204..000000000 --- a/docs/zcml/configure.rst +++ /dev/null @@ -1,95 +0,0 @@ -.. _configure_directive: - -``configure`` -------------- - -Because :term:`ZCML` is XML, and because XML requires a single root -tag for each document, every ZCML file used by :app:`Pyramid` must -contain a ``configure`` container directive, which acts as the root -XML tag. It is a "container" directive because its only job is to -contain other directives. - -Attributes -~~~~~~~~~~ - -``xmlns`` - The default XML namespace used for subdirectives. - -Example -~~~~~~~ - -.. code-block:: xml - :linenos: - - <configure xmlns="http://pylonshq.com/pyramid"> - - <!-- other directives --> - - </configure> - -.. _word_on_xml_namespaces: - -A Word On XML Namespaces -~~~~~~~~~~~~~~~~~~~~~~~~ - -Usually, the start tag of the ``<configure>`` container tag has a -default *XML namespace* associated with it. This is usually -``http://pylonshq.com/pyramid``, named by the ``xmlns`` attribute of -the ``configure`` start tag. - -Using the ``http://pylonshq.com/pyramid`` namespace as the default XML -namespace isn't strictly necessary; you can use a different default -namespace as the default. However, if you do, the declaration tags -which are defined by :app:`Pyramid` such as the ``view`` declaration -tag will need to be defined in such a way that the XML parser that -:app:`Pyramid` uses knows which namespace the :mod:`pyramid` tags are -associated with. For example, the following files are all completely -equivalent: - -.. topic:: Use of A Non-Default XML Namespace - - .. code-block:: xml - :linenos: - - <configure xmlns="http://namespaces.zope.org/zope" - xmlns:pyramid="http://pylonshq.com/pyramid"> - - <include package="pyramid.includes" /> - - <pyramid:view - view="helloworld.hello_world" - /> - - </configure> - -.. topic:: Use of A Per-Tag XML Namespace Without A Default XML Namespace - - .. code-block:: xml - :linenos: - - <configure> - - <include package="pyramid.includes" /> - - <view xmlns="http://pylonshq.com/pyramid" - view="helloworld.hello_world" - /> - - </configure> - -For more information about XML namespaces, see `this older, but simple -XML.com article <http://www.xml.com/pub/a/1999/01/namespaces.html>`_. - -The conventions in this document assume that the default XML namespace -is ``http://pylonshq.com/pyramid``. - -Alternatives -~~~~~~~~~~~~ - -None. - -See Also -~~~~~~~~ - -See also :ref:`helloworld_declarative`. - |
