public String getBaseSystemId() { if (fLocator != null) { return fLocator.getBaseSystemId(); } return null; }
/** * The start of the DTD. * * @param locator The document locator, or null if the document * location cannot be reported during the parsing of * the document DTD. However, it is <em>strongly</em> * recommended that a locator be supplied that can * at least report the base system identifier of the * DTD. * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */ public void startDTD (XMLLocator locator, Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println ("==>startDTD"); if (DEBUG_BASEURI) { System.out.println (" expandedSystemId: "+locator.getExpandedSystemId ()); System.out.println (" baseURI:"+ locator.getBaseSystemId ()); } } fInDTD = true; if (locator != null) { fBaseURIStack.push (locator.getBaseSystemId ()); } if (fDeferNodeExpansion || fDocumentImpl != null) { fInternalSubset = new StringBuffer (1024); } } // startDTD(XMLLocator)
/** * @see org.apache.xerces.xni.XMLDocumentHandler#startDocument(org.apache.xerces.xni.XMLLocator, * java.lang.String, org.apache.xerces.xni.NamespaceContext, * org.apache.xerces.xni.Augmentations) */ public void startDocument(XMLLocator locator, String enc, NamespaceContext nc, Augmentations aug) throws XNIException { context = nc; baseSystemId = locator.getBaseSystemId(); detecting = true; schema = null; type = null; if (documentHandler != null) { documentHandler.startDocument(locator, enc, nc, aug); } }
/** Constructs a parse exception. */ public XMLParseException(XMLLocator locator, String message) { super(message); if (locator != null) { fPublicId = locator.getPublicId(); fLiteralSystemId = locator.getLiteralSystemId(); fExpandedSystemId = locator.getExpandedSystemId(); fBaseSystemId = locator.getBaseSystemId(); fLineNumber = locator.getLineNumber(); fColumnNumber = locator.getColumnNumber(); fCharacterOffset = locator.getCharacterOffset(); } } // <init>(XMLLocator,String)
/** Constructs a parse exception. */ public XMLParseException(XMLLocator locator, String message, Exception exception) { super(message, exception); if (locator != null) { fPublicId = locator.getPublicId(); fLiteralSystemId = locator.getLiteralSystemId(); fExpandedSystemId = locator.getExpandedSystemId(); fBaseSystemId = locator.getBaseSystemId(); fLineNumber = locator.getLineNumber(); fColumnNumber = locator.getColumnNumber(); fCharacterOffset = locator.getCharacterOffset(); } } // <init>(XMLLocator,String,Exception)
protected void setupCurrentBaseURI(XMLLocator locator) { fCurrentBaseURI.setBaseSystemId(locator.getBaseSystemId()); if (locator.getLiteralSystemId() != null) { fCurrentBaseURI.setLiteralSystemId(locator.getLiteralSystemId()); } else { fCurrentBaseURI.setLiteralSystemId(fHrefFromParent); } String expandedSystemId = locator.getExpandedSystemId(); if (expandedSystemId == null) { // attempt to expand it ourselves try { expandedSystemId = XMLEntityManager.expandSystemId( fCurrentBaseURI.getLiteralSystemId(), fCurrentBaseURI.getBaseSystemId(), false); if (expandedSystemId == null) { expandedSystemId = fCurrentBaseURI.getLiteralSystemId(); } } catch (MalformedURIException e) { reportFatalError("ExpandedSystemId"); } } fCurrentBaseURI.setExpandedSystemId(expandedSystemId); }