electric.xml.canonical
Class ExclusiveCanonicalizer
java.lang.Object
electric.xml.canonical.Canonicalizer
electric.xml.canonical.ExclusiveCanonicalizer
- All Implemented Interfaces:
- ICanonicalizer, IXMLConstants, IXPathConstants
- public class ExclusiveCanonicalizer
- extends Canonicalizer
- implements IXMLConstants, IXPathConstants
ExcCanonicalizer
- Author:
- webMethods
Field Summary |
protected java.util.Hashtable |
prefixList
|
static java.lang.String |
UTF8
|
protected java.io.Writer |
writer
|
Fields inherited from interface electric.xml.IXMLConstants |
ATTLIST_START, ATTLIST_STOP, CDATA, CDATA_START, CDATA_STOP, CLOSE_TAG, COLON, COMMENT_START, COMMENT_STOP, DOCTYPE_START, DOCTYPE_STOP, ELEMENTDECL_START, ELEMENTDECL_STOP, ENCODING, ENTITYDECL_START, ENTITYDECL_STOP, ID, ID_CASE, INSTRUCTION_START, INSTRUCTION_STOP, NEGATIVE_INFINITY, NOT_A_NUMBER, NOTATIONDECL_START, NOTATIONDECL_STOP, NULL, OPEN_TAG, POSITIVE_INFINITY, PUBLIC, SPECIALS, STANDALONE, SUBSTITUTES, SYSTEM, UNDEFINED, VERSION, XML, XML_NAMESPACE, XMLDECL_START, XMLDECL_STOP, XMLNS, XMLNS_NAMESPACE |
Method Summary |
void |
canonicalize(NodeSet nodeSet,
Node root,
java.io.OutputStream output)
Write the canonicalized node set to the given output
stream. |
protected static boolean |
visiblyUtilizes(Element e,
java.lang.String P,
java.lang.String V,
NodeSet nodeSet)
An element E in a document subset visibly utilizes a namespace
declaration (a namespace prefix P and bound value V, if ???). |
protected void |
writeAttribute(Attribute root,
NodeSet nodeSet,
java.util.Stack state,
boolean writeNode)
|
protected void |
writeDocument(Document document,
NodeSet nodeSet,
java.util.Stack state,
boolean writeNode)
|
protected void |
writeElement(Element element,
NodeSet nodeSet,
java.util.Stack state,
boolean writeNode)
|
protected void |
writeNamespace(XPathNamespace root,
NodeSet nodeSet,
java.util.Stack state,
boolean writeNode)
|
protected void |
writeNamespaceNode(java.lang.String name,
java.lang.String value)
|
protected void |
writeText(Text root,
NodeSet nodeSet,
java.util.Stack state,
boolean writeNode)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UTF8
public static final java.lang.String UTF8
writer
protected java.io.Writer writer
prefixList
protected java.util.Hashtable prefixList
ExclusiveCanonicalizer
public ExclusiveCanonicalizer()
visiblyUtilizes
protected static boolean visiblyUtilizes(Element e,
java.lang.String P,
java.lang.String V,
NodeSet nodeSet)
throws java.lang.Exception
- An element E in a document subset visibly utilizes a namespace
declaration (a namespace prefix P and bound value V, if ???).
- Throws:
java.lang.Exception
writeText
protected void writeText(Text root,
NodeSet nodeSet,
java.util.Stack state,
boolean writeNode)
throws java.lang.Exception
- Specified by:
writeText
in class Canonicalizer
- Parameters:
root
- nodeSet
- state
- writeNode
-
- Throws:
java.lang.Exception
writeNamespace
protected void writeNamespace(XPathNamespace root,
NodeSet nodeSet,
java.util.Stack state,
boolean writeNode)
throws java.lang.Exception
- Specified by:
writeNamespace
in class Canonicalizer
- Parameters:
root
- nodeSet
- state
- writeNode
-
- Throws:
java.lang.Exception
writeNamespaceNode
protected void writeNamespaceNode(java.lang.String name,
java.lang.String value)
throws java.io.IOException
- Parameters:
name
- value
-
- Throws:
java.io.IOException
writeAttribute
protected void writeAttribute(Attribute root,
NodeSet nodeSet,
java.util.Stack state,
boolean writeNode)
throws java.lang.Exception
- Specified by:
writeAttribute
in class Canonicalizer
- Parameters:
root
- nodeSet
- state
- writeNode
-
- Throws:
java.lang.Exception
writeDocument
protected void writeDocument(Document document,
NodeSet nodeSet,
java.util.Stack state,
boolean writeNode)
throws java.lang.Exception
- Specified by:
writeDocument
in class Canonicalizer
- Parameters:
document
- nodeSet
- state
- writeNode
-
- Throws:
java.lang.Exception
writeElement
protected void writeElement(Element element,
NodeSet nodeSet,
java.util.Stack state,
boolean writeNode)
throws java.lang.Exception
- Specified by:
writeElement
in class Canonicalizer
- Parameters:
element
- nodeSet
- state
- writeNode
-
- Throws:
java.lang.Exception
canonicalize
public void canonicalize(NodeSet nodeSet,
Node root,
java.io.OutputStream output)
throws CanonicalizationException
- Write the canonicalized node set to the given output
stream. The spec requires the output to be encoded in UTF8.
- Specified by:
canonicalize
in interface ICanonicalizer
- Specified by:
canonicalize
in class Canonicalizer
- Parameters:
nodeSet
- root
- output
-
- Throws:
CanonicalizationException
copyright© 2001-2004 by webMethods All Rights Reserved.