com.sun.msv.grammar.xmlschema
public class LaxDefaultNameClass extends NameClass
In "lax" mode, we need a name class that matches all undefined names. Although it is possible to use DifferenceNameClass for this purpose, it is not a cost-efficient way because typically it becomes very large. (If there are twenty element declarations, we'll need twenty DifferenceNameClass to exclude all defined names).
This name class uses a {@link Set} to hold multiple names. If a name is contained in that set, it'll be rejected. If a name is not contained, it'll be accepted.
Special care is taken to make this NC as seamless as possible. When the visit method is called, the equivalent name class is constructed internally and the visitor will visit that name class. In this way, the visitors won't notice the existance of this "special" name class.
Constructor Summary | |
---|---|
LaxDefaultNameClass(NameClass _base) |
Method Summary | |
---|---|
boolean | accepts(String namespaceURI, String localName) |
void | addName(String namespaceURI, String localName)
add a name so that this name will be rejected by the accepts method. |
Object | visit(NameClassVisitor visitor) |
Parameters: _base
this name class accepts a name if