com.teamkonzept.dom4jb.saxon
Class Namespace

java.lang.Object
  |
  +--com.teamkonzept.dom4jb.saxon.Namespace
All Implemented Interfaces:
com.icl.saxon.om.NodeInfo, Source

public class Namespace
extends Object
implements com.icl.saxon.om.NodeInfo


Field Summary
 
Fields inherited from interface com.icl.saxon.om.NodeInfo
ATTRIBUTE, COMMENT, ELEMENT, NAMESPACE, NODE, NONE, NUMBER_OF_TYPES, PI, ROOT, TEXT
 
Constructor Summary
Namespace(String prefix, String namespaceURI, com.icl.saxon.om.NodeInfo parent)
           
 
Method Summary
 int compareOrder(com.icl.saxon.om.NodeInfo other)
          Determine the relative position of this node and another node, in document order.
 void copy(com.icl.saxon.output.Outputter outputter)
           
 void copyStringValue(com.icl.saxon.output.Outputter out)
          Copy the string-value of this node to a given outputter
 String generateId()
           
 String getAttributeValue(int i)
           
 String getAttributeValue(String s, String s1)
           
 String getBaseURI()
          Get the Base URI for the node, that is, the URI used for resolving a relative URI contained in the node.
 String getDisplayName()
           
 com.icl.saxon.om.DocumentInfo getDocumentRoot()
          Get the root (document) node
 com.icl.saxon.om.AxisEnumeration getEnumeration(byte axisNumber, com.icl.saxon.pattern.NodeTest nodeTest)
          Return an enumeration over the nodes reached by the given axis from this node
 int getFingerprint()
          Get fingerprint.
 int getLineNumber()
          Get line number
 String getLocalName()
           
 int getNameCode()
          Get name code.
 short getNodeType()
           
 com.icl.saxon.om.NodeInfo getParent()
          Get the NodeInfo object representing the parent of this node
 String getPrefix()
           
 String getStringValue()
           
 String getSystemId()
          Get the System ID for the node.
 String getURI()
          Get the URI part of the name of this node.
 boolean hasChildNodes()
           
 boolean isSameNode(com.icl.saxon.om.NodeInfo other)
          Determine whether this is the same node as another node.
 void outputNamespaceNodes(com.icl.saxon.output.Outputter outputter, boolean b)
           
 void setSystemId(String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Namespace

public Namespace(String prefix,
                 String namespaceURI,
                 com.icl.saxon.om.NodeInfo parent)
Method Detail

getSystemId

public String getSystemId()
Get the System ID for the node.

Specified by:
getSystemId in interface com.icl.saxon.om.NodeInfo
Returns:
the System Identifier of the entity in the source document containing the node, or null if not known. Note this is not the same as the base URI: the base URI can be modified by xml:base, but the system ID cannot.

setSystemId

public void setSystemId(String uri)
Specified by:
setSystemId in interface Source

getBaseURI

public String getBaseURI()
Get the Base URI for the node, that is, the URI used for resolving a relative URI contained in the node. This will be the same as the System ID unless xml:base has been used.

Specified by:
getBaseURI in interface com.icl.saxon.om.NodeInfo

hasChildNodes

public boolean hasChildNodes()
Specified by:
hasChildNodes in interface com.icl.saxon.om.NodeInfo

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface com.icl.saxon.om.NodeInfo

getStringValue

public String getStringValue()
Specified by:
getStringValue in interface com.icl.saxon.om.NodeInfo

getLocalName

public String getLocalName()
Specified by:
getLocalName in interface com.icl.saxon.om.NodeInfo

getPrefix

public String getPrefix()
Specified by:
getPrefix in interface com.icl.saxon.om.NodeInfo

getNodeType

public short getNodeType()
Specified by:
getNodeType in interface com.icl.saxon.om.NodeInfo

getLineNumber

public int getLineNumber()
Get line number

Specified by:
getLineNumber in interface com.icl.saxon.om.NodeInfo
Returns:
the line number of the node in its original source document; or -1 if not available

getNameCode

public int getNameCode()
Get name code. The name code is a coded form of the node name: two nodes with the same name code have the same namespace URI, the same local name, and the same prefix. By masking the name code with &0xfffff, you get a fingerprint: two nodes with the same fingerprint have the same local name and namespace URI.

Specified by:
getNameCode in interface com.icl.saxon.om.NodeInfo
See Also:
allocate

getFingerprint

public int getFingerprint()
Get fingerprint. The fingerprint is a coded form of the expanded name of the node: two nodes with the same name code have the same namespace URI and the same local name. A fingerprint of -1 should be returned for a node with no name.

Specified by:
getFingerprint in interface com.icl.saxon.om.NodeInfo

outputNamespaceNodes

public void outputNamespaceNodes(com.icl.saxon.output.Outputter outputter,
                                 boolean b)
                          throws TransformerException
Specified by:
outputNamespaceNodes in interface com.icl.saxon.om.NodeInfo
TransformerException

copy

public void copy(com.icl.saxon.output.Outputter outputter)
          throws TransformerException
Specified by:
copy in interface com.icl.saxon.om.NodeInfo
TransformerException

generateId

public String generateId()
Specified by:
generateId in interface com.icl.saxon.om.NodeInfo

getAttributeValue

public String getAttributeValue(int i)
Specified by:
getAttributeValue in interface com.icl.saxon.om.NodeInfo

getAttributeValue

public String getAttributeValue(String s,
                                String s1)
Specified by:
getAttributeValue in interface com.icl.saxon.om.NodeInfo

getURI

public String getURI()
Get the URI part of the name of this node. This is the URI corresponding to the prefix, or the URI of the default namespace if appropriate.

Specified by:
getURI in interface com.icl.saxon.om.NodeInfo
Returns:
The URI of the namespace of this node. For an unnamed node, return null. For a node with an empty prefix, return an empty string.

getParent

public com.icl.saxon.om.NodeInfo getParent()
Get the NodeInfo object representing the parent of this node

Specified by:
getParent in interface com.icl.saxon.om.NodeInfo

getDocumentRoot

public com.icl.saxon.om.DocumentInfo getDocumentRoot()
Get the root (document) node

Specified by:
getDocumentRoot in interface com.icl.saxon.om.NodeInfo
Returns:
the DocumentInfo representing the containing document

copyStringValue

public void copyStringValue(com.icl.saxon.output.Outputter out)
                     throws TransformerException
Copy the string-value of this node to a given outputter

Specified by:
copyStringValue in interface com.icl.saxon.om.NodeInfo
TransformerException

getEnumeration

public com.icl.saxon.om.AxisEnumeration getEnumeration(byte axisNumber,
                                                       com.icl.saxon.pattern.NodeTest nodeTest)
Return an enumeration over the nodes reached by the given axis from this node

Specified by:
getEnumeration in interface com.icl.saxon.om.NodeInfo
Parameters:
nodeTest - A pattern to be matched by the returned nodes
Returns:
a NodeEnumeration that scans the nodes reached by the axis in turn.

compareOrder

public int compareOrder(com.icl.saxon.om.NodeInfo other)
Determine the relative position of this node and another node, in document order. The other node will always be in the same document.

Specified by:
compareOrder in interface com.icl.saxon.om.NodeInfo
Parameters:
other - The other node, whose position is to be compared with this node
Returns:
-1 if this node precedes the other node, +1 if it follows the other node, or 0 if they are the same node. (In this case, isSameNode() will always return true, and the two nodes will produce the same result for generateId())

isSameNode

public boolean isSameNode(com.icl.saxon.om.NodeInfo other)
Determine whether this is the same node as another node.
Note: a.isSameNode(b) if and only if generateId(a)==generateId(b)

Specified by:
isSameNode in interface com.icl.saxon.om.NodeInfo
Returns:
true if this Node object and the supplied Node object represent the same node in the tree.


Copyright © 2001-2003 Team-Konzept GmbH & CO KG. All Rights Reserved.