You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by an...@apache.org on 2001/07/09 13:03:46 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/xni XMLDTDHandler.java XMLDocumentFragmentHandler.java XMLDocumentHandler.java
andyc 01/07/09 04:03:44
Modified: java/design Tag: xerces_j_2 design.html
java/design/xml Tag: xerces_j_2 design-impl.ent
design-xni.ent
java/samples/xni Tag: xerces_j_2 DocumentTracer.java
java/src/org/apache/xerces/impl Tag: xerces_j_2
XMLDTDScanner.java XMLDocumentScanner.java
XMLEntityHandler.java XMLEntityManager.java
XMLEntityScanner.java XMLNamespaceBinder.java
XMLScanner.java XMLValidator.java
java/src/org/apache/xerces/impl/validation Tag: xerces_j_2
XMLEntityDecl.java
java/src/org/apache/xerces/impl/validation/grammars Tag:
xerces_j_2 DTDGrammar.java
java/src/org/apache/xerces/xni Tag: xerces_j_2
XMLDTDHandler.java XMLDocumentFragmentHandler.java
XMLDocumentHandler.java
Log:
1) Added baseSystemId to XNI interface methods and updated impl.
2) Fixed bug where relative parameter entities couldn't declare
relative entities because the parser wouldn't expand the path
properly.
Revision Changes Path
No revision
No revision
1.1.2.16 +17 -2 xml-xerces/java/design/Attic/design.html
Index: design.html
===================================================================
RCS file: /home/cvs/xml-xerces/java/design/Attic/design.html,v
retrieving revision 1.1.2.15
retrieving revision 1.1.2.16
diff -u -r1.1.2.15 -r1.1.2.16
--- design.html 2001/07/09 06:51:59 1.1.2.15
+++ design.html 2001/07/09 11:02:46 1.1.2.16
@@ -61,6 +61,8 @@
class="class-title">String</SPAN> <SPAN
class="param-title">systemId</SPAN>, <SPAN
class="class-title">String</SPAN> <SPAN
+ class="param-title">baseSystemId</SPAN>, <SPAN
+ class="class-title">String</SPAN> <SPAN
class="param-title">encoding</SPAN> )
<LI>
<SPAN class="method-title">textDecl</SPAN> ( <SPAN
@@ -117,7 +119,9 @@
<DD class="methods"> methods: <UL>
<LI>
<SPAN class="method-title">startDocumentFragment</SPAN> (
- <SPAN class="interface-title">NamespaceContext</SPAN> <SPAN
+ <SPAN class="class-title">String</SPAN> <SPAN
+ class="param-title">baseSystemId</SPAN>, <SPAN
+ class="interface-title">NamespaceContext</SPAN> <SPAN
class="param-title">namespaceContext</SPAN> )
<LI>
<SPAN class="method-title">comment</SPAN> ( <SPAN
@@ -144,6 +148,8 @@
class="class-title">String</SPAN> <SPAN
class="param-title">systemId</SPAN>, <SPAN
class="class-title">String</SPAN> <SPAN
+ class="param-title">baseSystemId</SPAN>, <SPAN
+ class="class-title">String</SPAN> <SPAN
class="param-title">encoding</SPAN> )
<LI>
<SPAN class="method-title">endEntity</SPAN> ( <SPAN
@@ -248,6 +254,8 @@
class="class-title">String</SPAN> <SPAN
class="param-title">systemId</SPAN>, <SPAN
class="class-title">String</SPAN> <SPAN
+ class="param-title">baseSystemId</SPAN>, <SPAN
+ class="class-title">String</SPAN> <SPAN
class="param-title">encoding</SPAN> )
<LI>
<SPAN class="method-title">textDecl</SPAN> ( <SPAN
@@ -299,7 +307,9 @@
class="class-title">String</SPAN> <SPAN
class="param-title">publicId</SPAN>, <SPAN
class="class-title">String</SPAN> <SPAN
- class="param-title">systemId</SPAN> )
+ class="param-title">systemId</SPAN>, <SPAN
+ class="class-title">String</SPAN> <SPAN
+ class="param-title">baseSystemId</SPAN> )
<LI>
<SPAN class="method-title">unparsedEntityDecl</SPAN> (
<SPAN class="class-title">String</SPAN> <SPAN
@@ -925,6 +935,8 @@
class="class-title">String</SPAN> <SPAN
class="param-title">systemId</SPAN>, <SPAN
class="class-title">String</SPAN> <SPAN
+ class="param-title">baseSystemId</SPAN>, <SPAN
+ class="class-title">String</SPAN> <SPAN
class="param-title">encoding</SPAN> )
<LI>
<SPAN class="method-title">endEntity</SPAN> ( <SPAN
@@ -982,6 +994,9 @@
<DD class="implements"> implements <SPAN class="interface-title">Locator</SPAN>
<DD class="methods"> methods: <UL>
<LI>
+ <SPAN class="method-title">getBaseSystemId</SPAN> (
+ ) : <SPAN class="class-title">String</SPAN>
+ <LI>
<SPAN class="method-title">setEncoding</SPAN> ( <SPAN
class="class-title">String</SPAN> <SPAN
class="param-title">encoding</SPAN> )
@@ -2349,5 +2364,5 @@
( )
</UL>
</DL>
- </A></BLOCKQUOTE> Last modified: $Date: 2001/07/09 06:51:59 $</BODY>
+ </A></BLOCKQUOTE> Last modified: $Date: 2001/07/09 11:02:46 $</BODY>
</HTML>
No revision
No revision
1.1.2.2 +9 -1 xml-xerces/java/design/xml/Attic/design-impl.ent
Index: design-impl.ent
===================================================================
RCS file: /home/cvs/xml-xerces/java/design/xml/Attic/design-impl.ent,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- design-impl.ent 2001/01/16 09:11:15 1.1.2.1
+++ design-impl.ent 2001/07/09 11:02:52 1.1.2.2
@@ -1,5 +1,5 @@
<?xml encoding='US-ASCII'?>
-<!-- $Id: design-impl.ent,v 1.1.2.1 2001/01/16 09:11:15 andyc Exp $ -->
+<!-- $Id: design-impl.ent,v 1.1.2.2 2001/07/09 11:02:52 andyc Exp $ -->
<category name='Implementation: Core Components' package='&package;.impl'>
<class id='error-reporter' name='XMLErrorReporter'>
@@ -474,6 +474,9 @@
<param name='systemId'>
<reference idref='java-string'/>
</param>
+ <param name='baseSystemId'>
+ <reference idref='java-string'/>
+ </param>
<param name='encoding'>
<note>
The auto-detected encoding of the entity or null if not appropriate.
@@ -561,6 +564,11 @@
<reference idref='sax-locator'/>
</implements>
+ <method name='getBaseSystemId'>
+ <returns>
+ <reference idref='java-string'/>
+ </returns>
+ </method>
<method name='setEncoding'>
<param name='encoding'>
<reference idref='java-string'/>
1.1.2.6 +16 -1 xml-xerces/java/design/xml/Attic/design-xni.ent
Index: design-xni.ent
===================================================================
RCS file: /home/cvs/xml-xerces/java/design/xml/Attic/design-xni.ent,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- design-xni.ent 2001/07/09 06:52:02 1.1.2.5
+++ design-xni.ent 2001/07/09 11:02:54 1.1.2.6
@@ -1,5 +1,5 @@
<?xml encoding='US-ASCII'?>
-<!-- $Id: design-xni.ent,v 1.1.2.5 2001/07/09 06:52:02 andyc Exp $ -->
+<!-- $Id: design-xni.ent,v 1.1.2.6 2001/07/09 11:02:54 andyc Exp $ -->
<category name='Xerces Native Interface (XNI)' package='&package;.xni'>
<interface id='document-handler' name='XMLDocumentHandler'>
@@ -94,6 +94,9 @@
<param name='systemId'>
<reference idref='java-string'/>
</param>
+ <param name='baseSystemId'>
+ <reference idref='java-string'/>
+ </param>
<param name='encoding'>
<note>
The auto-detected encoding of the entity or null if not appropriate.
@@ -209,6 +212,9 @@
<interface id='document-fragment-handler' name='XMLDocumentFragmentHandler'>
<method name='startDocumentFragment'>
+ <param name='baseSystemId'>
+ <reference idref='java-string'/>
+ </param>
<param name='namespaceContext'>
<reference idref='namespace-context'/>
</param>
@@ -265,6 +271,9 @@
<param name='systemId'>
<reference idref='java-string'/>
</param>
+ <param name='baseSystemId'>
+ <reference idref='java-string'/>
+ </param>
<param name='encoding'>
<note>
The auto-detected encoding of the entity or null if not appropriate.
@@ -468,6 +477,9 @@
<param name='systemId'>
<reference idref='java-string'/>
</param>
+ <param name='baseSystemId'>
+ <reference idref='java-string'/>
+ </param>
<param name='encoding'>
<note>
The auto-detected encoding of the entity or null if not appropriate.
@@ -574,6 +586,9 @@
<reference idref='java-string'/>
</param>
<param name='systemId'>
+ <reference idref='java-string'/>
+ </param>
+ <param name='baseSystemId'>
<reference idref='java-string'/>
</param>
<throws>
No revision
No revision
1.1.2.15 +13 -4 xml-xerces/java/samples/xni/Attic/DocumentTracer.java
Index: DocumentTracer.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/samples/xni/Attic/DocumentTracer.java,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -u -r1.1.2.14 -r1.1.2.15
--- DocumentTracer.java 2001/07/09 07:23:02 1.1.2.14
+++ DocumentTracer.java 2001/07/09 11:03:01 1.1.2.15
@@ -85,7 +85,7 @@
* @author Andy Clark, IBM
* @author Arnaud Le Hors, IBM
*
- * @version $Id: DocumentTracer.java,v 1.1.2.14 2001/07/09 07:23:02 andyc Exp $
+ * @version $Id: DocumentTracer.java,v 1.1.2.15 2001/07/09 11:03:01 andyc Exp $
*/
public class DocumentTracer
extends XMLDocumentParser
@@ -391,7 +391,9 @@
//
/** Start entity. */
- public void startEntity(String name, String publicId, String systemId,
+ public void startEntity(String name,
+ String publicId, String systemId,
+ String baseSystemId,
String encoding) throws XNIException {
printIndent();
@@ -405,6 +407,9 @@
fOut.print("systemId=");
printQuotedString(systemId);
fOut.print(',');
+ fOut.print("baseSystemId=");
+ printQuotedString(baseSystemId);
+ fOut.print(',');
fOut.print("encoding=");
printQuotedString(encoding);
fOut.println(')');
@@ -587,8 +592,9 @@
} // internalEntityDecl(String,XMLString)
/** External entity declaration. */
- public void externalEntityDecl(String name, String publicId,
- String systemId) throws XNIException {
+ public void externalEntityDecl(String name,
+ String publicId, String systemId,
+ String baseSystemId) throws XNIException {
printIndent();
fOut.print("externalEntityDecl(");
@@ -600,6 +606,9 @@
fOut.print(',');
fOut.print("systemId=");
printQuotedString(systemId);
+ fOut.print(',');
+ fOut.print("baseSystemId=");
+ printQuotedString(baseSystemId);
fOut.println(')');
fOut.flush();
No revision
No revision
1.1.2.89 +14 -7 xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLDTDScanner.java
Index: XMLDTDScanner.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLDTDScanner.java,v
retrieving revision 1.1.2.88
retrieving revision 1.1.2.89
diff -u -r1.1.2.88 -r1.1.2.89
--- XMLDTDScanner.java 2001/07/09 06:52:03 1.1.2.88
+++ XMLDTDScanner.java 2001/07/09 11:03:06 1.1.2.89
@@ -88,7 +88,7 @@
* @author Glenn Marcy, IBM
* @author Eric Ye, IBM
*
- * @version $Id: XMLDTDScanner.java,v 1.1.2.88 2001/07/09 06:52:03 andyc Exp $
+ * @version $Id: XMLDTDScanner.java,v 1.1.2.89 2001/07/09 11:03:06 andyc Exp $
*/
public class XMLDTDScanner
extends XMLScanner
@@ -420,10 +420,12 @@
* @param systemId
* @param encoding
*/
- public void startEntity(String name, String publicId, String systemId,
+ public void startEntity(String name,
+ String publicId, String systemId,
+ String baseSystemId,
String encoding) throws XNIException {
- super.startEntity(name, publicId, systemId, encoding);
+ super.startEntity(name, publicId, systemId, baseSystemId, encoding);
if (name.equals("[dtd]")) {
// call handler
@@ -441,10 +443,11 @@
// call handler
if (fDTDHandler != null) {
- fDTDHandler.startEntity(name, publicId, systemId, encoding);
+ fDTDHandler.startEntity(name, publicId, systemId,
+ baseSystemId, encoding);
}
- } // startEntity(String,String,String,String)
+ } // startEntity(String,String,String,String,String)
/**
* endEntity
@@ -1381,14 +1384,18 @@
fEntityManager.addUnparsedEntity(name, publicId, systemId, notation);
}
else {
- fEntityManager.addExternalEntity(name, publicId, systemId, null);
+ String baseSystemId = fEntityScanner.getBaseSystemId();
+ fEntityManager.addExternalEntity(name, publicId, systemId,
+ baseSystemId);
}
if (fDTDHandler != null) {
if (notation != null) {
fDTDHandler.unparsedEntityDecl(name, publicId, systemId, notation);
}
else {
- fDTDHandler.externalEntityDecl(name, publicId, systemId);
+ String baseSystemId = fEntityScanner.getBaseSystemId();
+ fDTDHandler.externalEntityDecl(name, publicId, systemId,
+ baseSystemId);
}
}
}
1.1.2.89 +12 -7 xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLDocumentScanner.java
Index: XMLDocumentScanner.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLDocumentScanner.java,v
retrieving revision 1.1.2.88
retrieving revision 1.1.2.89
diff -u -r1.1.2.88 -r1.1.2.89
--- XMLDocumentScanner.java 2001/06/25 05:26:54 1.1.2.88
+++ XMLDocumentScanner.java 2001/07/09 11:03:08 1.1.2.89
@@ -104,7 +104,7 @@
* @author Arnaud Le Hors, IBM
* @author Eric Ye, IBM
*
- * @version $Id: XMLDocumentScanner.java,v 1.1.2.88 2001/06/25 05:26:54 andyc Exp $
+ * @version $Id: XMLDocumentScanner.java,v 1.1.2.89 2001/07/09 11:03:08 andyc Exp $
*/
public class XMLDocumentScanner
extends XMLScanner
@@ -519,6 +519,8 @@
* is external, null otherwise.
* @param systemId The system identifier of the entity if the entity
* is external, null otherwise.
+ * @param baseSystemId The base system identifier of the entity if
+ * the entity is external, null otherwise.
* @param encoding The auto-detected IANA encoding name of the entity
* stream. This value will be null in those situations
* where the entity encoding is not auto-detected (e.g.
@@ -527,7 +529,9 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startEntity(String name, String publicId, String systemId,
+ public void startEntity(String name,
+ String publicId, String systemId,
+ String baseSystemId,
String encoding) throws XNIException {
// keep track of this entity before fEntityDepth is increased
@@ -538,7 +542,7 @@
}
fEntityStack[fEntityDepth] = fMarkupDepth;
- super.startEntity(name, publicId, systemId, encoding);
+ super.startEntity(name, publicId, systemId, baseSystemId, encoding);
// prepare to look for a TextDecl if external general entity
if (!name.equals("[xml]") && fEntityScanner.isExternal()) {
@@ -551,11 +555,12 @@
fDocumentHandler.startDocument(systemId, encoding);
}
else if (!fScanningAttribute) {
- fDocumentHandler.startEntity(name, publicId, systemId, encoding);
+ fDocumentHandler.startEntity(name, publicId, systemId,
+ baseSystemId, encoding);
}
}
- } // startEntity(String,String,String,String)
+ } // startEntity(String,String,String,String,String)
/**
* This method notifies the end of an entity. The DTD has the pseudo-name
@@ -1091,7 +1096,7 @@
if (fDocumentHandler != null) {
if (fNotifyCharRefs) {
fDocumentHandler.startEntity(fCharRefLiteral, null,
- null, null);
+ null, null, null);
}
fDocumentHandler.characters(fStringBuffer2);
if (fNotifyCharRefs) {
@@ -1171,7 +1176,7 @@
private void handleCharacter(char c, String entity) throws XNIException {
if (fDocumentHandler != null) {
if (fNotifyBuiltInRefs) {
- fDocumentHandler.startEntity(entity, null, null, null);
+ fDocumentHandler.startEntity(entity, null, null, null, null);
}
fSingleChar[0] = c;
1.1.2.4 +6 -2 xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLEntityHandler.java
Index: XMLEntityHandler.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLEntityHandler.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- XMLEntityHandler.java 2001/05/09 07:20:25 1.1.2.3
+++ XMLEntityHandler.java 2001/07/09 11:03:09 1.1.2.4
@@ -68,7 +68,7 @@
* @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
* @author Andy Clark, IBM
*
- * @version $Id: XMLEntityHandler.java,v 1.1.2.3 2001/05/09 07:20:25 andyc Exp $
+ * @version $Id: XMLEntityHandler.java,v 1.1.2.4 2001/07/09 11:03:09 andyc Exp $
*/
public interface XMLEntityHandler {
@@ -86,6 +86,8 @@
* is external, null otherwise.
* @param systemId The system identifier of the entity if the entity
* is external, null otherwise.
+ * @param baseSystemId The base system identifier of the entity if
+ * the entity is external, null otherwise.
* @param encoding The auto-detected IANA encoding name of the entity
* stream. This value will be null in those situations
* where the entity encoding is not auto-detected (e.g.
@@ -94,7 +96,9 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startEntity(String name, String publicId, String systemId,
+ public void startEntity(String name,
+ String publicId, String systemId,
+ String baseSystemId,
String encoding) throws XNIException;
/**
1.1.2.79 +43 -10 xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLEntityManager.java
Index: XMLEntityManager.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLEntityManager.java,v
retrieving revision 1.1.2.78
retrieving revision 1.1.2.79
diff -u -r1.1.2.78 -r1.1.2.79
--- XMLEntityManager.java 2001/06/27 05:15:06 1.1.2.78
+++ XMLEntityManager.java 2001/07/09 11:03:10 1.1.2.79
@@ -117,7 +117,7 @@
* @author Andy Clark, IBM
* @author Arnaud Le Hors, IBM
*
- * @version $Id: XMLEntityManager.java,v 1.1.2.78 2001/06/27 05:15:06 andyc Exp $
+ * @version $Id: XMLEntityManager.java,v 1.1.2.79 2001/07/09 11:03:10 andyc Exp $
*/
public class XMLEntityManager
implements XMLComponent {
@@ -548,8 +548,11 @@
if (fEntityHandler != null) {
final String publicId = null;
final String systemId = null;
+ final String baseSystemId = null;
final String encoding = null;
- fEntityHandler.startEntity(entityName, publicId, systemId, encoding);
+ fEntityHandler.startEntity(entityName,
+ publicId, systemId,
+ baseSystemId, encoding);
fEntityHandler.endEntity(entityName);
}
return;
@@ -566,13 +569,17 @@
if (fEntityHandler != null) {
String publicId = null;
String systemId = null;
+ String baseSystemId = null;
final String encoding = null;
if (external) {
ExternalEntity externalEntity = (ExternalEntity)entity;
publicId = externalEntity.publicId;
systemId = externalEntity.systemId;
+ baseSystemId = expandSystemId(systemId, externalEntity.baseSystemId);
}
- fEntityHandler.startEntity(entityName, publicId, systemId, encoding);
+ fEntityHandler.startEntity(entityName,
+ publicId, systemId,
+ baseSystemId, encoding);
fEntityHandler.endEntity(entityName);
}
return;
@@ -600,13 +607,17 @@
if (fEntityHandler != null) {
String publicId = null;
String systemId = null;
+ String baseSystemId = null;
final String encoding = null;
if (external) {
ExternalEntity externalEntity = (ExternalEntity)entity;
publicId = externalEntity.publicId;
systemId = externalEntity.systemId;
+ baseSystemId = expandSystemId(systemId, externalEntity.baseSystemId);
}
- fEntityHandler.startEntity(entityName, publicId, systemId, encoding);
+ fEntityHandler.startEntity(entityName,
+ publicId, systemId,
+ baseSystemId, encoding);
fEntityHandler.endEntity(entityName);
}
return;
@@ -633,7 +644,7 @@
// start the entity
startEntity(entityName, xmlInputSource, literal);
- } // startEntity(String)
+ } // startEntity(String,boolean)
/**
* Starts the document entity. The document entity has the "[xml]"
@@ -934,12 +945,14 @@
* @throws XNIException Thrown by entity handler to signal an error.
*/
protected void startEntity(String name,
- XMLInputSource xmlInputSource, boolean literal)
+ XMLInputSource xmlInputSource,
+ boolean literal)
throws IOException, XNIException {
// get information
final String publicId = xmlInputSource.getPublicId();
final String systemId = xmlInputSource.getSystemId();
+ String baseSystemId = xmlInputSource.getBaseSystemId();
String encoding = xmlInputSource.getEncoding();
// create reader
@@ -950,8 +963,10 @@
if (stream == null) {
String expandedSystemId = xmlInputSource.getExpandedSystemId();
if (expandedSystemId == null) {
- final String baseSystemId = xmlInputSource.getBaseSystemId();
expandedSystemId = expandSystemId(systemId, baseSystemId);
+ if (baseSystemId == null) {
+ baseSystemId = expandedSystemId;
+ }
xmlInputSource.setExpandedSystemId(expandedSystemId);
}
stream = new URL(expandedSystemId).openStream();
@@ -1017,12 +1032,16 @@
fEntityStack.push(fCurrentEntity);
}
+ // create entity
+ String expandedSystemId = expandSystemId(systemId, baseSystemId);
fCurrentEntity = new ScannedEntity(name, publicId, systemId,
- stream, reader, encoding, literal);
+ expandedSystemId, stream, reader,
+ encoding, literal);
// call handler
if (fEntityHandler != null) {
- fEntityHandler.startEntity(name, publicId, systemId, encoding);
+ fEntityHandler.startEntity(name, publicId, systemId,
+ baseSystemId, encoding);
}
} // startEntity(String,XMLInputSource)
@@ -1532,6 +1551,9 @@
/** System identifier. */
public String systemId;
+ /** Base system identifier. */
+ public String baseSystemId;
+
/** Line number. */
public int lineNumber = 1;
@@ -1564,12 +1586,15 @@
//
/** Constructs a scanned entity. */
- public ScannedEntity(String name, String publicId, String systemId,
+ public ScannedEntity(String name,
+ String publicId, String systemId,
+ String baseSystemId,
InputStream stream, Reader reader,
String encoding, boolean literal) {
super(name);
this.publicId = publicId;
this.systemId = systemId;
+ this.baseSystemId = baseSystemId;
this.stream = stream;
this.reader = reader;
this.encoding = encoding;
@@ -1628,6 +1653,14 @@
// XMLEntityScanner methods
//
+ /**
+ * Returns the base system identifier of the currently scanned
+ * entity, or null if none is available.
+ */
+ public String getBaseSystemId() {
+ return fCurrentEntity.baseSystemId;
+ } // getBaseSystemId():String
+
/**
* Sets the encoding of the scanner. This method is used by the
* scanners if the XMLDecl or TextDecl line contains an encoding
1.1.2.10 +7 -1 xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLEntityScanner.java
Index: XMLEntityScanner.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLEntityScanner.java,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -r1.1.2.9 -r1.1.2.10
--- XMLEntityScanner.java 2001/05/09 07:20:27 1.1.2.9
+++ XMLEntityScanner.java 2001/07/09 11:03:11 1.1.2.10
@@ -78,7 +78,7 @@
* @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
* @author Andy Clark, IBM
*
- * @version $Id: XMLEntityScanner.java,v 1.1.2.9 2001/05/09 07:20:27 andyc Exp $
+ * @version $Id: XMLEntityScanner.java,v 1.1.2.10 2001/07/09 11:03:11 andyc Exp $
*
* @see XMLEntityHandler
* @see XMLEntityManager
@@ -89,6 +89,12 @@
//
// Public methods
//
+
+ /**
+ * Returns the base system identifier of the currently scanned
+ * entity, or null if none is available.
+ */
+ public abstract String getBaseSystemId();
/**
* Sets the encoding of the scanner. This method is used by the
1.1.2.11 +9 -4 xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLNamespaceBinder.java
Index: XMLNamespaceBinder.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLNamespaceBinder.java,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -u -r1.1.2.10 -r1.1.2.11
--- XMLNamespaceBinder.java 2001/06/26 03:31:42 1.1.2.10
+++ XMLNamespaceBinder.java 2001/07/09 11:03:13 1.1.2.11
@@ -93,7 +93,7 @@
*
* @author Andy Clark, IBM
*
- * @version $Id: XMLNamespaceBinder.java,v 1.1.2.10 2001/06/26 03:31:42 andyc Exp $
+ * @version $Id: XMLNamespaceBinder.java,v 1.1.2.11 2001/07/09 11:03:13 andyc Exp $
*/
public class XMLNamespaceBinder
implements XMLComponent, XMLDocumentHandler {
@@ -328,6 +328,8 @@
* is external, null otherwise.
* @param systemId The system identifier of the entity if the entity
* is external, null otherwise.
+ * @param baseSystemId The base system identifier of the entity if
+ * the entity is external, null otherwise.
* @param encoding The auto-detected IANA encoding name of the entity
* stream. This value will be null in those situations
* where the entity encoding is not auto-detected (e.g.
@@ -336,12 +338,15 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startEntity(String name, String publicId, String systemId,
+ public void startEntity(String name,
+ String publicId, String systemId,
+ String baseSystemId,
String encoding) throws XNIException {
if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
- fDocumentHandler.startEntity(name, publicId, systemId, encoding);
+ fDocumentHandler.startEntity(name, publicId, systemId,
+ baseSystemId, encoding);
}
- } // startEntity(String,String,String,String)
+ } // startEntity(String,String,String,String,String)
/**
* Notifies of the presence of a TextDecl line in an entity. If present,
1.1.2.46 +7 -4 xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLScanner.java
Index: XMLScanner.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLScanner.java,v
retrieving revision 1.1.2.45
retrieving revision 1.1.2.46
diff -u -r1.1.2.45 -r1.1.2.46
--- XMLScanner.java 2001/05/09 07:20:29 1.1.2.45
+++ XMLScanner.java 2001/07/09 11:03:14 1.1.2.46
@@ -96,7 +96,7 @@
* @author Arnaud Le Hors, IBM
* @author Eric Ye, IBM
*
- * @version $Id: XMLScanner.java,v 1.1.2.45 2001/05/09 07:20:29 andyc Exp $
+ * @version $Id: XMLScanner.java,v 1.1.2.46 2001/07/09 11:03:14 andyc Exp $
*/
public abstract class XMLScanner
implements XMLComponent {
@@ -167,7 +167,6 @@
/** Debug attribute normalization. */
protected static final boolean DEBUG_ATTR_NORMALIZATION = false;
-
// private data
// symbols
@@ -1113,6 +1112,8 @@
* is external, null otherwise.
* @param systemId The system identifier of the entity if the entity
* is external, null otherwise.
+ * @param baseSystemId The base system identifier of the entity if
+ * the entity is external, null otherwise.
* @param encoding The auto-detected IANA encoding name of the entity
* stream. This value will be null in those situations
* where the entity encoding is not auto-detected (e.g.
@@ -1121,7 +1122,9 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startEntity(String name, String publicId, String systemId,
+ public void startEntity(String name,
+ String publicId, String systemId,
+ String baseSystemId,
String encoding) throws XNIException {
// keep track of the entity depth
@@ -1134,7 +1137,7 @@
}
fAttributeEntityStack.pushAttrEntity(name, fAttributeOffset);
}
- } // startEntity(String,String,String,String)
+ } // startEntity(String,String,String,String,String)
/**
* This method notifies the end of an entity. The document entity has
1.1.2.72 +22 -11 xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLValidator.java
Index: XMLValidator.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLValidator.java,v
retrieving revision 1.1.2.71
retrieving revision 1.1.2.72
diff -u -r1.1.2.71 -r1.1.2.72
--- XMLValidator.java 2001/07/09 06:52:04 1.1.2.71
+++ XMLValidator.java 2001/07/09 11:03:15 1.1.2.72
@@ -124,7 +124,7 @@
* @author Andy Clark, IBM
* @author Jeffrey Rodriguez IBM
*
- * @version $Id: XMLValidator.java,v 1.1.2.71 2001/07/09 06:52:04 andyc Exp $
+ * @version $Id: XMLValidator.java,v 1.1.2.72 2001/07/09 11:03:15 andyc Exp $
*/
public class XMLValidator
implements XMLComponent,
@@ -972,6 +972,8 @@
* is external, null otherwise.
* @param systemId The system identifier of the entity if the entity
* is external, null otherwise.
+ * @param baseSystemId The base system identifier of the entity if
+ * the entity is external, null otherwise.
* @param encoding The auto-detected IANA encoding name of the entity
* stream. This value will be null in those situations
* where the entity encoding is not auto-detected (e.g.
@@ -979,14 +981,18 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startEntity(String name, String publicId, String systemId,
+ public void startEntity(String name,
+ String publicId, String systemId,
+ String baseSystemId,
String encoding) throws XNIException {
// call handlers
if (fInDTD) {
- fDTDGrammar.startEntity(name, publicId, systemId, encoding);
+ fDTDGrammar.startEntity(name, publicId, systemId,
+ baseSystemId, encoding);
if (fDTDHandler != null) {
- fDTDHandler.startEntity(name, publicId, systemId, encoding);
+ fDTDHandler.startEntity(name, publicId, systemId,
+ baseSystemId, encoding);
}
}
else {
@@ -1006,11 +1012,12 @@
}
if (fDocumentHandler != null) {
- fDocumentHandler.startEntity(name, publicId, systemId, encoding);
+ fDocumentHandler.startEntity(name, publicId, systemId,
+ baseSystemId, encoding);
}
}
- } // startEntity(String,String,String,String)
+ } // startEntity(String,String,String,String,String)
/**
* Notifies of the presence of a TextDecl line in an entity. If present,
@@ -1428,19 +1435,23 @@
* @param publicId The public identifier of the entity or null if the
* the entity was specified with SYSTEM.
* @param systemId The system identifier of the entity.
+ * @param baseSystemId The base system identifier of where the entity
+ * is declared.
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void externalEntityDecl(String name, String publicId,
- String systemId) throws XNIException {
+ public void externalEntityDecl(String name,
+ String publicId, String systemId,
+ String baseSystemId) throws XNIException {
// call handlers
- fDTDGrammar.externalEntityDecl(name, publicId, systemId);
+ fDTDGrammar.externalEntityDecl(name, publicId, systemId, baseSystemId);
if (fDTDHandler != null) {
- fDTDHandler.externalEntityDecl(name, publicId, systemId);
+ fDTDHandler.externalEntityDecl(name, publicId, systemId,
+ baseSystemId);
}
- } // externalEntityDecl(String,String,String)
+ } // externalEntityDecl(String,String,String,String)
/**
* An unparsed entity declaration.
No revision
No revision
1.1.2.5 +5 -3 xml-xerces/java/src/org/apache/xerces/impl/validation/Attic/XMLEntityDecl.java
Index: XMLEntityDecl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/validation/Attic/XMLEntityDecl.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- XMLEntityDecl.java 2000/11/07 19:06:38 1.1.2.4
+++ XMLEntityDecl.java 2001/07/09 11:03:29 1.1.2.5
@@ -59,7 +59,7 @@
/**
* @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @version $Id: XMLEntityDecl.java,v 1.1.2.4 2000/11/07 19:06:38 ericye Exp $
+ * @version $Id: XMLEntityDecl.java,v 1.1.2.5 2001/07/09 11:03:29 andyc Exp $
*/
public class XMLEntityDecl {
@@ -103,7 +103,9 @@
* @param notation
* @param isPE
*/
- public void setValues(String name, String publicId, String systemId, String baseSystemId, String notation, boolean isPE, boolean inExternal) {
+ public void setValues(String name, String publicId, String systemId,
+ String baseSystemId, String notation,
+ boolean isPE, boolean inExternal) {
this.name = name;
this.publicId = publicId;
this.systemId = systemId;
@@ -111,7 +113,7 @@
this.notation = notation;
this.isPE = isPE;
this.inExternal = inExternal;
- } // setValues
+ } // setValues(String,String,String,String,String,boolean,boolean)
/**
* clear
No revision
No revision
1.1.2.42 +13 -5 xml-xerces/java/src/org/apache/xerces/impl/validation/grammars/Attic/DTDGrammar.java
Index: DTDGrammar.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/validation/grammars/Attic/DTDGrammar.java,v
retrieving revision 1.1.2.41
retrieving revision 1.1.2.42
diff -u -r1.1.2.41 -r1.1.2.42
--- DTDGrammar.java 2001/07/09 06:52:06 1.1.2.41
+++ DTDGrammar.java 2001/07/09 11:03:32 1.1.2.42
@@ -93,7 +93,7 @@
* @author Jeffrey Rodriguez, IBM
* @author Andy Clark, IBM
*
- * @version $Id: DTDGrammar.java,v 1.1.2.41 2001/07/09 06:52:06 andyc Exp $
+ * @version $Id: DTDGrammar.java,v 1.1.2.42 2001/07/09 11:03:32 andyc Exp $
*/
public class DTDGrammar
extends Grammar
@@ -306,6 +306,8 @@
* is external, null otherwise.
* @param systemId The system identifier of the entity if the entity
* is external, null otherwise.
+ * @param baseSystemId The base system identifier of the entity if
+ * the entity is external, null otherwise.
* @param encoding The auto-detected IANA encoding name of the entity
* stream. This value will be null in those situations
* where the entity encoding is not auto-detected (e.g.
@@ -313,7 +315,9 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startEntity(String name, String publicId, String systemId,
+ public void startEntity(String name,
+ String publicId, String systemId,
+ String baseSystemId,
String encoding) throws XNIException {
if (name.startsWith("%")) {
@@ -604,17 +608,21 @@
* @param publicId The public identifier of the entity or null if the
* the entity was specified with SYSTEM.
* @param systemId The system identifier of the entity.
+ * @param baseSystemId The base system identifier of the entity if
+ * the entity is external, null otherwise.
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void externalEntityDecl(String name, String publicId,
- String systemId) throws XNIException {
+ public void externalEntityDecl(String name,
+ String publicId, String systemId,
+ String baseSystemId) throws XNIException {
XMLEntityDecl entityDecl = new XMLEntityDecl();
boolean isPE = name.startsWith("%");
boolean inExternal = fReadingExternalDTD;
- entityDecl.setValues(name,publicId,systemId, null, null, isPE, inExternal);
+ entityDecl.setValues(name, publicId, systemId, baseSystemId,
+ null, isPE, inExternal);
int entityIndex = getEntityDeclIndex(name);
if (entityIndex == -1) {
No revision
No revision
1.1.2.12 +10 -4 xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDTDHandler.java
Index: XMLDTDHandler.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDTDHandler.java,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -r1.1.2.11 -r1.1.2.12
--- XMLDTDHandler.java 2001/05/09 07:20:56 1.1.2.11
+++ XMLDTDHandler.java 2001/07/09 11:03:37 1.1.2.12
@@ -68,7 +68,7 @@
* @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
* @author Andy Clark, IBM
*
- * @version $Id: XMLDTDHandler.java,v 1.1.2.11 2001/05/09 07:20:56 andyc Exp $
+ * @version $Id: XMLDTDHandler.java,v 1.1.2.12 2001/07/09 11:03:37 andyc Exp $
*/
public interface XMLDTDHandler {
@@ -100,6 +100,8 @@
* is external, null otherwise.
* @param systemId The system identifier of the entity if the entity
* is external, null otherwise.
+ * @param baseSystemId The base system identifier of the entity if
+ * the entity is external, null otherwise.
* @param encoding The auto-detected IANA encoding name of the entity
* stream. This value will be null in those situations
* where the entity encoding is not auto-detected (e.g.
@@ -107,7 +109,9 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startEntity(String name, String publicId, String systemId,
+ public void startEntity(String name,
+ String publicId, String systemId,
+ String baseSystemId,
String encoding) throws XNIException;
/**
@@ -235,12 +239,14 @@
* @param publicId The public identifier of the entity or null if the
* the entity was specified with SYSTEM.
* @param systemId The system identifier of the entity.
+ * @param baseSystemId The base system identifier where this entity
+ * is declared.
*
* @throws XNIException Thrown by handler to signal an error.
*/
public void externalEntityDecl(String name,
- String publicId, String systemId)
- throws XNIException;
+ String publicId, String systemId,
+ String baseSystemId) throws XNIException;
/**
* An unparsed entity declaration.
1.1.2.4 +10 -3 xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDocumentFragmentHandler.java
Index: XMLDocumentFragmentHandler.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDocumentFragmentHandler.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- XMLDocumentFragmentHandler.java 2001/05/09 07:20:57 1.1.2.3
+++ XMLDocumentFragmentHandler.java 2001/07/09 11:03:39 1.1.2.4
@@ -67,7 +67,7 @@
* @see XMLDocumentHandler
*
* @author Andy Clark, IBM
- * @version $Id: XMLDocumentFragmentHandler.java,v 1.1.2.3 2001/05/09 07:20:57 andyc Exp $
+ * @version $Id: XMLDocumentFragmentHandler.java,v 1.1.2.4 2001/07/09 11:03:39 andyc Exp $
*/
public interface XMLDocumentFragmentHandler {
@@ -78,6 +78,8 @@
/**
* The start of the document fragment.
*
+ * @param baseSystemId The base system identifier for this
+ * fragment.
* @param namespaceContext The namespace context in effect at the
* start of this document fragment. This
* object only represents the current context.
@@ -88,7 +90,8 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startDocumentFragment(NamespaceContext namespaceContext)
+ public void startDocumentFragment(String baseSystemId,
+ NamespaceContext namespaceContext)
throws XNIException;
/**
@@ -102,6 +105,8 @@
* is external, null otherwise.
* @param systemId The system identifier of the entity if the entity
* is external, null otherwise.
+ * @param baseSystemId The base system identifier of the entity if
+ * the entity is external, null otherwise.
* @param encoding The auto-detected IANA encoding name of the entity
* stream. This value will be null in those situations
* where the entity encoding is not auto-detected (e.g.
@@ -110,7 +115,9 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startEntity(String name, String publicId, String systemId,
+ public void startEntity(String name,
+ String publicId, String systemId,
+ String baseSystemId,
String encoding) throws XNIException;
/**
1.1.2.11 +6 -2 xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDocumentHandler.java
Index: XMLDocumentHandler.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDocumentHandler.java,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -u -r1.1.2.10 -r1.1.2.11
--- XMLDocumentHandler.java 2001/06/15 04:08:33 1.1.2.10
+++ XMLDocumentHandler.java 2001/07/09 11:03:40 1.1.2.11
@@ -66,7 +66,7 @@
* @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
* @author Andy Clark, IBM
*
- * @version $Id: XMLDocumentHandler.java,v 1.1.2.10 2001/06/15 04:08:33 andyc Exp $
+ * @version $Id: XMLDocumentHandler.java,v 1.1.2.11 2001/07/09 11:03:40 andyc Exp $
*/
public interface XMLDocumentHandler {
@@ -192,6 +192,8 @@
* is external, null otherwise.
* @param systemId The system identifier of the entity if the entity
* is external, null otherwise.
+ * @param baseSystemId The base system identifier of the entity if
+ * the entity is external, null otherwise.
* @param encoding The auto-detected IANA encoding name of the entity
* stream. This value will be null in those situations
* where the entity encoding is not auto-detected (e.g.
@@ -200,7 +202,9 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startEntity(String name, String publicId, String systemId,
+ public void startEntity(String name,
+ String publicId, String systemId,
+ String baseSystemId,
String encoding) throws XNIException;
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org