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 ExpressionVisitorVoidpublic void onChoice(ChoiceExp exp)
onChoice in interface ExpressionVisitorVoidpublic void onElement(ElementExp exp)
onElement in interface ExpressionVisitorVoidpublic void onOneOrMore(OneOrMoreExp exp)
onOneOrMore in interface ExpressionVisitorVoidpublic void onMixed(MixedExp exp)
onMixed in interface ExpressionVisitorVoidpublic void onRef(ReferenceExp exp)
onRef in interface ExpressionVisitorVoidpublic void onOther(OtherExp exp)
onOther in interface ExpressionVisitorVoidpublic void onEpsilon()
onEpsilon in interface ExpressionVisitorVoidpublic void onNullSet()
onNullSet in interface ExpressionVisitorVoidpublic void onAnyString()
onAnyString in interface ExpressionVisitorVoidpublic void onSequence(SequenceExp exp)
onSequence in interface ExpressionVisitorVoidpublic void onData(DataExp exp)
onData in interface ExpressionVisitorVoidpublic void onValue(ValueExp exp)
onValue in interface ExpressionVisitorVoidpublic void onAttPool(AttPoolClause exp)
onAttPool in interface RELAXExpressionVisitorVoidpublic void onTag(TagClause exp)
onTag in interface RELAXExpressionVisitorVoidpublic void onElementRules(ElementRules exp)
onElementRules in interface RELAXExpressionVisitorVoidpublic void onHedgeRules(HedgeRules exp)
onHedgeRules in interface RELAXExpressionVisitorVoidpublic void onInterleave(InterleaveExp exp)
onInterleave in interface ExpressionVisitorVoidpublic void onConcur(ConcurExp exp)
onConcur in interface ExpressionVisitorVoidpublic void onList(ListExp exp)
onList in interface ExpressionVisitorVoid