mIdDefs = new ElementIdMap(); ElementId eid = mIdDefs.addDefined(idStr, loc, elemPName, attrPName); mIdDefs.addReferenced(idStr, loc, elemPName, attrPName); } else if (idType == Datatype.ID_TYPE_IDREFS) { StringTokenizer tokens = new StringTokenizer(idToken.literal); while (tokens.hasMoreTokens()) { mIdDefs.addReferenced(tokens.nextToken(), loc, elemPName, attrPName);
protected void checkIdRefs() throws XMLStreamException { /* 02-Oct-2004, TSa: Now we can also check that all id references * pointed to ids that actually are defined */ if (mIdMap != null) { ElementId ref = mIdMap.getFirstUndefined(); if (ref != null) { // problem! reportValidationProblem("Undefined id '"+ref.getId() +"': referenced from element <" +ref.getElemName()+">, attribute '" +ref.getAttrName()+"'", ref.getLocation()); } } }
ElementId id = m.addReferenced(cbuf, start, i - start, hash, loc, v.getElemName(), mName);
protected ElementIdMap getIdMap() { if (mIdMap == null) { mIdMap = new ElementIdMap(); } return mIdMap; }
for (ElementId id = oldSyms[i]; id != null; ) { ++count; int index = calcHash(id.getId()) & mIndexMask; ElementId nextIn = id.nextColliding(); id.setNextColliding(mTable[index]);
PrefixedName elemName = v.getElemName(); Location loc = v.getLocation(); ElementId id = m.addDefined(cbuf, start, (end - start + 1), hash, loc, elemName, mName);
ElementId id = m.addReferenced(cbuf, start, (end - start + 1), hash, loc, v.getElemName(), mName);
rehash(); index = (hash & mIndexMask);
@Override protected ElementIdMap getIdMap() { if (mIdMap == null) { mIdMap = new ElementIdMap(); } return mIdMap; }
for (ElementId id = oldSyms[i]; id != null; ) { ++count; int index = calcHash(id.getId()) & mIndexMask; ElementId nextIn = id.nextColliding(); id.setNextColliding(mTable[index]);
PrefixedName elemName = v.getElemName(); Location loc = v.getLocation(); ElementId id = m.addDefined(cbuf, start, (end - start + 1), hash, loc, elemName, mName);
mIdDefs = new ElementIdMap(); ElementId eid = mIdDefs.addDefined(idStr, loc, elemPName, attrPName); mIdDefs.addReferenced(idStr, loc, elemPName, attrPName); } else if (idType == Datatype.ID_TYPE_IDREFS) { StringTokenizer tokens = new StringTokenizer(idToken.literal); while (tokens.hasMoreTokens()) { mIdDefs.addReferenced(tokens.nextToken(), loc, elemPName, attrPName);
public void validationCompleted(boolean eod) throws XMLStreamException { /* Ok, so, we should verify that there are no undefined * IDREF/IDREFS references. But only if we hit EOF, not * if validation was cancelled. */ if (eod) { if (mIdDefs != null) { ElementId ref = mIdDefs.getFirstUndefined(); if (ref != null) { // problem! String msg = "Undefined ID '"+ref.getId() +"': referenced from element <" +ref.getElemName()+">, attribute '" +ref.getAttrName()+"'"; reportError(msg, ref.getLocation()); } } } }
ElementId id = m.addReferenced(cbuf, start, i - start, hash, loc, v.getElemName(), mName);
protected ElementIdMap getIdMap() { if (mIdMap == null) { mIdMap = new ElementIdMap(); } return mIdMap; }
for (ElementId id = oldSyms[i]; id != null; ) { ++count; int index = calcHash(id.getId()) & mIndexMask; ElementId nextIn = id.nextColliding(); id.setNextColliding(mTable[index]);