/** Returns the size of the stack. */ public int size() { return fContextStack.size(); } // size():int
private int scopeOfLanguage(int depth) { for (int i = fLanguageScope.size() - 1; i >= 0; i--) { if (fLanguageScope.elementAt(i) <= depth) return i; } // we should never get here, because 0 was put on the stack in startDocument() return -1; }
private int scopeOfBaseURI(int depth) { for (int i = fBaseURIScope.size() - 1; i >= 0; i--) { if (fBaseURIScope.elementAt(i) <= depth) return i; } // we should never get here, because 0 was put on the stack in startDocument() return -1; }
/** * Returns a relative URI, which when resolved against the base URI at the * specified depth, will create the current base URI. * This is accomplished by merged the literal system IDs. * @param depth the depth at which to start creating the relative URI * @return a relative URI to convert the base URI at the given depth to the current * base URI */ public String getRelativeURI(int depth) throws MalformedURIException { // The literal system id at the location given by "start" is *in focus* at // the given depth. So we need to adjust it to the next scope, so that we // only process out of focus literal system ids int start = scopeOfBaseURI(depth) + 1; if (start == fBaseURIScope.size()) { // If that is the last system id, then we don't need a relative URI return ""; } URI uri = new URI("file", (String)fLiteralSystemID.elementAt(start)); for (int i = start + 1; i < fBaseURIScope.size(); i++) { uri = new URI(uri, (String)fLiteralSystemID.elementAt(i)); } return uri.getPath(); }
fCurrentPSVI.fTypeAlternative = this.fTypeAlternative; ObjectList inheritedAttributesForPsvi = null; if (fInhrAttrCountStack.size() > 0) { fInheritableAttrList.setSize(fInhrAttrCountStack.pop()); inheritedAttributesForPsvi = fTypeAlternativeValidator.getInheritedAttributesForPSVI();
if (fBaseURIScope.size() > 0 && fDepth == fBaseURIScope.peek()) {