fixed bug 362: preprocessor not preserving line numbers
[org.ibex.core.git] / src / org / ibex / util / XML.java
index db55a66..d3ed118 100644 (file)
@@ -787,7 +787,19 @@ public abstract class XML
         /** Prefix of current element. Substring of qName. XML Namespace Spec 14-Jan-1999 [7] */
         public String getPrefix() { return prefix; }
 
-        public Hash getUriMap() { return urimap; } // HACK
+        // HACK
+        public Hash getUriMap() {
+            Hash map = new Hash();
+            for (Element e = this; e != null; e = e.getParent()) {
+                java.util.Enumeration en = e.urimap.keys();
+                while(en.hasMoreElements()) {
+                    String key = (String)en.nextElement();
+                    String val = getUri(key);
+                    map.put(key, val);
+                }
+            }
+            return map;
+        }
 
         /** URI of current tag. XML Namespace Spec 14-Jan-1999 section 1 */
         public String getUri() { return getUri(prefix); }