class LoaderContext(object):
Constructor: LoaderContext(ns, filename, parent, params, ...)
Container for storing current loader context (e.g. namespace, local parameter state, remapping state).
Method | __init__ |
@param ns: namespace @type ns: str @param filename: name of file this is being loaded from @type filename: str @param resolve_dict: (optional) resolution dictionary for substitution args @type resolve_dict: dict @param include_resolve_dict: special resolution dictionary for <include> tags... |
Method | add |
Add 'arg' to existing context. Args are only valid for their immediate context. |
Method | add |
Add a ~param to the context. ~params are evaluated by any node declarations that occur later in the same context. |
Method | add |
Add a new remap setting to the context. if a remap already exists with the same from key, it will be removed |
Method | child |
child context shares the same namespace |
Method | include |
Create child namespace based on include inheritance rules @param ns: sub-namespace of child context, or None if the |
Method | remap |
@return: copy of the current remap arguments @rtype: [(str, str)] |
Instance Variable | arg |
Undocumented |
Instance Variable | env |
Undocumented |
Instance Variable | filename |
Undocumented |
Instance Variable | include |
Undocumented |
Instance Variable | ns |
Undocumented |
Instance Variable | params |
Undocumented |
Instance Variable | parent |
Undocumented |
Instance Variable | pass |
Undocumented |
Instance Variable | resolve |
Undocumented |
Instance Variable | _remap |
Undocumented |
@param ns: namespace @type ns: str @param filename: name of file this is being loaded from @type filename: str @param resolve_dict: (optional) resolution dictionary for substitution args @type resolve_dict: dict @param include_resolve_dict: special resolution dictionary for <include> tags. Must be None if this is not an <include> context. @type include_resolve_dict: dict @param arg_names: name of args that have been declared in this context @type arg_names: [str]
Add a ~param to the context. ~params are evaluated by any node declarations that occur later in the same context.
@param p: parameter @type p: L{Param}
Add a new remap setting to the context. if a remap already exists with the same from key, it will be removed
@param remap: remap setting @type remap: (str, str)
- @param ns: sub-namespace of child context, or None if the
- child context shares the same namespace
@type ns: str @return: A child xml context that inherits from this context @rtype: L{LoaderContext}
Create child namespace based on include inheritance rules @param ns: sub-namespace of child context, or None if the
child context shares the same namespace
@type ns: str @param filename: name of include file @type filename: str @return: A child xml context that inherits from this context @rtype: L{LoaderContext}jj