public class SpaceStrippedDocument extends GenericTreeInfo
Constructor and Description |
---|
SpaceStrippedDocument(TreeInfo doc,
SpaceStrippingRule strippingRule)
Create a space-stripped view of a document
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsAssertions()
Ask whether the stripped document contain any nodes annotated with types that carry assertions
|
boolean |
containsPreserveSpace()
Ask whether the stripped document contains any xml:space="preserve" attributes.
|
SpaceStrippingRule |
getStrippingRule()
Get the document's strippingRule
|
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
|
boolean |
isTyped()
Ask whether the document contains any nodes whose type annotation is anything other than
UNTYPED
|
NodeInfo |
selectID(String id,
boolean getParent)
Get the element with a given ID, if any
|
SpaceStrippedNode |
wrap(NodeInfo node)
Create a wrapped node within this document
|
getConfiguration, getDocumentNumber, getPublicId, getRootNode, getSystemId, getUserData, setConfiguration, setDocumentNumber, setRootNode, setSystemId, setUserData
public SpaceStrippedDocument(TreeInfo doc, SpaceStrippingRule strippingRule)
doc
- the underlying documentstrippingRule
- an object that contains the rules defining which whitespace
text nodes are to be absent from the viewpublic SpaceStrippedNode wrap(NodeInfo node)
public boolean isTyped()
isTyped
in interface TreeInfo
isTyped
in class GenericTreeInfo
public SpaceStrippingRule getStrippingRule()
public NodeInfo selectID(String id, boolean getParent)
selectID
in interface TreeInfo
selectID
in class GenericTreeInfo
id
- the required ID valuegetParent
- true if we want the parent of an element with the ID valuepublic Iterator<String> getUnparsedEntityNames()
getUnparsedEntityNames
in interface TreeInfo
getUnparsedEntityNames
in class GenericTreeInfo
public String[] getUnparsedEntity(String name)
getUnparsedEntity
in interface TreeInfo
getUnparsedEntity
in class GenericTreeInfo
name
- the name of the entitypublic boolean containsPreserveSpace()
public boolean containsAssertions()
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.