public class IdAbuseChecker extends java.lang.Object implements RELAXExpressionVisitorVoid
First, ID and IDREF can be only used as attribute values. They cannot be used from type attribute of elementRules.
Second, if <tag> clause declares directly or indirectly (by referencing attPool) one of its attribute as ID/IDREF type, it must satisfies either (or both) of the following statement.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
currentTagName |
private java.util.Set |
idAttributes
set of AttributeExps: that have ID/IDREF values
|
private RELAXModule |
module |
private java.util.Set |
nonIdAttrNames
set of Strings: names of non-ID/IDREF attributes
|
private java.util.Set |
overloadedNames
set of Strings: tag names that are used more than once in this module
|
private RELAXCoreReader |
reader |
private java.util.Set |
tagNames
set of Strings: tag names that are used in this module
|
Modifier | Constructor and Description |
---|---|
private |
IdAbuseChecker(RELAXCoreReader r,
RELAXModule m) |
Modifier and Type | Method and Description |
---|---|
static void |
check(RELAXCoreReader reader,
RELAXModule module) |
void |
onAnyString() |
void |
onAttPool(AttPoolClause exp) |
void |
onAttribute(AttributeExp exp) |
void |
onChoice(ChoiceExp exp) |
void |
onConcur(ConcurExp exp) |
void |
onData(DataExp exp) |
void |
onElement(ElementExp exp) |
void |
onElementRules(ElementRules exp) |
void |
onEpsilon() |
void |
onHedgeRules(HedgeRules exp) |
void |
onInterleave(InterleaveExp exp) |
void |
onList(ListExp exp) |
void |
onMixed(MixedExp exp) |
void |
onNullSet() |
void |
onOneOrMore(OneOrMoreExp exp) |
void |
onOther(OtherExp exp) |
void |
onRef(ReferenceExp exp) |
void |
onSequence(SequenceExp exp) |
void |
onTag(TagClause exp) |
void |
onValue(ValueExp exp) |
private void |
run() |
private final java.util.Set tagNames
private final java.util.Set overloadedNames
private final java.util.Set nonIdAttrNames
private final java.util.Set idAttributes
private final RELAXModule module
private final RELAXCoreReader reader
private java.lang.String currentTagName
private IdAbuseChecker(RELAXCoreReader r, RELAXModule m)
public static void check(RELAXCoreReader reader, RELAXModule module)
private void run()
public void onAttribute(AttributeExp exp)
onAttribute
in interface ExpressionVisitorVoid
public void onChoice(ChoiceExp exp)
onChoice
in interface ExpressionVisitorVoid
public void onElement(ElementExp exp)
onElement
in interface ExpressionVisitorVoid
public void onOneOrMore(OneOrMoreExp exp)
onOneOrMore
in interface ExpressionVisitorVoid
public void onMixed(MixedExp exp)
onMixed
in interface ExpressionVisitorVoid
public void onRef(ReferenceExp exp)
onRef
in interface ExpressionVisitorVoid
public void onOther(OtherExp exp)
onOther
in interface ExpressionVisitorVoid
public void onEpsilon()
onEpsilon
in interface ExpressionVisitorVoid
public void onNullSet()
onNullSet
in interface ExpressionVisitorVoid
public void onAnyString()
onAnyString
in interface ExpressionVisitorVoid
public void onSequence(SequenceExp exp)
onSequence
in interface ExpressionVisitorVoid
public void onData(DataExp exp)
onData
in interface ExpressionVisitorVoid
public void onValue(ValueExp exp)
onValue
in interface ExpressionVisitorVoid
public void onAttPool(AttPoolClause exp)
onAttPool
in interface RELAXExpressionVisitorVoid
public void onTag(TagClause exp)
onTag
in interface RELAXExpressionVisitorVoid
public void onElementRules(ElementRules exp)
onElementRules
in interface RELAXExpressionVisitorVoid
public void onHedgeRules(HedgeRules exp)
onHedgeRules
in interface RELAXExpressionVisitorVoid
public void onInterleave(InterleaveExp exp)
onInterleave
in interface ExpressionVisitorVoid
public void onConcur(ConcurExp exp)
onConcur
in interface ExpressionVisitorVoid
public void onList(ListExp exp)
onList
in interface ExpressionVisitorVoid