bradford 01/12/18 09:37:09
Modified: docs TODO
java/src/org/apache/xindice/xml/dom DOMParser.java
Log:
Namespace fixes and slightly updated TODO
Revision Changes Path
1.2 +8 -26 xml-xindice/docs/TODO
Index: TODO
===================================================================
RCS file: /home/cvs/xml-xindice/docs/TODO,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TODO 2001/12/06 19:33:46 1.1
+++ TODO 2001/12/18 17:37:09 1.2
@@ -6,14 +6,7 @@
Compressed DOM
--------------
-The compressed DOM still needs quite a bit of work.
- Client support
- --------------
- We need to enable the Client API and CORBA clients to receive
- compressed DOM documents, and then use a downloaded symbol table
- to decompress those documents.
-
Huge document support
---------------------
We need to create a virtualized byte array class to drive the
@@ -23,12 +16,6 @@
traversed, then most of it is hanging around in memory for no
reason.
- Advanced auto-linking
- ---------------------
- Basic auto-linking works right now, but there are some tree-walker
- related issues with it and it doesn't support things like
- controlled re-evaluation.
-
Basic Document-level transactions
---------------------------------
We need to provide the ability to lock a node (and recursively
@@ -37,19 +24,8 @@
exclusive locking.
-The Application Server
-----------------------
-The foundations for the Application Server layer exist, but need to
-be built up substantially.
-
- Sessions
- --------
- A Session system based on Thread-local associations needs to be
- developed. Sessions will be represented as XML Serializable
- objects and will be capable of Collection-based storage. Because
- the Filer that a Collection uses is virtualized, sessions will be
- capable of being transient and in-memory, persisted on disk, or
- replicated across a set of servers in a transparent fashion.
+The Database Server
+-------------------
Scheduling
----------
@@ -69,6 +45,12 @@
-----------------------------------
A system needs to be designed that allows transactions across
a set of resources to be performed.
+
+ XQuery support
+ --------------
+ The Xindice projects needs to work with the Xalan project in
+ order to produce a common Apache Foundation XQuery
+ implementation.
Documentation
1.4 +10 -30
xml-xindice/java/src/org/apache/xindice/xml/dom/DOMParser.java
Index: DOMParser.java
===================================================================
RCS file:
/home/cvs/xml-xindice/java/src/org/apache/xindice/xml/dom/DOMParser.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DOMParser.java 2001/12/13 19:42:01 1.3
+++ DOMParser.java 2001/12/18 17:37:09 1.4
@@ -56,7 +56,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
- * $Id: DOMParser.java,v 1.3 2001/12/13 19:42:01 bradford Exp $
+ * $Id: DOMParser.java,v 1.4 2001/12/18 17:37:09 bradford Exp $
*/
import java.io.*;
@@ -84,7 +84,6 @@
private Document doc;
private Node context;
- private Map nsMap = new HashMap();
private int state = -1;
private StringBuffer buf;
private ObjectStack states = new ObjectStack();
@@ -293,10 +292,6 @@
}
public void startPrefixMapping(String prefix, String uri) throws
SAXException {
- if ( prefix == null || prefix.length() == 0 )
- nsMap.put("", uri);
- else
- nsMap.put(prefix, uri);
}
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
@@ -307,32 +302,17 @@
e = doc.createElement(localName);
for ( int i = 0; i < attributes.getLength(); i++ ) {
- String attrURI = attributes.getURI(i);
-
- // TODO: this is a work-around for a broken Xerces 2
- String aqName = attributes.getQName(i);
- boolean isNamespace = aqName != null &&
(aqName.startsWith("xmlns:") || aqName.equals("xmlns"));
+ String attrURI = attributes.getURI(i);;
+ String attrQName = attributes.getQName(i);
+ String attrValue = attributes.getValue(i);
+
+ boolean isNsDef = attrQName != null && attrQName.startsWith("xmlns")
+ && (attrQName.length() == 5 || attrQName.charAt(5)
== ':');
- if ( isNamespace || (attrURI != null && uri.length() > 0) )
- e.setAttributeNS(attrURI, aqName, attributes.getValue(i));
+ if ( isNsDef || ( attrURI != null && attrURI.length() > 0 ) )
+ e.setAttributeNS(attrURI, attrQName, attrValue);
else
- e.setAttribute(attributes.getLocalName(i),
attributes.getValue(i));
- }
-
- // TODO: This code won't be necessary if prefixes are being reported
- // correctly as attributes
- if ( nsMap.size() > 0 ) {
- Iterator i = nsMap.entrySet().iterator();
- while ( i.hasNext() ) {
- Map.Entry entry = (Map.Entry)i.next();
- String prefix = (String)entry.getKey();
- String nsUri = (String)entry.getValue();
- if ( prefix.length() == 0 )
- e.setAttribute("xmlns", uri);
- else
- e.setAttribute("xmlns:"+prefix, uri);
- }
- nsMap.clear();
+ e.setAttribute(attributes.getLocalName(i), attrValue);
}
context.appendChild(e);