public interface XInclusion extends Inclusion
EntityRef
.XInclusionScheme
Modifier and Type | Method and Description |
---|---|
String |
getSchemeName()
Returns the name of the XInclusion scheme which has created this
XInclusion.
|
Node[] |
include(Node firstNode,
Node lastNode,
boolean updating,
XInclusionContext context)
Creates and returns the included nodes corresponding to this XInclusion.
|
boolean |
isMarkedForUpdate()
Returns
true if this XInclusion has been marked for update
using setMarkedForUpdate(boolean) ; false otherwise
This method is exclusively for use by the XIncluder. |
void |
setMarkedForUpdate(boolean mark)
Mark this inclusion for update.
|
Node[] |
uninclude(Node firstIncludedNode,
Node lastIncludedNode)
Creates and returns one or more nodes acting as the inclusion directive
which allows to obtain specified nodes.
|
toClipboardForm
String getSchemeName()
XInclusionScheme.getSchemeName()
.void setMarkedForUpdate(boolean mark)
Application code does this to signal the XIncluded that the included nodes attached to this XInclusion need to be ``refreshed''.
boolean isMarkedForUpdate()
true
if this XInclusion has been marked for update
using setMarkedForUpdate(boolean)
; false
otherwise
This method is exclusively for use by the XIncluder.
Node[] include(Node firstNode, Node lastNode, boolean updating, XInclusionContext context) throws InclusionException
firstNode
- first node to be replaced by those returned
by this method.lastNode
- last node to be replaced by those returned
by this method.
firstNode and lastNode specify a node range attached to the document tree.
updating
- if true
, firstNode and
lastNode specify an included node range to be replaced
by a more up-to-date included node range. If false
,
firstNode and lastNode specify an inclusion directive
to be replaced by an included node range.Included nodes are copies of some ``original nodes''.
These copies are not always clones of the original nodes (e.g. DITA conref).
The returned nodes must each have a
Constants.SOURCE_URL_PROPERTY
property
properly set.
On the other hand, adding the
Constants.INCLUSION_PROPERTY
and
Constants.READ_ONLY_PROPERTY
properties
to returned nodes is not useful.
InclusionException
- if this XInclusion fails to
locate the original nodesNode[] uninclude(Node firstIncludedNode, Node lastIncludedNode)
For example, if this XInclusion is an XInclude, this method returns an <xi:include> element having the proper attributes.
firstIncludedNode
- first node in the included node range
having this XInclusion object as its
Constants.INCLUSION_PROPERTY
property.
This node is attached to the document being processed.lastIncludedNode
- last node in the included node range
having this XInclusion object as its
Constants.INCLUSION_PROPERTY
property
This node, a sibling of lastIncludedNode, is also attached to
the document being processed.