Package org.jibx.schema.validation

Examples of org.jibx.schema.validation.ValidationContext.addError()


                String facet = facets[i];
                int index = Arrays.binarySearch(FacetElement.FACET_ELEMENT_NAMES, facet);
                if (index >= 0) {
                    mask |= SchemaBase.ELEMENT_MASKS[FacetElement.FACET_ELEMENT_INDEXES[index]];
                } else {
                    vctx.addError("'" + facet + "' is not a facet name", this);
                }
            }
        }
        m_enforcedFacetsMask = mask;
    }
View Full Code Here


                String facet = facets[i];
                int index = Arrays.binarySearch(FacetElement.FACET_ELEMENT_NAMES, facet);
                if (index >= 0) {
                    mask |= SchemaBase.ELEMENT_MASKS[FacetElement.FACET_ELEMENT_INDEXES[index]];
                } else {
                    vctx.addError("'" + facet + "' is not a facet name", this);
                }
            }
        }
        m_ignoredFacetsMask = mask;
    }
View Full Code Here

        } else {
            ValidationContext vctx = (ValidationContext)ictx.getUserContext();
            String nctext = Conversions.deserializeNMTOKEN(text, vctx, ictx.getStackTop());
            int type = eset.getValue(nctext);
            if (type < 0) {
                vctx.addError("Illegal value \"" + text + "\" for '" + name + "' attribute", ictx.getStackTop());
            }
            return type;
        }
    }
}
View Full Code Here

            if (ns == null || ns.length() == 0) {
               
                // check if schema attribute in allowed set
                if (attrs.indexOf(name) < 0) {
                    ValidationContext vctx = (ValidationContext)ictx.getUserContext();
                    vctx.addError("Undefined attribute " + name, ictx.getStackTop());
                }
               
            } else if (SCHEMA_NAMESPACE.equals(ns)) {
               
                // no attributes from schema namespace are defined
View Full Code Here

               
            } else if (SCHEMA_NAMESPACE.equals(ns)) {
               
                // no attributes from schema namespace are defined
                ValidationContext vctx = (ValidationContext)ictx.getUserContext();
                vctx.addError("Undefined attribute " + name, ictx.getStackTop());
               
            } else if (!extra) {
               
                // warn on non-schema attribute present where forbidden
                ValidationContext vctx = (ValidationContext)ictx.getUserContext();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.