protected boolean onAttribute( AttributeToken token, StringRef refErr ) { // xsi:*** attribute is ignored. // TODO: maybe we should issue an error for unrecognized xsi:*** attributes. if( token.namespaceURI.equals(XSINamespace) ) { token.match(_docDecl.xsiAttExp); return true; } return super.onAttribute( token, refErr ); }
protected AttributeToken( REDocumentDeclaration docDecl, String namespaceURI, String localName, String qName, StringToken value ) { this(docDecl); reinit( namespaceURI, localName, qName, value ); }
public final Expression feed( Expression exp, AttributeToken token, boolean ignoreUndeclaredAttribute ) { this.token = token; Expression r = exp.visit(this); if(r!=Expression.nullSet || !ignoreUndeclaredAttribute) return r; // if ignoreUndeclaredAttribute==true and expression is nullSet, // we have to check which of the following is the case. // (1) attribute is undefined // (2) value of the attribute was rejected. this.token = token.createRecoveryAttToken(); r = exp.visit(this); // if wild card token is rejected, then it must be the absence of declaration. if(r==Expression.nullSet) return exp; // otherwise the value was wrong. return Expression.nullSet; // if( com.sun.msv.driver.textui.Debug.debug ) // System.out.println("after feeding "+atts.getQName(i)+" attribute"); // System.out.println(com.sun.msv.grammar.trex.util.TREXPatternPrinter.printContentModel(exp)); }
/** * creates an object that validates the specified expression. */ public REDocumentDeclaration( Expression topLevel, ExpressionPool pool ) { this.topLevel = topLevel; this.pool = pool; resCalc = new ResidualCalculator(pool); attFeeder = new AttributeFeeder(this); attPicker = new AttributePicker(pool); attPruner = new AttributePruner(pool); attRemover = new AttributeRemover(pool); cccec = new CombinedChildContentExpCreator(pool); ecc = new ElementsOfConcernCollector(); attToken = new AttributeToken(this,null,null,null,null); }
public final Expression feed( Expression exp, AttributeToken token, boolean ignoreUndeclaredAttribute ) { this.token = token; Expression r = exp.visit(this); if(r!=Expression.nullSet || !ignoreUndeclaredAttribute) return r; // if ignoreUndeclaredAttribute==true and expression is nullSet, // we have to check which of the following is the case. // (1) attribute is undefined // (2) value of the attribute was rejected. this.token = token.createRecoveryAttToken(); r = exp.visit(this); // if wild card token is rejected, then it must be the absence of declaration. if(r==Expression.nullSet) return exp; // otherwise the value was wrong. return Expression.nullSet; // if( com.sun.msv.driver.textui.Debug.debug ) // System.out.println("after feeding "+atts.getQName(i)+" attribute"); // System.out.println(com.sun.msv.grammar.trex.util.TREXPatternPrinter.printContentModel(exp)); }
/** * creates an object that validates the specified expression. */ public REDocumentDeclaration( Expression topLevel, ExpressionPool pool ) { this.topLevel = topLevel; this.pool = pool; resCalc = new ResidualCalculator(pool); attFeeder = new AttributeFeeder(this); attPicker = new AttributePicker(pool); attPruner = new AttributePruner(pool); attRemover = new AttributeRemover(pool); cccec = new CombinedChildContentExpCreator(pool); ecc = new ElementsOfConcernCollector(); attToken = new AttributeToken(this,null,null,null,null); }
protected AttributeToken( REDocumentDeclaration docDecl, String namespaceURI, String localName, String qName, StringToken value ) { this(docDecl); reinit( namespaceURI, localName, qName, value ); }
public final Expression feed( Expression exp, AttributeToken token, boolean ignoreUndeclaredAttribute ) { this.token = token; Expression r = exp.visit(this); if(r!=Expression.nullSet || !ignoreUndeclaredAttribute) return r; // if ignoreUndeclaredAttribute==true and expression is nullSet, // we have to check which of the following is the case. // (1) attribute is undefined // (2) value of the attribute was rejected. this.token = token.createRecoveryAttToken(); r = exp.visit(this); // if wild card token is rejected, then it must be the absence of declaration. if(r==Expression.nullSet) return exp; // otherwise the value was wrong. return Expression.nullSet; // if( com.sun.msv.driver.textui.Debug.debug ) // System.out.println("after feeding "+atts.getQName(i)+" attribute"); // System.out.println(com.sun.msv.grammar.trex.util.TREXPatternPrinter.printContentModel(exp)); }
protected boolean onAttribute( AttributeToken token, StringRef refErr ) { // xsi:*** attribute is ignored. // TODO: maybe we should issue an error for unrecognized xsi:*** attributes. if( token.namespaceURI.equals(XSINamespace) ) { token.match(_docDecl.xsiAttExp); return true; } return super.onAttribute( token, refErr ); }
/** * creates an object that validates the specified expression. */ public REDocumentDeclaration( Expression topLevel, ExpressionPool pool ) { this.topLevel = topLevel; this.pool = pool; resCalc = new ResidualCalculator(pool); attFeeder = new AttributeFeeder(this); attPicker = new AttributePicker(pool); attPruner = new AttributePruner(pool); attRemover = new AttributeRemover(pool); cccec = new CombinedChildContentExpCreator(pool); ecc = new ElementsOfConcernCollector(); attToken = new AttributeToken(this,null,null,null,null); }
protected AttributeToken( REDocumentDeclaration docDecl, String namespaceURI, String localName, String qName, StringToken value ) { this(docDecl); reinit( namespaceURI, localName, qName, value ); }
public final Expression feed( Expression exp, AttributeToken token, boolean ignoreUndeclaredAttribute ) { this.token = token; Expression r = exp.visit(this); if(r!=Expression.nullSet || !ignoreUndeclaredAttribute) return r; // if ignoreUndeclaredAttribute==true and expression is nullSet, // we have to check which of the following is the case. // (1) attribute is undefined // (2) value of the attribute was rejected. this.token = token.createRecoveryAttToken(); r = exp.visit(this); // if wild card token is rejected, then it must be the absence of declaration. if(r==Expression.nullSet) return exp; // otherwise the value was wrong. return Expression.nullSet; // if( com.sun.msv.driver.textui.Debug.debug ) // System.out.println("after feeding "+atts.getQName(i)+" attribute"); // System.out.println(com.sun.msv.grammar.trex.util.TREXPatternPrinter.printContentModel(exp)); }
protected boolean onAttribute( AttributeToken token, StringRef refErr ) { // xsi:*** attribute is ignored. // TODO: maybe we should issue an error for unrecognized xsi:*** attributes. if( token.namespaceURI.equals(XSINamespace) ) { token.match(_docDecl.xsiAttExp); return true; } return super.onAttribute( token, refErr ); }
/** * creates an object that validates the specified expression. */ public REDocumentDeclaration( Expression topLevel, ExpressionPool pool ) { this.topLevel = topLevel; this.pool = pool; resCalc = new ResidualCalculator(pool); attFeeder = new AttributeFeeder(this); attPicker = new AttributePicker(pool); attPruner = new AttributePruner(pool); attRemover = new AttributeRemover(pool); cccec = new CombinedChildContentExpCreator(pool); ecc = new ElementsOfConcernCollector(); attToken = new AttributeToken(this,null,null,null,null); }
protected AttributeToken( REDocumentDeclaration docDecl, String namespaceURI, String localName, String qName, StringToken value ) { this(docDecl); reinit( namespaceURI, localName, qName, value ); }
AttributeRecoveryToken rtoken = token.createRecoveryAttToken(); r = docDecl.attFeeder.feed( this.expression, rtoken, ignoreUndeclaredAttributes );
protected boolean onAttribute( AttributeToken token, StringRef refErr ) { // xsi:*** attribute is ignored. // TODO: maybe we should issue an error for unrecognized xsi:*** attributes. if( token.namespaceURI.equals(XSINamespace) ) { token.match(_docDecl.xsiAttExp); return true; } return super.onAttribute( token, refErr ); }
public final boolean onAttribute2( String namespaceURI, String localName, String qName, String value, IDContextProvider2 context, StringRef refErr, DatatypeRef refType ) { // instead of creating a new object each time, // use a cached copy. docDecl.attToken.reinit( namespaceURI,localName,qName, new StringToken(docDecl,value,context,refType) ); return onAttribute( docDecl.attToken, refErr ); }
AttributeRecoveryToken rtoken = token.createRecoveryAttToken(); r = docDecl.attFeeder.feed( this.expression, rtoken, ignoreUndeclaredAttributes );
public final boolean onAttribute2( String namespaceURI, String localName, String qName, String value, IDContextProvider2 context, StringRef refErr, DatatypeRef refType ) { // instead of creating a new object each time, // use a cached copy. docDecl.attToken.reinit( namespaceURI,localName,qName, new StringToken(docDecl,value,context,refType) ); return onAttribute( docDecl.attToken, refErr ); }