Class XMLSignatureInputDebugger
- java.lang.Object
-
- org.apache.xml.security.signature.XMLSignatureInputDebugger
-
public class XMLSignatureInputDebugger extends java.lang.Object
Class XMLSignatureInputDebugger
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static AttrCompare
ATTR_COMPARE
(package private) static java.lang.String
HTMLExcludedInclusiveNamespacePrefix
(package private) static java.lang.String
HTMLExcludePrefix
(package private) static java.lang.String
HTMLIncludedInclusiveNamespacePrefix
(package private) static java.lang.String
HTMLIncludeOrExcludeSuffix
(package private) static java.lang.String
HTMLIncludePrefix
(package private) static java.lang.String
HTMLPrefix
The HTML Prefix*(package private) static java.lang.String
HTMLSuffix
HTML Suffix *private java.util.Set<java.lang.String>
inclusiveNamespaces
private static int
NODE_AFTER_DOCUMENT_ELEMENT
private static int
NODE_BEFORE_DOCUMENT_ELEMENT
private static int
NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT
private java.io.Writer
writer
Field writerprivate java.util.Set<org.w3c.dom.Node>
xpathNodeSet
Field _xmlSignatureInput
-
Constructor Summary
Constructors Constructor Description XMLSignatureInputDebugger(XMLSignatureInput xmlSignatureInput)
Constructor XMLSignatureInputDebuggerXMLSignatureInputDebugger(XMLSignatureInput xmlSignatureInput, java.util.Set<java.lang.String> inclusiveNamespace)
Constructor XMLSignatureInputDebugger
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
canonicalizeXPathNodeSet(org.w3c.dom.Node currentNode)
Method canonicalizeXPathNodeSetjava.lang.String
getHTMLRepresentation()
Method getHTMLRepresentationprivate int
getPositionRelativeToDocumentElement(org.w3c.dom.Node currentNode)
Checks whether a Comment or ProcessingInstruction is before or after the document element.private void
outputAttrToWriter(java.lang.String name, java.lang.String value)
Normalizes anAttr
ibute value The string value of the node is modified by replacing all ampersands (&) with&
all open angle brackets (<) with<
all quotation mark characters with"
and the whitespace characters#x9
, #xA, and #xD, with character references.private void
outputCommentToWriter(org.w3c.dom.Comment currentComment)
Method outputCommentToWriterprivate void
outputPItoWriter(org.w3c.dom.ProcessingInstruction currentPI)
Normalizes aComment
valueprivate void
outputTextToWriter(java.lang.String text)
Method outputTextToWriter
-
-
-
Field Detail
-
xpathNodeSet
private java.util.Set<org.w3c.dom.Node> xpathNodeSet
Field _xmlSignatureInput
-
inclusiveNamespaces
private java.util.Set<java.lang.String> inclusiveNamespaces
-
writer
private java.io.Writer writer
Field writer
-
HTMLPrefix
static final java.lang.String HTMLPrefix
The HTML Prefix*- See Also:
- Constant Field Values
-
HTMLSuffix
static final java.lang.String HTMLSuffix
HTML Suffix *- See Also:
- Constant Field Values
-
HTMLExcludePrefix
static final java.lang.String HTMLExcludePrefix
- See Also:
- Constant Field Values
-
HTMLIncludePrefix
static final java.lang.String HTMLIncludePrefix
- See Also:
- Constant Field Values
-
HTMLIncludeOrExcludeSuffix
static final java.lang.String HTMLIncludeOrExcludeSuffix
- See Also:
- Constant Field Values
-
HTMLIncludedInclusiveNamespacePrefix
static final java.lang.String HTMLIncludedInclusiveNamespacePrefix
- See Also:
- Constant Field Values
-
HTMLExcludedInclusiveNamespacePrefix
static final java.lang.String HTMLExcludedInclusiveNamespacePrefix
- See Also:
- Constant Field Values
-
NODE_BEFORE_DOCUMENT_ELEMENT
private static final int NODE_BEFORE_DOCUMENT_ELEMENT
- See Also:
- Constant Field Values
-
NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT
private static final int NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT
- See Also:
- Constant Field Values
-
NODE_AFTER_DOCUMENT_ELEMENT
private static final int NODE_AFTER_DOCUMENT_ELEMENT
- See Also:
- Constant Field Values
-
ATTR_COMPARE
static final AttrCompare ATTR_COMPARE
-
-
Constructor Detail
-
XMLSignatureInputDebugger
public XMLSignatureInputDebugger(XMLSignatureInput xmlSignatureInput)
Constructor XMLSignatureInputDebugger- Parameters:
xmlSignatureInput
- the signature to pretty print
-
XMLSignatureInputDebugger
public XMLSignatureInputDebugger(XMLSignatureInput xmlSignatureInput, java.util.Set<java.lang.String> inclusiveNamespace)
Constructor XMLSignatureInputDebugger- Parameters:
xmlSignatureInput
- the signatur to pretty printinclusiveNamespace
-
-
-
Method Detail
-
getHTMLRepresentation
public java.lang.String getHTMLRepresentation() throws XMLSignatureException
Method getHTMLRepresentation- Returns:
- The HTML Representation.
- Throws:
XMLSignatureException
-
canonicalizeXPathNodeSet
private void canonicalizeXPathNodeSet(org.w3c.dom.Node currentNode) throws XMLSignatureException, java.io.IOException
Method canonicalizeXPathNodeSet- Parameters:
currentNode
-- Throws:
XMLSignatureException
java.io.IOException
-
getPositionRelativeToDocumentElement
private int getPositionRelativeToDocumentElement(org.w3c.dom.Node currentNode)
Checks whether a Comment or ProcessingInstruction is before or after the document element. This is needed for prepending or appending "\n"s.- Parameters:
currentNode
- comment or pi to check- Returns:
- NODE_BEFORE_DOCUMENT_ELEMENT, NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT or NODE_AFTER_DOCUMENT_ELEMENT
- See Also:
NODE_BEFORE_DOCUMENT_ELEMENT
,NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT
,NODE_AFTER_DOCUMENT_ELEMENT
-
outputAttrToWriter
private void outputAttrToWriter(java.lang.String name, java.lang.String value) throws java.io.IOException
Normalizes anAttr
ibute value The string value of the node is modified by replacing- all ampersands (&) with
&
- all open angle brackets (<) with
<
- all quotation mark characters with
"
- and the whitespace characters
#x9
, #xA, and #xD, with character references. The character references are written in uppercase hexadecimal with no leading zeroes (for example,#xD
is represented by the character reference
)
- Parameters:
name
-value
-- Throws:
java.io.IOException
- all ampersands (&) with
-
outputPItoWriter
private void outputPItoWriter(org.w3c.dom.ProcessingInstruction currentPI) throws java.io.IOException
Normalizes aComment
value- Parameters:
currentPI
-- Throws:
java.io.IOException
-
outputCommentToWriter
private void outputCommentToWriter(org.w3c.dom.Comment currentComment) throws java.io.IOException
Method outputCommentToWriter- Parameters:
currentComment
-- Throws:
java.io.IOException
-
outputTextToWriter
private void outputTextToWriter(java.lang.String text) throws java.io.IOException
Method outputTextToWriter- Parameters:
text
-- Throws:
java.io.IOException
-
-