Hi Tim,
I don't have the time to follow this discussion that is already going
for a long period. But can you give me a short answer or description
what exactly is the problem with namespaces in XUpdate/Lexus/XIndice?!
I'll try to apply your patch asap.
Many thanks for your work.
Regards, Lars.
On Thu, 3 Jan 2002 14:00:20 -0600
"Timothy Dean" <[EMAIL PROTECTED]> wrote:
> Index: XUpdateQueryImpl.java
> ===================================================================
> RCS file:
> /home/cvs/xmldb/xupdate/src/org/xmldb/xupdate/lexus/XUpdateQueryImpl.java,v
> retrieving revision 1.2
> diff -u -r1.2 XUpdateQueryImpl.java
> --- XUpdateQueryImpl.java 2001/11/29 22:58:01 1.2
> +++ XUpdateQueryImpl.java 2002/01/03 21:49:36
> @@ -60,6 +60,7 @@
> import java.util.Enumeration;
> import java.util.Hashtable;
> import java.util.Vector;
> +import java.util.HashMap;
>
> import javax.xml.parsers.SAXParser;
> import javax.xml.parsers.SAXParserFactory;
> @@ -104,8 +105,10 @@
> protected NodeFilter _filter = null;
> /* */
> protected Node _namespace = null;
> -
> -
> +
> + protected HashMap _namespaces = null;
> +
> +
> /**
> *
> */
> @@ -129,6 +132,7 @@
> throw new SAXException( e.getMessage( ) );
> }
>
> + _namespaces = xuParser.getNamespaceMappings();
> _query = xuParser.getCachedQuery( );
> if (_query[0].size()==0) {
> throw new SAXException( "query contains no XUpdateOperation !"
> );
> Index: XUpdateQueryParser.java
> ===================================================================
> RCS file:
> /home/cvs/xmldb/xupdate/src/org/xmldb/xupdate/lexus/XUpdateQueryParser.java,v
> retrieving revision 1.2
> diff -u -r1.2 XUpdateQueryParser.java
> --- XUpdateQueryParser.java 2001/11/29 22:58:01 1.2
> +++ XUpdateQueryParser.java 2002/01/03 21:49:51
> @@ -62,6 +62,7 @@
>
> import java.util.Hashtable;
> import java.util.Vector;
> +import java.util.HashMap;
>
> /**
> * This class parses the query-String by a SAXParser. The SAXEvents are
> @@ -78,6 +79,8 @@
> protected Vector _attributes = null;
> /* The list of all characters for each element. */
> protected Vector _characters = null;
> + /* The list of mappings for namespace prefixes */
> + protected HashMap _namespaces = null;
> /* The Integer representation of each XUpdate-command. */
> protected CommandConstants _consts = null;
> /* A flag indicating whether we are within an XUpdateOperation. */
> @@ -93,6 +96,7 @@
> _commands = new Vector();
> _attributes = new Vector();
> _characters = new Vector();
> + _namespaces = new HashMap();
> }
>
>
> @@ -182,6 +186,12 @@
> *
> */
> public void startPrefixMapping( String prefix, String uri ) {
> + if ((prefix != null) && (prefix.length() > 0)) {
> + _namespaces.put(prefix, uri);
> + }
> + else {
> + _namespaces.put(null, uri);
> + }
> }
>
>
> @@ -244,6 +254,10 @@
> */
> public Vector[] getCachedQuery( ) {
> return new Vector[]{ _commands, _attributes, _characters };
> + }
> +
> + public HashMap getNamespaceMappings() {
> + return _namespaces;
> }
> }
>
--
______________________________________________________________________
Lars Martin mailto:[EMAIL PROTECTED]
SMB GmbH http://www.smb-tec.com
----------------------------------------------------------------------
Post a message: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Contact administrator: mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------