[metacat-cvs] metacat/src/edu/ucsb/nceas/metacat MetaCatServlet.java
Saurabh Garg
sgarg at ecoinformatics.org
Tue Nov 1 14:19:35 PST 2005
sgarg 05/11/01 14:19:35
Modified: src/edu/ucsb/nceas/metacat MetaCatServlet.java
Log:
Modification in algo:
1. Find if the root element has prefix (e.g. <eml:eml>). If found, go to step
2, otheriwse go to step 3.
2. Look for xmlns:prefix element to find the ns
(e.g.:xmlns:eml="eml://ecoinformatics.org/eml-2.0.0")
2.a If not found go to step 4
3. Look for xmlns element to find the ns (e.g.:
xmlns="eml://ecoinformatics.org/eml-2.0.0")
4. If no xmlns element found, you the generic schemea.
Revision Changes Path
1.233 +5 -9 metacat/src/edu/ucsb/nceas/metacat/MetaCatServlet.java
Index: MetaCatServlet.java
===================================================================
RCS file: /cvs/metacat/src/edu/ucsb/nceas/metacat/MetaCatServlet.java,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -r1.232 -r1.233
--- MetaCatServlet.java 1 Nov 2005 22:09:28 -0000 1.232
+++ MetaCatServlet.java 1 Nov 2005 22:19:35 -0000 1.233
@@ -7,8 +7,8 @@
* Release: @release@
*
* '$Author: sgarg $'
- * '$Date: 2005/11/01 22:09:28 $'
- * '$Revision: 1.232 $'
+ * '$Date: 2005/11/01 22:19:35 $'
+ * '$Revision: 1.233 $'
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1898,14 +1898,10 @@
{
// if prefix found then look for xmlns:prefix
// element to find the ns
- String namespaceWithPrefix = NAMESPACEKEYWORD + ":" + prefix;
+ String namespaceWithPrefix = NAMESPACEKEYWORD
+ + ":" + prefix;
startIndex = targetLine.indexOf(namespaceWithPrefix);
-
- // if xmlns:prefix not found, look
- // for xmlns attribute to find the ns
- if(startIndex == -1){
- startIndex = targetLine.indexOf(NAMESPACEKEYWORD);
- }
+
} else {
// if prefix not found then look for xmlns
// attribute to find the ns
More information about the Metacat-cvs
mailing list