@User public class UntypedVisitor<E extends TypedElement<E,X>,X extends TypedExtension> extends Object
TypedDocument
, TypedElement
, the
different subclasses of TypedAttribute
.
TypedProcessingInstruction
and TypedComment
.Modifier and Type | Field and Description |
---|---|
protected E |
nearestElement |
boolean |
validating
If set to false, Attributes with no explicit value
will not be visited.
|
Constructor and Description |
---|
UntypedVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
action(CDataAttribute att)
Does nothing; can be overridden by the user, if required.
|
void |
action(E el)
Calls only
descend(TypedElement) ; can be overridden by the user, if required. |
void |
action(IdAttribute att)
Does nothing; can be overridden by the user, if required.
|
void |
action(IdRefAttribute att)
Does nothing; can be overridden by the user, if required.
|
void |
action(IdRefsAttribute att)
Does nothing; can be overridden by the user, if required.
|
void |
action(NmTokenAttribute att)
Does nothing; can be overridden by the user, if required.
|
void |
action(NmTokensAttribute att)
Does nothing; can be overridden by the user, if required.
|
void |
action(SelectedIntegersAttribute att)
Does nothing; can be overridden by the user, if required.
|
void |
action(TypedAttribute a)
Calls
match(TypedAttribute) for an attribute. |
void |
action(TypedComment c)
No-operation, can be overridden by the user, if required.
|
void |
action(TypedDocument<E,X> doc)
To be overridden by the user.
|
void |
action(TypedPCData p)
Calls only
descend(TypedPCData) ; can be overridden by the user, if required. |
void |
action(TypedProcessingInstruction p)
No-operation, can be overridden by the user, if required.
|
void |
descend_attributes(TypedElement<E,X> ec)
Calls
action(TypedAttribute) for some attributes of the element. |
void |
descend_contents(E ec)
Calls
match(TypedSubstantial) for all contents. |
void |
descend_followingEthereals(TypedSubstantial<?> ec)
Calls
match(TypedEthereal) for all following ethereals. |
void |
descend_leadingEthereals(TypedEtherealContainer ec)
Calls
match(TypedEthereal) for all leading ethereals. |
void |
descend_precedingEthereals(TypedSubstantial<?> ec)
Calls
match(TypedEthereal) for all preceding ethereals. |
void |
descend_trailingEthereals(TypedEtherealContainer ec)
Calls
match(TypedEthereal) for all trailing ethereals. |
void |
descend(E el)
Calls action/match for preceding and leading Ethereals, than attributes, then contents
by
descend_contents(TypedElement) ,
then trailing and following Ethereals. |
void |
descend(TypedDocument<E,X> doc)
Calls
action(TypedElement) for the one top-level element. |
void |
descend(TypedPCData p)
|
E |
getNearestElement()
The last entered element.
|
void |
match(TypedAttribute ta)
Calls one of the overloaded
action(X a) methods for the
different subtypes of TypedAttribute . |
void |
match(TypedEthereal te)
Distinguishes between
action(TypedComment) and
action(TypedProcessingInstruction) |
void |
match(TypedSubstantial<X> te)
Distinguishes between
action(TypedElement) and
action(TypedPCData) . |
@User public boolean validating
attribute.setValue()
.
Default value of this field is true
.
protected E extends TypedElement<E,X> nearestElement
@User @Opt public E getNearestElement()
@User public void action(TypedDocument<E,X> doc)
descend(TypedDocument)
@User public void descend(TypedDocument<E,X> doc)
action(TypedElement)
for the one top-level element.@User public void match(TypedSubstantial<X> te)
action(TypedElement)
and
action(TypedPCData)
.@User public void action(TypedPCData p)
descend(TypedPCData)
; can be overridden by the user, if required.@User public void descend(TypedPCData p)
@User public void action(E el)
descend(TypedElement)
; can be overridden by the user, if required.@User public void descend(E el)
descend_contents(TypedElement)
,
then trailing and following Ethereals.@User public void descend_contents(E ec)
match(TypedSubstantial)
for all contents.
(This will in turn call action(TypedElement)
or
action(TypedPCData)
.)@User public void descend_leadingEthereals(TypedEtherealContainer ec)
match(TypedEthereal)
for all leading ethereals.@User public void descend_trailingEthereals(TypedEtherealContainer ec)
match(TypedEthereal)
for all trailing ethereals.@User public void descend_precedingEthereals(TypedSubstantial<?> ec)
match(TypedEthereal)
for all preceding ethereals.@User public void descend_followingEthereals(TypedSubstantial<?> ec)
match(TypedEthereal)
for all following ethereals.@User public void match(TypedEthereal te)
action(TypedComment)
and
action(TypedProcessingInstruction)
@User public void action(TypedComment c)
@User public void action(TypedProcessingInstruction p)
@User public void descend_attributes(TypedElement<E,X> ec)
action(TypedAttribute)
for some attributes of the element.
validating
is true, then all attributes
are visited which (a) had been assigned an explicit value when creating the
document, or later by TypedAttribute.setValue(V)
,
and (b) all those which have a default value in the DTD.
validating
is false, then only the attributes
from case (a) are visited.@User public void action(TypedAttribute a)
match(TypedAttribute)
for an attribute. May be overridden.@User public void match(TypedAttribute ta)
action(X a)
methods for the
different subtypes of TypedAttribute
.@User public void action(CDataAttribute att)
@User public void action(IdAttribute att)
@User public void action(IdRefAttribute att)
@User public void action(IdRefsAttribute att)
@User public void action(NmTokenAttribute att)
@User public void action(NmTokensAttribute att)
@User public void action(SelectedIntegersAttribute att)
see also the complete user documentation .