dims 01/02/09 07:05:57
Modified: src/org/apache/cocoon/components/language/markup/xsp Tag:
xml-cocoon2 XSPUtil.java
webapp/docs/samples/slides Tag: xml-cocoon2 view-source.xsp
Log:
1. Remove getDocument from XSPUtil as per Berin's suggestion.
2. Modify view-source.xsp to use Xerces's DOMParser directly.
Revision Changes Path
No revision
No revision
1.1.2.6 +1 -10
xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/Attic/XSPUtil.java
Index: XSPUtil.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/Attic/XSPUtil.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- XSPUtil.java 2001/02/07 19:16:49 1.1.2.5
+++ XSPUtil.java 2001/02/09 15:05:55 1.1.2.6
@@ -42,7 +42,7 @@
* The XSP <code>Utility</code> object helper
* @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a>
* @author <a href="mailto:[EMAIL PROTECTED]>Berin Loritsch</a>
- * @version $Revision: 1.1.2.5 $ $Date: 2001/02/07 19:16:49 $
+ * @version $Revision: 1.1.2.6 $ $Date: 2001/02/09 15:05:55 $
*/
public class XSPUtil {
public static String pathComponent(String filename) {
@@ -130,15 +130,6 @@
new IncludeXMLConsumer(parentContentHandler));
parser.parse(is);
}
-
- public static org.w3c.dom.Document getDocument(InputSource input, Parser
parser)
- throws SAXException, IOException {
- DOMBuilder builder = new DOMBuilder(parser);
- parser.setContentHandler(builder);
- parser.setLexicalHandler(builder);
- parser.parse(input);
- return builder.getDocument();
- }
public static String encodeMarkup(String string) {
char[] array = string.toCharArray();
No revision
No revision
1.1.2.5 +4 -2
xml-cocoon/webapp/docs/samples/slides/Attic/view-source.xsp
Index: view-source.xsp
===================================================================
RCS file:
/home/cvs/xml-cocoon/webapp/docs/samples/slides/Attic/view-source.xsp,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- view-source.xsp 2001/02/07 12:45:54 1.1.2.4
+++ view-source.xsp 2001/02/09 15:05:56 1.1.2.5
@@ -306,8 +306,10 @@
InputSource is = null;
try {
- is = new InputSource (new FileReader (filepath));
- this.colorize(XSPUtil.getDocument(is,parser), document,
this.contentHandler);
+ org.apache.xerces.parsers.DOMParser parser =
+ new org.apache.xerces.parsers.DOMParser();
+ parser.parse( filepath );
+ this.colorize(parser.getDocument(), document,
this.contentHandler);
} catch (FileNotFoundException fnfe) {
throw new SAXException (fnfe);
} catch (IOException ie) {