com.sun.msv.reader.relax.core.checker

Class IdAbuseChecker

Implemented Interfaces:
ExpressionVisitorVoid, RELAXExpressionVisitorVoid

public class IdAbuseChecker
extends Object
implements RELAXExpressionVisitorVoid

makes sure that ID/IDREF are not abused. RELAX has the following constraint over the use of ID/IDREF.

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.

  1. no other tag clause shares the same tag name.
  2. no other attribute of non-ID/IDREF types shares the same attribute name.
Author:
Kohsuke KAWAGUCHI

Method Summary

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)

Method Details

check

public static void check(RELAXCoreReader reader,
                         RELAXModule module)

onAnyString

public void onAnyString()
Specified by:
onAnyString in interface ExpressionVisitorVoid

onAttPool

public void onAttPool(AttPoolClause exp)
Specified by:
onAttPool in interface RELAXExpressionVisitorVoid

onAttribute

public void onAttribute(AttributeExp exp)
Specified by:
onAttribute in interface ExpressionVisitorVoid

onChoice

public void onChoice(ChoiceExp exp)
Specified by:
onChoice in interface ExpressionVisitorVoid

onConcur

public void onConcur(ConcurExp exp)
Specified by:
onConcur in interface ExpressionVisitorVoid

onData

public void onData(DataExp exp)
Specified by:
onData in interface ExpressionVisitorVoid

onElement

public void onElement(ElementExp exp)
Specified by:
onElement in interface ExpressionVisitorVoid

onElementRules

public void onElementRules(ElementRules exp)
Specified by:
onElementRules in interface RELAXExpressionVisitorVoid

onEpsilon

public void onEpsilon()
Specified by:
onEpsilon in interface ExpressionVisitorVoid

onHedgeRules

public void onHedgeRules(HedgeRules exp)
Specified by:
onHedgeRules in interface RELAXExpressionVisitorVoid

onInterleave

public void onInterleave(InterleaveExp exp)
Specified by:
onInterleave in interface ExpressionVisitorVoid

onList

public void onList(ListExp exp)
Specified by:
onList in interface ExpressionVisitorVoid

onMixed

public void onMixed(MixedExp exp)
Specified by:
onMixed in interface ExpressionVisitorVoid

onNullSet

public void onNullSet()
Specified by:
onNullSet in interface ExpressionVisitorVoid

onOneOrMore

public void onOneOrMore(OneOrMoreExp exp)
Specified by:
onOneOrMore in interface ExpressionVisitorVoid

onOther

public void onOther(OtherExp exp)
Specified by:
onOther in interface ExpressionVisitorVoid

onRef

public void onRef(ReferenceExp exp)
Specified by:
onRef in interface ExpressionVisitorVoid

onSequence

public void onSequence(SequenceExp exp)
Specified by:
onSequence in interface ExpressionVisitorVoid

onTag

public void onTag(TagClause exp)
Specified by:
onTag in interface RELAXExpressionVisitorVoid

onValue

public void onValue(ValueExp exp)
Specified by:
onValue in interface ExpressionVisitorVoid