net.sf.saxon.om

Class SpaceStrippedDocument

public class SpaceStrippedDocument extends SpaceStrippedNode implements DocumentInfo

A SpaceStrippedDocument represents a view of a real Document in which selected whitespace text nodes are treated as having been stripped.
Constructor Summary
SpaceStrippedDocument(DocumentInfo doc, Stripper stripper)
Create a space-stripped view of a document
Method Summary
booleancontainsPreserveSpace()
Does the stripped document contain any xml:space="preserve" attributes?
ConfigurationgetConfiguration()
Get the configuration previously set using setConfiguration
longgetDocumentNumber()
Get the unique document number
NamePoolgetNamePool()
Get the name pool used for the names in this document
StrippergetStripper()
Get the document's stripper
String[]getUnparsedEntity(String name)
Get the unparsed entity with a given name
Iterator<String>getUnparsedEntityNames()
Get the list of unparsed entities defined in this document
NodeInfoselectID(String id, boolean getParent)
Get the element with a given ID, if any
SpaceStrippedNodewrap(NodeInfo node)
Create a wrapped node within this document

Constructor Detail

SpaceStrippedDocument

public SpaceStrippedDocument(DocumentInfo doc, Stripper stripper)
Create a space-stripped view of a document

Parameters: doc the underlying document stripper an object that contains the rules defining which whitespace text nodes are to be absent from the view

Method Detail

containsPreserveSpace

public boolean containsPreserveSpace()
Does the stripped document contain any xml:space="preserve" attributes?

getConfiguration

public Configuration getConfiguration()
Get the configuration previously set using setConfiguration

getDocumentNumber

public long getDocumentNumber()
Get the unique document number

getNamePool

public NamePool getNamePool()
Get the name pool used for the names in this document

getStripper

public Stripper getStripper()
Get the document's stripper

getUnparsedEntity

public String[] getUnparsedEntity(String name)
Get the unparsed entity with a given name

Parameters: name the name of the entity

getUnparsedEntityNames

public Iterator<String> getUnparsedEntityNames()
Get the list of unparsed entities defined in this document

Returns: an Iterator, whose items are of type String, containing the names of all unparsed entities defined in this document. If there are no unparsed entities or if the information is not available then an empty iterator is returned

selectID

public NodeInfo selectID(String id, boolean getParent)
Get the element with a given ID, if any

Parameters: id the required ID value getParent

Returns: the element with the given ID value, or null if there is none.

wrap

public SpaceStrippedNode wrap(NodeInfo node)
Create a wrapped node within this document