[FOray-commit] SF.net SVN: foray:[11776] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2021-01-13 00:55:30
|
Revision: 11776
http://sourceforge.net/p/foray/code/11776
Author: victormote
Date: 2021-01-13 00:55:27 +0000 (Wed, 13 Jan 2021)
Log Message:
-----------
Rename package from sax to xml in preparation for new content.
Modified Paths:
--------------
trunk/foray/foray-app/src/main/java/org/foray/demo/embed/tools/AbstractObjectReader.java
trunk/foray/foray-app/src/test/java/org/foray/app/fo/FoDocumentReader.java
trunk/foray/foray-common/src/main/java/org/foray/common/xml/DocumentInputSource.java
trunk/foray/foray-common/src/main/java/org/foray/common/xml/DocumentReader.java
trunk/foray/foray-common/src/main/java/org/foray/common/xml/package-info.java
trunk/foray/foray-core/src/main/java/org/foray/core/ForayDocument.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java
trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/PatternParser.java
trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/util/NatLangParser.java
Added Paths:
-----------
trunk/foray/foray-common/src/main/java/org/foray/common/xml/
trunk/foray/foray-common/src/main/java/org/foray/common/xml/SaxParser.java
Removed Paths:
-------------
trunk/foray/foray-common/src/main/java/org/foray/common/sax/
trunk/foray/foray-common/src/main/java/org/foray/common/xml/SaxParser.java
Modified: trunk/foray/foray-app/src/main/java/org/foray/demo/embed/tools/AbstractObjectReader.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/demo/embed/tools/AbstractObjectReader.java 2021-01-13 00:52:52 UTC (rev 11775)
+++ trunk/foray/foray-app/src/main/java/org/foray/demo/embed/tools/AbstractObjectReader.java 2021-01-13 00:55:27 UTC (rev 11776)
@@ -28,7 +28,7 @@
package org.foray.demo.embed.tools;
-import org.foray.common.sax.DocumentReader;
+import org.foray.common.xml.DocumentReader;
import org.xml.sax.ContentHandler;
import org.xml.sax.DTDHandler;
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/fo/FoDocumentReader.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/fo/FoDocumentReader.java 2021-01-13 00:52:52 UTC (rev 11775)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/fo/FoDocumentReader.java 2021-01-13 00:55:27 UTC (rev 11776)
@@ -30,8 +30,8 @@
import org.foray.app.ForaySpecific;
import org.foray.common.Environment;
-import org.foray.common.sax.SaxParser;
import org.foray.common.url.UrlFactory;
+import org.foray.common.xml.SaxParser;
import org.foray.core.ForayException;
import org.foray.core.SessionConfig;
import org.foray.fotree.FoTreeBuilder;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/xml/DocumentInputSource.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sax/DocumentInputSource.java 2020-12-23 04:00:21 UTC (rev 11655)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/xml/DocumentInputSource.java 2021-01-13 00:55:27 UTC (rev 11776)
@@ -26,7 +26,7 @@
* $LastChangedBy$
*/
-package org.foray.common.sax;
+package org.foray.common.xml;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/xml/DocumentReader.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sax/DocumentReader.java 2020-12-23 04:00:21 UTC (rev 11655)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/xml/DocumentReader.java 2021-01-13 00:55:27 UTC (rev 11776)
@@ -26,7 +26,7 @@
* $LastChangedBy$
*/
-package org.foray.common.sax;
+package org.foray.common.xml;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
Deleted: trunk/foray/foray-common/src/main/java/org/foray/common/xml/SaxParser.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sax/SaxParser.java 2020-12-23 04:00:21 UTC (rev 11655)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/xml/SaxParser.java 2021-01-13 00:55:27 UTC (rev 11776)
@@ -1,83 +0,0 @@
-/*
- * Copyright 2005 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy: victormote $
- */
-
-package org.foray.common.sax;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-
-/**
- * Utility class that provides information about an XML Parser.
- */
-public final class SaxParser {
-
- /**
- * Private constructor (should not be instantiated).
- */
- private SaxParser() {
- }
-
- /**
- * Returns the name of the SAX Parser class that is found in the classpath.
- * @return The name of the SAX Parser class that is found in the classpath.
- */
- public static String getParserClassName() {
- try {
- return SAXParserFactory.newInstance().newSAXParser()
- .getXMLReader().getClass().getName();
- } catch (final ParserConfigurationException e) {
- return null;
- } catch (final SAXException e) {
- return null;
- }
- }
-
- /**
- * Creates a SAX2 parser with a standard configuration. Specifically,
- * the parser is namespace-aware and has the "namespace-prefixes" feature
- * set to true.
- * @return The newly-created SAX2 parser.
- * @throws SAXException For errors creating the parser.
- * @throws ParserConfigurationException For errors configuring the parser.
- */
- public static XMLReader createSax2Parser() throws SAXException,
- ParserConfigurationException {
- final SAXParserFactory spf =
- javax.xml.parsers.SAXParserFactory.newInstance();
- spf.setNamespaceAware(true);
- XMLReader xmlReader = null;
- xmlReader = spf.newSAXParser().getXMLReader();
- xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes",
- true);
- return xmlReader;
- }
-
-}
Copied: trunk/foray/foray-common/src/main/java/org/foray/common/xml/SaxParser.java (from rev 11767, trunk/foray/foray-common/src/main/java/org/foray/common/sax/SaxParser.java)
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/xml/SaxParser.java (rev 0)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/xml/SaxParser.java 2021-01-13 00:55:27 UTC (rev 11776)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2005 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.common.xml;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+
+/**
+ * Utility class that provides information about an XML Parser.
+ */
+public final class SaxParser {
+
+ /**
+ * Private constructor (should not be instantiated).
+ */
+ private SaxParser() {
+ }
+
+ /**
+ * Returns the name of the SAX Parser class that is found in the classpath.
+ * @return The name of the SAX Parser class that is found in the classpath.
+ */
+ public static String getParserClassName() {
+ try {
+ return SAXParserFactory.newInstance().newSAXParser()
+ .getXMLReader().getClass().getName();
+ } catch (final ParserConfigurationException e) {
+ return null;
+ } catch (final SAXException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Creates a SAX2 parser with a standard configuration. Specifically,
+ * the parser is namespace-aware and has the "namespace-prefixes" feature
+ * set to true.
+ * @return The newly-created SAX2 parser.
+ * @throws SAXException For errors creating the parser.
+ * @throws ParserConfigurationException For errors configuring the parser.
+ */
+ public static XMLReader createSax2Parser() throws SAXException, ParserConfigurationException {
+ final SAXParserFactory spf = javax.xml.parsers.SAXParserFactory.newInstance();
+ spf.setNamespaceAware(true);
+ XMLReader xmlReader = null;
+ xmlReader = spf.newSAXParser().getXMLReader();
+ xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
+ return xmlReader;
+ }
+
+}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/xml/package-info.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sax/package-info.java 2020-12-23 04:00:21 UTC (rev 11655)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/xml/package-info.java 2021-01-13 00:55:27 UTC (rev 11776)
@@ -30,4 +30,4 @@
* <p>Classes useful with SAX.</p>
*/
-package org.foray.common.sax;
+package org.foray.common.xml;
Modified: trunk/foray/foray-core/src/main/java/org/foray/core/ForayDocument.java
===================================================================
--- trunk/foray/foray-core/src/main/java/org/foray/core/ForayDocument.java 2021-01-13 00:52:52 UTC (rev 11775)
+++ trunk/foray/foray-core/src/main/java/org/foray/core/ForayDocument.java 2021-01-13 00:55:27 UTC (rev 11776)
@@ -28,9 +28,9 @@
package org.foray.core;
-import org.foray.common.sax.DocumentInputSource;
-import org.foray.common.sax.DocumentReader;
-import org.foray.common.sax.SaxParser;
+import org.foray.common.xml.DocumentInputSource;
+import org.foray.common.xml.DocumentReader;
+import org.foray.common.xml.SaxParser;
import org.axsl.area.AreaTreeFactory;
import org.axsl.font.FontConsumer;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java 2021-01-13 00:52:52 UTC (rev 11775)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java 2021-01-13 00:55:27 UTC (rev 11776)
@@ -30,8 +30,8 @@
import org.foray.common.MathMlUtil;
import org.foray.common.SvgUtil;
-import org.foray.common.sax.SaxParser;
import org.foray.common.url.UrlUtil;
+import org.foray.common.xml.SaxParser;
import org.foray.graphic.factory.BmpFactory;
import org.foray.graphic.factory.EpsFactory;
import org.foray.graphic.factory.GifFactory;
Modified: trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/PatternParser.java
===================================================================
--- trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/PatternParser.java 2021-01-13 00:52:52 UTC (rev 11775)
+++ trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/PatternParser.java 2021-01-13 00:55:27 UTC (rev 11776)
@@ -34,7 +34,7 @@
package org.foray.hyphen;
import org.foray.common.ForayConstants;
-import org.foray.common.sax.SaxParser;
+import org.foray.common.xml.SaxParser;
import org.axsl.hyphen.HyphenationException;
Modified: trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/util/NatLangParser.java
===================================================================
--- trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/util/NatLangParser.java 2021-01-13 00:52:52 UTC (rev 11775)
+++ trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/util/NatLangParser.java 2021-01-13 00:55:27 UTC (rev 11776)
@@ -36,7 +36,7 @@
import org.foray.common.AxslDtdUtil;
import org.foray.common.ForayConstants;
import org.foray.common.primitive.UnicodeCharUtils;
-import org.foray.common.sax.SaxParser;
+import org.foray.common.xml.SaxParser;
import org.axsl.hyphen.HyphenationException;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|