svn commit: r995202 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r995202 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java

doogie-3
Author: doogie
Date: Wed Sep  8 19:03:18 2010
New Revision: 995202

URL: http://svn.apache.org/viewvc?rev=995202&view=rev
Log:
Add systemId to xml node location tracking; this is based on the
docDescription passed in, which in normal cases is the URL.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java?rev=995202&r1=995201&r2=995202&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java Wed Sep  8 19:03:18 2010
@@ -472,6 +472,7 @@ public class UtilXml {
                 if (node.getUserData("startLine") != null) {
                     return;
                 }
+                node.setUserData("systemId",locator.getLiteralSystemId(), null);
                 node.setUserData("startLine",locator.getLineNumber(), null);
                 node.setUserData("startColumn",locator.getColumnNumber(), null);
             }
@@ -561,7 +562,9 @@ public class UtilXml {
             parser.setEntityResolver(lr);
             parser.setErrorHandler(eh);
         }
-        parser.parse(new InputSource(is));
+        InputSource inputSource = new InputSource(is);
+        inputSource.setSystemId(docDescription);
+        parser.parse(inputSource);
         document = parser.getDocument();
 
         double totalSeconds = (System.currentTimeMillis() - startTime)/1000.0;