|
From: <di...@us...> - 2011-01-30 10:57:12
|
Revision: 13697
http://exist.svn.sourceforge.net/exist/?rev=13697&view=rev
Author: dizzzz
Date: 2011-01-30 10:57:06 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
[ignore] an attempt to get fix the namespace issue. an AST issue remains..... LJO, please help?
Modified Paths:
--------------
branches/adam/eXist-xq3/src/org/exist/xquery/functions/FunError.java
branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java
Modified: branches/adam/eXist-xq3/src/org/exist/xquery/functions/FunError.java
===================================================================
--- branches/adam/eXist-xq3/src/org/exist/xquery/functions/FunError.java 2011-01-30 06:58:16 UTC (rev 13696)
+++ branches/adam/eXist-xq3/src/org/exist/xquery/functions/FunError.java 2011-01-30 10:57:06 UTC (rev 13697)
@@ -111,6 +111,14 @@
// and construct error code
if (!args[0].isEmpty()) {
QName errorQName = ((QNameValue) args[0].itemAt(0)).getQName();
+
+// String prefix = errorQName.getPrefix();
+// if(prefix==null){
+// String ns = errorQName.getNamespaceURI();
+// prefix = getContext().getInScopePrefix(ns);
+// errorQName.setPrefix(prefix);
+// }
+
errorCode = new ErrorCode(errorQName, errorDesc);
}
Modified: branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java
===================================================================
--- branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java 2011-01-30 06:58:16 UTC (rev 13696)
+++ branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java 2011-01-30 10:57:06 UTC (rev 13697)
@@ -312,11 +312,11 @@
String query =
"declare namespace foo='http://foo.com'; "
- + "<A>try { "
- + " fn:error(fn:QName('http://foo.com', 'ValueToBig'), 'Value too big')"
- + "}"
- + "catch foo:ValueToBig { good }"
- + "catch * { wrong }</A>";
+ + "try { "
+ + " fn:error(fn:QName('http://foo.com', 'ERRORNAME'), 'ERRORTEXT')"
+ + "} "
+ + "catch foo:ERRORNAME { good } "
+ + "catch * { wrong } ";
try {
ResourceSet results = executeQuery(query);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|