public interface XInclusionScheme
Modifier and Type | Method and Description |
---|---|
boolean |
detectXInclusion(Node[] directive,
boolean isElement,
XInclusion[] detected)
Create and return the XInclusion corresponding to specified directive,
when such directive has been recognized by this scheme.
|
String |
getSchemeName()
Returns a name identifying uniquely this scheme.
|
String getSchemeName()
boolean detectXInclusion(Node[] directive, boolean isElement, XInclusion[] detected) throws InclusionException
directive
- an array of two nodes initially containing
the same node: an element or a processing-instruction.
Nodes other than elements or processing-instructions cannot be used as inclusion directives.
The node passed as an argument is attached to the document being processed. By examining this node, this scheme must very quickly determine whether the node acts as an inclusion directive.
In some cases, the node contained in directive[0]
is just the start of the inclusion directive. In such case, this scheme
must set directive[1]
to the node which is the end of the
inclusion directive.
Example:
<?begin-inclusion spec="..."?> ...pre-included nodes, to be updated... <?end-inclusion>
isElement
- true
if directive[0]
contains an element; false
if directive[0]
contains a processing-instructiondetected
- newly created XInclusion, if any, is assigned to
detected[0]
. May be null
(just a test,
no creation of an XInclusion object).true
if passed node has been recognized
as an inclusion directive; otherwise false
InclusionException
- if the directive has been recognized
but cannot be successfully parsed