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

java.lang.Object
  extended by com.sun.msv.reader.relax.core.checker.IdAbuseChecker
All 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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

check

public static void check(RELAXCoreReader reader,
                         RELAXModule module)

onAttribute

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

onChoice

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

onElement

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

onOneOrMore

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

onMixed

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

onRef

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

onOther

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

onEpsilon

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

onNullSet

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

onAnyString

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

onSequence

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

onData

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

onValue

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

onAttPool

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

onTag

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

onElementRules

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

onHedgeRules

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

onInterleave

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

onConcur

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

onList

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