You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2010/09/08 21:03:18 UTC

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

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;