com.sun.msv.reader.relax.core.checker
Class IdAbuseChecker
java.lang.Object
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.
- no other tag clause shares the same tag name.
- no other attribute of non-ID/IDREF types shares the same attribute name.
- Author:
- Kohsuke KAWAGUCHI
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