dleslie 00/03/17 09:24:51
Modified: samples/PureSAX Tag: Bxalan_1_0_0 PureSAX.java
Log:
Moved setting of lexical handler to after parsing the stylesheet
and just before parsing the xml.
Revision Changes Path
No revision
No revision
1.3.2.3 +3 -4 xml-xalan/samples/PureSAX/PureSAX.java
Index: PureSAX.java
===================================================================
RCS file: /home/cvs/xml-xalan/samples/PureSAX/PureSAX.java,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -u -r1.3.2.2 -r1.3.2.3
--- PureSAX.java 2000/03/17 16:13:27 1.3.2.2
+++ PureSAX.java 2000/03/17 17:24:51 1.3.2.3
@@ -86,10 +86,6 @@
// Instantiate a Xerces SAX parser.
SAXParser saxparser = new SAXParser();
- // Set the SAX Parser lexical handler to the XSLTProcessor, so the SAX
parser
- // can handle lexical events such as comment nodes.
- saxparser.setProperty("http://xml.org/sax/properties/lexical-handler",
processor);
-
// Create an empty StylesheetRoot. The createStylesheetRoot(String
baseURI) method is not
// part of the XSLTProcessor interface, so must use the underlying
XSLTEngineImpl object.
// The baseURI is for resolving relative URIs. If null is sent, defaults
to the current
@@ -117,6 +113,9 @@
// Set the processor to act as a DocumentHandler, receiving SAX events
from the
// SAX parser.
saxparser.setDocumentHandler(processor);
+ // Set the SAX Parser lexical handler to the XSLTProcessor, so the SAX
parser
+ // can handle lexical events in the XML source, such as the occurrence
of comment nodes.
+ saxparser.setProperty("http://xml.org/sax/properties/lexical-handler",
processor);
// Set the processor to output the result to the screen.
processor.setOutputStream(System.out);
// Parse foo.xml, sending SAX events to the processor, which sends output