public boolean canStartWithElement(QName name) { return name != null && _startSet.contains(name); }
if (!baseModel.getWildcardSet().contains(sAttr.getName())) state.error(XmlErrorCodes.COMPLEX_TYPE_RESTRICTION$ATTR_IN_BASE_WILDCARD_SET, new Object[] { QNameHelper.pretty(sAttr.getName()), QNameHelper.pretty(outerType.getName()) }, xsdattr);
private boolean nameHit(QName namePattern, QNameSet setPattern, QName name) { return setPattern == null ? namesSame(namePattern, name) : setPattern.contains(name); }
public void find_all_element_users ( QNameSet names, List fillMeUp ) { for ( Xobj x = _firstChild ; x != null ; x = x._nextSibling ) if (x.isElem() && names.contains( x._name )) fillMeUp.add( x.getUser() ); }
public TypeStoreUser find_element_user ( QNameSet names, int i ) { for ( Xobj x = _firstChild ; x != null ; x = x._nextSibling ) if (x.isElem() && names.contains( x._name ) && --i < 0) return x.getUser(); return null; }
public void remove_element ( QNameSet names, int i ) { if (i < 0) throw new IndexOutOfBoundsException(); if (!isContainer()) throw new IllegalStateException(); Xobj x; for ( x = _firstChild ; x != null ; x = x._nextSibling ) if (x.isElem() && names.contains( x._name ) && --i < 0) break; removeElement( x ); }
int count(Xobj parent, QName name, QNameSet set) { int n = 0; for (Xobj x = findNthChildElem(parent, name, set, 0); x != null; x = x._nextSibling) { if (x.isElem()) { if (set == null) { if (x._name.equals(name)) n++; } else if (set.contains(x._name)) n++; } } return n; }
public TypeStoreUser add_element_user ( QName name ) { if (!isContainer()) throw new IllegalStateException(); QNameSet endSet = null; boolean gotEndSet = false; Xobj candidate = null; for ( Xobj x = _lastChild ; x != null ; x = x._prevSibling ) { if (x.isContainer()) { if (x._name.equals( name )) break; if (!gotEndSet) { endSet = _user.get_element_ending_delimiters( name ); gotEndSet = true; } if (endSet == null || endSet.contains( x._name )) candidate = x; } } return candidate == null ? insertElement( name, this, END_POS ) : insertElement( name, candidate, 0 ); }
if (attributeNameSet.contains(xc.getName()))
if (elementNameSet.contains(xc.getName()))
public SchemaType getAttributeType(QName attrName, SchemaTypeLoader wildcardTypeLoader) { if (isSimpleType() || isNoType()) return BuiltinSchemaTypeSystem.ST_NO_TYPE; if (isURType()) return BuiltinSchemaTypeSystem.ST_ANY_SIMPLE; SchemaProperty prop = (SchemaProperty)_propertyModelByAttributeName.get(attrName); if (prop != null) return prop.getType(); if (!_typedWildcardAttributes.contains(attrName) || wildcardTypeLoader == null) return BuiltinSchemaTypeSystem.ST_NO_TYPE; // For symmetry with the element case (as well as with URType), perhaps // the above line should be returning ST_ANY_SIMPLE SchemaGlobalAttribute attr = wildcardTypeLoader.findAttribute(attrName); if (attr == null) return BuiltinSchemaTypeSystem.ST_NO_TYPE; return attr.getType(); }
private static boolean nsCompat(SchemaParticle baseModel, SchemaLocalElement derivedElement, Collection errors, XmlObject context) { // nsCompat is called when base: ANY, derived: ELEMENT assert baseModel.getParticleType() == SchemaParticle.WILDCARD; boolean nsCompat = false; // For an element declaration particle to be a �valid restriction� of a wildcard particle all of the following must be true: // 1 The element declaration's {target namespace} is �valid� with respect to the wildcard's {namespace constraint} // as defined by Wildcard allows Namespace Name (�3.10.4). if (baseModel.getWildcardSet().contains(derivedElement.getName())) { // 2 R's occurrence range is a valid restriction of B's occurrence range as defined by Occurrence Range OK (�3.9.6). if (occurrenceRangeOK(baseModel, (SchemaParticle) derivedElement, errors, context)) { nsCompat = true; } else { // error already produced by occurrenceRangeOK //errors.add(XmlError.forObject(formatOccurenceRangeMinError(baseModel, (SchemaParticle) derivedElement), context)); } } else { nsCompat = false; errors.add(XmlError.forObject(XmlErrorCodes.PARTICLE_DERIVATION_NS_COMPAT$WILDCARD_VALID, new Object[] { printParticle((SchemaParticle)derivedElement), printParticle(baseModel) }, context)); } return nsCompat; }
else if (!_typedWildcardAttributes.contains(attrName))
return BuiltinSchemaTypeSystem.ST_NO_TYPE; if (_typedWildcardElements.contains(eltName) || _validSubstitutions.contains(eltName))
else if (_typedWildcardElements.contains(eltName) || _validSubstitutions.contains(eltName))
if (!attrWildcardSet.contains( attrName ))
public TypeStoreUser find_element_user ( QNameSet names, int i ) { for ( Xobj x = _firstChild ; x != null ; x = x._nextSibling ) if (x.isElem() && names.contains( x._name ) && --i < 0) return x.getUser(); return null; }
public TypeStoreUser find_element_user ( QNameSet names, int i ) { for ( Xobj x = _firstChild ; x != null ; x = x._nextSibling ) if (x.isElem() && names.contains( x._name ) && --i < 0) return x.getUser(); return null; }
if (!elemWildcardSet.contains( name ))