public class SpaceStrippedDocument extends GenericTreeInfo
root| 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
|
java.lang.String[] |
getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given name
|
java.util.Iterator<java.lang.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(java.lang.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, getSpaceStrippingRule, getSystemId, getUserData, isStreamed, setConfiguration, setDocumentNumber, setRootNode, setSpaceStrippingRule, setSystemId, setUserDatapublic 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 TreeInfoisTyped in class GenericTreeInfopublic SpaceStrippingRule getStrippingRule()
public NodeInfo selectID(java.lang.String id, boolean getParent)
selectID in interface TreeInfoselectID in class GenericTreeInfoid - the required ID valuegetParent - true if we want the parent of an element with the ID valuepublic java.util.Iterator<java.lang.String> getUnparsedEntityNames()
getUnparsedEntityNames in interface TreeInfogetUnparsedEntityNames in class GenericTreeInfopublic java.lang.String[] getUnparsedEntity(java.lang.String name)
getUnparsedEntity in interface TreeInfogetUnparsedEntity in class GenericTreeInfoname - the name of the entitypublic boolean containsPreserveSpace()
public boolean containsAssertions()
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.