|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.lint.RefChecker
public class RefChecker
Attribute checker for checking XML IDREF type attributes. Facilities are provided for checking that the reference is to elements of a certain sort (for instance, there's no sense in getting a GROUP to reference an INFO).
Constructor Summary | |
---|---|
RefChecker(String legalReferent)
Constructs a RefChecker which can only sensibly reference a single given element type. |
|
RefChecker(String[] legalReferents)
Constructs a RefChecker which can only sensibly reference a given list of element types. |
Method Summary | |
---|---|
void |
check(String id,
ElementHandler handler)
Performs a syntactic and/or semantic check on an attribute value for a given element. |
void |
checkLink(LintContext context,
String id,
ElementRef from,
ElementRef to)
Checks that an IDREF->ID arc is sensible. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RefChecker(String[] legalReferents)
legalReferents
- list of element local names which this
ref can sensibly point topublic RefChecker(String legalReferent)
legalReferent
- sole element local name which this ref can
sensibly point toMethod Detail |
---|
public void check(String id, ElementHandler handler)
AttributeChecker
check
in interface AttributeChecker
id
- the value of the attribute to checkhandler
- the element on which attValue appearspublic void checkLink(LintContext context, String id, ElementRef from, ElementRef to)
context
- lint contextid
- ID valuefrom
- element with IDREF value of idto
- element with ID value of id
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |