#include <XSECEnv.hpp>
Collaboration diagram for XSECEnv:
The various XSEC classes need to be able to retrieve information about the environment they are operating in (namespace prefixes, owning document etc.) - this class is used to provide and hold this info.
Public Member Functions | |
Constructors and Destructors | |
XSECEnv (XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc) | |
Contructor. | |
XSECEnv (const XSECEnv &theOther) | |
virtual | ~XSECEnv () |
Prefix handling. | |
void | setDSIGNSPrefix (const XMLCh *prefix) |
Set the prefix be used for the DSIG namespace. | |
void | setECNSPrefix (const XMLCh *prefix) |
Set the prefix be used for the Exclusive Canonicalisation namespace. | |
void | setXPFNSPrefix (const XMLCh *prefix) |
Set the prefix be used for the XPath-Filter2 namespace. | |
void | setXENCNSPrefix (const XMLCh *prefix) |
Set prefix for XENC nodes. | |
void | setXKMSNSPrefix (const XMLCh *prefix) |
Set prefix for XKMS nodes. | |
const XMLCh * | getDSIGNSPrefix () const |
Get the NS Prefix being used for DSIG elements. | |
const XMLCh * | getECNSPrefix () const |
Get the NS being used for EC nodes. | |
const XMLCh * | getXPFNSPrefix () const |
Get the NS being used for XPath Filter2 nodes. | |
const XMLCh * | getXENCNSPrefix (void) const |
Get namespace prefix for XENC nodes. | |
const XMLCh * | getXKMSNSPrefix (void) const |
Get namespace prefix for XKMS nodes. | |
Pretty Printing Functions | |
void | setPrettyPrintFlag (bool flag) |
Set Pretty Print flag. | |
bool | getPrettyPrintFlag (void) const |
Return the current value of the PrettyPrint flag. | |
void | doPrettyPrint (XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *node) const |
Do a pretty print output. | |
General information functions | |
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * | getParentDocument () const |
void | setParentDocument (XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc) |
Resolver manipulation | |
void | setURIResolver (XSECURIResolver *resolver) |
Register a URIResolver. | |
XSECURIResolver * | getURIResolver (void) const |
Return a pointer to the resolver being used. | |
ID handling | |
void | setIdByAttributeName (bool flag) |
Set Id finding behaviour. | |
bool | getIdByAttributeName (void) const |
Determine Id finding behaviour. | |
void | registerIdAttributeName (const XMLCh *name) |
Add an attribute name to be searched for when looking for Id attributes. | |
bool | deregisterIdAttributeName (const XMLCh *name) |
Remove an attribute name to be searched for when looking for Id attributes. | |
bool | isRegisteredIdAttributeName (const XMLCh *name) const |
Determine if an attribute name is registered as an Id name. | |
void | registerIdAttributeNameNS (const XMLCh *ns, const XMLCh *name) |
Add an attribute name and namespace to be searched for when looking for Id attributes. | |
bool | deregisterIdAttributeNameNS (const XMLCh *ns, const XMLCh *name) |
Remove an attribute name and namespace to be searched for when looking for Id attributes. | |
bool | isRegisteredIdAttributeNameNS (const XMLCh *ns, const XMLCh *name) const |
Determine if an attribute name and namespace is registered as an Id name. | |
int | getIdAttributeNameListSize () const |
Get number of Attribute Names registered as Id attributes. | |
const XMLCh * | getIdAttributeNameListItem (int index) const |
const XMLCh * | getIdAttributeNameListItemNS (int index) const |
bool | getIdAttributeNameListItemIsNS (int index) const |
Formatters | |
XSECSafeBufferFormatter * | getSBFormatter (void) const |
Get a safeBufferFormatter. |
|
Contructor.
|
|
|
|
|
|
Remove an attribute name to be searched for when looking for Id attributes. This allows a user to de-register a particular name to be used to identify Id attributes.
|
|
Remove an attribute name and namespace to be searched for when looking for Id attributes. This allows a user to de-register a particular name to be used to identify Id attributes.
|
|
Do a pretty print output. The library calls this function to perform CR/LF outputting At the moment htis is really redundant, but it is more a holder so that we can set up something in the library to allow users to install a pretty print function.
|
|
Get the NS Prefix being used for DSIG elements.
|
|
Get the NS being used for EC nodes.
|
|
|
|
|
|
|
|
Get number of Attribute Names registered as Id attributes.
|
|
Determine Id finding behaviour. Allows a caller to determine whether the library is currently searching for Id attributes by name
|
|
Get the DOMDocument that the super class is operating within. Mainly used by the library itself.
|
|
Return the current value of the PrettyPrint flag.
|
|
Get a safeBufferFormatter. Return a UTF-8 safeBuffer formatter
|
|
Return a pointer to the resolver being used.
|
|
Get namespace prefix for XENC nodes. Find the string being used by the library to prefix nodes in the xenc: namespace.
|
|
Get namespace prefix for XKMS nodes. Find the string being used by the library to prefix nodes in the xkms: namespace.
|
|
Get the NS being used for XPath Filter2 nodes.
|
|
Determine if an attribute name is registered as an Id name.
|
|
Determine if an attribute name and namespace is registered as an Id name.
|
|
Add an attribute name to be searched for when looking for Id attributes. This allows a user to add an attribute name to be used to identify Id attributes when they are not set to be of Type=ID in the DOM
|
|
Add an attribute name and namespace to be searched for when looking for Id attributes. This allows a user to add an attribute name in a parcicular namespace to be used to identify Id attributes when they are not set to be of Type=ID in the DOM
|
|
Set the prefix be used for the DSIG namespace. When the XSEC library creates XML Element nodes, it uses the prefix here for all nodes created. By default, the library assumes that the default namespace is used. The #createBlankSignature function will use this prefix to setup the dsig namespace. E.g. (assuming a call has been made to set the prefix to "ds") the <Signature> element will have a namespace attribute added of xmlns:ds="http://www.w3.org/2000/09/xmldsig#" If no prefix has been set, this attribute will be set as the default namespace
|
|
Set the prefix be used for the Exclusive Canonicalisation namespace. The Exclusive Canonicalisation specification defines a new namespace for the InclusiveNamespaces node. This function can be used to set the prefix that the library will use when creating nodes within this namespace. xmlns:ds="http://www.w3.org/2001/10/xml-exc-c14n#" If no prefix is set, the default namespace will be used
|
|
Set Id finding behaviour. The library de-references "#obj" URI references to ID attributes within a DOM document. Currently, the library first uses DOM calls to find if the Id has been properly set within the document via the parser or one of the DOM Level 3 calls to set an Id. If no Id is found of the correct name, the library then starts searching for attributes of a given name with the required value. This list defaults to "id" and "Id", but can be modified via a call to addIdAttributeName() The setIdByAttributeName call enables or disables the second part of the Id search. I.e. when the Id doesn't exist as an attribute of Type=ID, whether or not to search for an attribute of a name in the list of names. By default this behaviour is enabled.
|
|
Set the DOMDocument that the super class is operating within. Mainly used by the library itself.
|
|
Set Pretty Print flag. The pretty print flag controls whether the library will output CR/LF after the elements it adds to a document By default the library will do pretty printing (flag is true)
|
|
Register a URIResolver. Registers a URIResolver to be used by the Signature when dereferencing a URI in a Reference element |
|
Set prefix for XENC nodes. Set the namespace prefix the library will use when creating nodes in the XENC namespace |
|
Set prefix for XKMS nodes. Set the namespace prefix the library will use when creating nodes in the XKMS namespace |
|
Set the prefix be used for the XPath-Filter2 namespace. The XPathFilter definition uses its own namespace. This method can be used to set the prefix that the library will use when creating elements in this namespace xmlns:ds="http://www.w3.org/2002/06/xmldsig-filter2" If no prefix is set, the default namespace will be used
|