use of com.sun.tools.rngom.digested.DDefine in project jaxb-ri by eclipse-ee4j.
the class RELAXNGCompiler method promoteElementDefsToClasses.
private void promoteElementDefsToClasses() {
// look for elements among named patterns
for (DDefine def : defs) {
DPattern p = def.getPattern();
if (p instanceof DElementPattern) {
DElementPattern ep = (DElementPattern) p;
mapToClass(ep);
}
}
// also look for root elements
grammar.accept(new DPatternWalker() {
@Override
public Void onRef(DRefPattern p) {
// stop recursion
return null;
}
@Override
public Void onElement(DElementPattern p) {
mapToClass(p);
return null;
}
});
}
use of com.sun.tools.rngom.digested.DDefine in project jaxb-ri by eclipse-ee4j.
the class DefineFinder method onGrammar.
@Override
public Void onGrammar(DGrammarPattern p) {
for (DDefine def : p) {
defs.add(def);
def.getPattern().accept(this);
}
return p.getStart().accept(this);
}
Aggregations