Module xmlsec :: Class TmplEncData
[frames | no frames]

Class TmplEncData

xmlCore --+    
          |    
    xmlNode --+
              |
             TmplEncData


Method Summary
  __init__(self, doc, encMethodId, id, type, mimeType, encoding, _obj)
Creates new <enc:EncryptedData /> node for encryption template.
  addDataReference(self, uri)
Adds <enc:DataReference/> and the parent <enc:ReferenceList/> node (if needed).
  addEncProperty(self, id, target)
Adds <enc:EncryptionProperty/> node (and the parent <enc:EncryptionProperties/> node if required) to the <enc:EncryptedData/> node encNode.
  addKeyReference(self, uri)
Adds <enc:KeyReference/> and the parent <enc:ReferenceList/> node (if needed).
  ensureCipherReference(self, uri)
Adds <enc:CipherReference/> node with specified URI attribute uri to the <enc:EncryptedData/> node encNode.
  ensureCipherValue(self)
Adds <enc:CipherValue/> to the <enc:EncryptedData/> node encNode.
  ensureEncProperties(self, id)
Adds <enc:EncryptionProperties/> node to the <enc:EncryptedData/> node encNode.
  ensureKeyInfo(self, id)
Adds <dsig:KeyInfo/> to the <enc:EncryptedData/> node encNode.
  getEncMethodNode(self)
Gets the <enc:EncrytpionMethod/> node.
    Inherited from xmlNode
  __repr__(self)
  addChild(self, cur)
Add a new node to @parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case @cur is freed) If the new node is ATTRIBUTE, it is added into properties instead of children.
  addChildList(self, cur)
Add a list of node at the end of the child list of the...
  addContent(self, content)
Append the extra substring to the node content.
  addContentLen(self, content, len)
Append the extra substring to the node content.
  addNextSibling(self, elem)
Add a new node @elem as the next sibling of @cur If the new node was already inserted in a document it is first unlinked from its existing context.
  addPrevSibling(self, elem)
Add a new node @elem as the previous sibling of @cur merging adjacent TEXT nodes (@elem may be freed) If the new node was already inserted in a document it is first unlinked from its existing context.
  addSibling(self, elem)
Add a new element @elem to the list of siblings of @cur merging adjacent TEXT nodes (@elem may be freed) If the new element was already inserted in a document it is first unlinked from its existing context.
  copyNode(self, recursive)
Do a copy of the node.
  copyNodeList(self)
Do a recursive copy of the node list.
  copyProp(self, cur)
Do a copy of the attribute.
  copyPropList(self, cur)
Do a copy of an attribute list.
  debugDumpNode(self, output, depth)
Dumps debug information for the element node, it is...
  debugDumpNodeList(self, output, depth)
Dumps debug information for the list of element node, it is...
  debugDumpOneNode(self, output, depth)
Dumps debug information for the element node, it is not...
  docCopyNode(self, doc, recursive)
Do a copy of the node to a given document.
  docSetRootElement(self, doc)
Set the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...).
  freeNode(self)
Free a node, this is a recursive behaviour, all the children are freed too.
  freeNodeList(self)
Free a node and all its siblings, this is a recursive behaviour, all the children are freed too.
  getBase(self, doc)
Searches for the BASE URL.
  getContent(self)
Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF).
  getLang(self)
Searches the language of a node, i.e.
  getSpacePreserve(self)
Searches the space preserving behaviour of a node, i.e.
  hasNsProp(self, name, nameSpace)
Search for an attribute associated to a node This attribute has to be anchored in the namespace specified.
  hasProp(self, name)
Search an attribute associated to a node This function also looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off.
  isBlankNode(self)
Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node.
  isID(self, doc, attr)
Determine whether an attribute is of type ID.
  isRef(self, doc, attr)
Determine whether an attribute is of type Ref.
  isText(self)
Is this node a Text node ?...
  lastChild(self)
Search the last child of a node.
  lineNo(self)
Get line number of @node.
  listGetRawString(self, doc, inLine)
Builds the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString() this function doesn't do any character encoding handling.
  listGetString(self, doc, inLine)
Build the string equivalent to the text contained in the...
  lsCountNode(self)
Count the children of @node.
  lsOneNode(self, output)
Dump to @output the type and name of @node.
  newChild(self, ns, name, content)
Creation of a new child element, added at the end of @parent children list.
  newNs(self, href, prefix)
Creation of a new Namespace.
  newNsProp(self, ns, name, value)
Create a new property tagged with a namespace and carried by a node.
  newNsPropEatName(self, ns, name, value)
Create a new property tagged with a namespace and carried by a node.
  newProp(self, name, value)
Create a new property carried by a node.
  newTextChild(self, ns, name, content)
Creation of a new child element, added at the end of @parent children list.
  nodePath(self)
Build a structure based Path for the given node...
  noNsProp(self, name)
Search and get the value of an attribute associated to a node This does the entity substitution.
  ns(self)
Get the namespace of a node...
  nsDefs(self)
Get the namespace of a node...
  nsProp(self, name, nameSpace)
Search and get the value of an attribute associated to a node This attribute has to be anchored in the namespace specified.
  prop(self, name)
Search and get the value of an attribute associated to a node This does the entity substitution.
  reconciliateNs(self, doc)
This function checks that all the namespaces declared within the given tree are properly declared.
  replaceNode(self, cur)
Unlink the old node from its current context, prune the new one at the same place.
  searchNs(self, doc, nameSpace)
Search a Ns registered under a given name space for a document.
  searchNsByHref(self, doc, href)
Search a Ns aliasing a given URI.
  setBase(self, uri)
Set (or reset) the base URI of a node, i.e.
  setContent(self, content)
Replace the content of a node.
  setContentLen(self, content, len)
Replace the content of a node.
  setLang(self, lang)
Set the language of a node, i.e.
  setListDoc(self, doc)
update all nodes in the list to point to the right document...
  setName(self, name)
Set (or reset) the name of a node.
  setNs(self, ns)
Associate a namespace to a node, a posteriori.
  setNsProp(self, ns, name, value)
Set (or reset) an attribute carried by a node.
  setProp(self, name, value)
Set (or reset) an attribute carried by a node.
  setSpacePreserve(self, val)
Set (or reset) the space preserving behaviour of a node, i.e.
  setTreeDoc(self, doc)
update all nodes under the tree to point to the right...
  shellPrintNode(self)
Print node to the output FILE...
  textConcat(self, content, len)
Concat the given string at the end of the existing node...
  textMerge(self, second)
Merge two text nodes into one...
  unlinkNode(self)
Unlink a node from it's current context, the node is not...
  unsetNsProp(self, ns, name)
Remove an attribute carried by a node.
  unsetProp(self, name)
Remove an attribute carried by a node.
  validNormalizeAttributeValue(self, doc, name, value)
Does the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by single space (#x20) character.
  xincludeProcessTree(self)
Implement the XInclude substitution for the given subtree...
  xincludeProcessTreeFlags(self, flags)
Implement the XInclude substitution for the given subtree...
  xpathCastNodeToNumber(self)
Converts a node to its number value...
  xpathCastNodeToString(self)
Converts a node to its string value.
  xpathCmpNodes(self, node2)
Compare two nodes w.r.t document order...
  xpathNewNodeSet(self)
Create a new xmlXPathObjectPtr of type NodeSet and...
  xpathNewValueTree(self)
Create a new xmlXPathObjectPtr of type Value Tree (XSLT)...
  xpathNextAncestor(self, ctxt)
Traversal function for the "ancestor" direction the...
  xpathNextAncestorOrSelf(self, ctxt)
Traversal function for the "ancestor-or-self" direction he ancestor-or-self axis contains the context node and ancestors of the context node in reverse document order; thus the context node is the first node on the axis, and the context node's parent the second; parent here is defined the same as with the parent axis.
  xpathNextAttribute(self, ctxt)
Traversal function for the "attribute" direction TODO:...
  xpathNextChild(self, ctxt)
Traversal function for the "child" direction The child axis contains the children of the context node in document order.
  xpathNextDescendant(self, ctxt)
Traversal function for the "descendant" direction the descendant axis contains the descendants of the context node in document order; a descendant is a child or a child of a child and so on.
  xpathNextDescendantOrSelf(self, ctxt)
Traversal function for the "descendant-or-self" direction...
  xpathNextFollowing(self, ctxt)
Traversal function for the "following" direction The...
  xpathNextFollowingSibling(self, ctxt)
Traversal function for the "following-sibling" direction The following-sibling axis contains the following siblings of the context node in document order.
  xpathNextNamespace(self, ctxt)
Traversal function for the "namespace" direction the namespace axis contains the namespace nodes of the context node; the order of nodes on this axis is implementation-defined; the axis will be empty unless the context node is an element We keep the XML namespace node at the end of the list.
  xpathNextParent(self, ctxt)
Traversal function for the "parent" direction The parent axis contains the parent of the context node, if there is one.
  xpathNextPreceding(self, ctxt)
Traversal function for the "preceding" direction the...
  xpathNextPrecedingSibling(self, ctxt)
Traversal function for the "preceding-sibling" direction The preceding-sibling axis contains the preceding siblings of the context node in reverse document order; the first preceding sibling is first on the axis; the sibling preceding that node is the second on the axis and so on.
  xpathNextSelf(self, ctxt)
Traversal function for the "self" direction The self axis...
  xpointerNewCollapsedRange(self)
Create a new xmlXPathObjectPtr of type range using a single...
  xpointerNewContext(self, doc, origin)
Create a new XPointer context...
  xpointerNewLocationSetNodes(self, end)
Create a new xmlXPathObjectPtr of type LocationSet and...
  xpointerNewRange(self, startindex, end, endindex)
Create a new xmlXPathObjectPtr of type range...
  xpointerNewRangeNodes(self, end)
Create a new xmlXPathObjectPtr of type range using 2 nodes...
    Inherited from xmlCore
  __iter__(self)
  free(self)
  get_children(self)
  get_content(self)
  get_doc(self)
  get_last(self)
  get_name(self)
  get_next(self)
  get_parent(self)
  get_prev(self)
  get_properties(self)
  get_type(self)
  saveTo(self, file, encoding, format)
  serialize(self, encoding, format)
  walk_breadth_first(self)
  walk_depth_first(self)
  xpathEval(self, expr)
  xpathEval2(self, expr)

Property Summary
    Inherited from xmlCore
  children: First child node...
  content: Content of this node...
  doc: The document this node belongs to...
  last: Last sibling node...
  name: Node name...
  next: Next sibling node...
  parent: Parent node...
  prev: Previous sibling node...
  properties: List of properies...
  type: Node type...

Method Details

__init__(self, doc=None, encMethodId=None, id=None, type=None, mimeType=None, encoding=None, _obj=None)
(Constructor)

Creates new <enc:EncryptedData /> node for encryption template.
doc         : the signature document or None; in the later case,
application must later call xmlSetTreeDoc to ensure that all the
children nodes have correct pointer to XML document.
encMethodId : the encryption method (may be None).
id          : the Id attribute (optional).
type        : the Type attribute (optional)
mimeType    : the MimeType attribute (optional)
encoding    : the Encoding attribute (optional)
Returns     : the newly created <enc:EncryptedData/> node or
None if an error occurs.
Overrides:
libxml2.xmlNode.__init__

addDataReference(self, uri=None)

Adds <enc:DataReference/> and the parent <enc:ReferenceList/> node
(if needed).
uri     : uri to reference (optional)
Returns : the newly created <enc:DataReference/> node or None if an
error occurs.

addEncProperty(self, id=None, target=None)

Adds <enc:EncryptionProperty/> node (and the parent
<enc:EncryptionProperties/> node if required) to the
<enc:EncryptedData/> node encNode.
id      : the Id attribute (optional).
target  : the Target attribute (optional).
Returns : the newly created <enc:EncryptionProperty/> node or None if
an error occurs.

addKeyReference(self, uri=None)

Adds <enc:KeyReference/> and the parent <enc:ReferenceList/> node
(if needed).
uri     : uri to reference (optional)
Returns : the newly created <enc:KeyReference/> node or None if an error
occurs.

ensureCipherReference(self, uri=None)

Adds <enc:CipherReference/> node with specified URI attribute uri to
the <enc:EncryptedData/> node encNode.
uri     : the URI attribute (may be None).
Returns : the newly created <enc:CipherReference/> node or None if an
error occurs.

ensureCipherValue(self)

Adds <enc:CipherValue/> to the <enc:EncryptedData/> node encNode.
Returns : the newly created <enc:CipherValue/> node or None if an error
occurs.

ensureEncProperties(self, id=None)

Adds <enc:EncryptionProperties/> node to the <enc:EncryptedData/> node
encNode.
id      : the Id attribute (optional).
Returns : the newly created <enc:EncryptionProperties/> node or None if
an error occurs.

ensureKeyInfo(self, id=None)

Adds <dsig:KeyInfo/> to the <enc:EncryptedData/> node encNode.
id      : the Id attrbibute (optional).
Returns : the newly created <dsig:KeyInfo/> node or None if an error occurs.

getEncMethodNode(self)

Gets the <enc:EncrytpionMethod/> node.
Returns : the <enc:EncryptionMethod /> node or None if an error occurs.

Generated by Epydoc 2.0 on Mon Feb 9 01:09:33 2004 http://epydoc.sf.net