blob: 149ddb67af8fc9a279395b08e6b86d5e271d920a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
.. _include_directive:
``include``
-----------
The ``include`` directive includes configuration from an external ZCML
file. Use of the ``include`` tag allows a user to split configuration
across multiple ZCML files, and allows package distributors to provide
default ZCML configuration for specific purposes which can be
included by the integrator of the package as necessary.
Attributes
~~~~~~~~~~
``package``
A :term:`dotted Python name` which references a Python :term:`package`.
``filename``
An absolute or relative filename which references a ZCML file.
The ``package`` and ``filename`` attributes can be used together or
separately as necessary.
Examples
~~~~~~~~
.. topic:: Loading the File Named ``configure.zcml`` from a Package Implicitly
.. code-block:: xml
:linenos:
<include package="some.package" />
.. topic:: Loading the File Named ``other.zcml`` From the Current Package
.. code-block:: xml
:linenos:
<include filename="other.zcml" />
.. topic:: Loading a File From a Subdirectory of the Current Package
.. code-block:: xml
:linenos:
<include filename="subdir/other.zcml" />
.. topic:: Loading the File Named ``/absolute/path/other.zcml``
.. code-block:: xml
:linenos:
<include filename="/absolute/path/other.zcml" />
.. topic:: Loading the File Named ``other.zcml`` From a Package Explicitly
.. code-block:: xml
:linenos:
<include package="some.package" filename="other.zcml" />
Alternatives
~~~~~~~~~~~~
None.
See Also
~~~~~~~~
See also :ref:`helloworld_declarative`.
|