From: <wol...@us...> - 2006-09-30 21:33:06
|
Revision: 4457 http://svn.sourceforge.net/exist/?rev=4457&view=rev Author: wolfgang_m Date: 2006-09-30 14:32:59 -0700 (Sat, 30 Sep 2006) Log Message: ----------- Casting from xs:QName to xs:QName should be possible. Modified Paths: -------------- branches/DLN/eXist-1.0/src/org/exist/xquery/CastExpression.java Modified: branches/DLN/eXist-1.0/src/org/exist/xquery/CastExpression.java =================================================================== --- branches/DLN/eXist-1.0/src/org/exist/xquery/CastExpression.java 2006-09-30 21:01:53 UTC (rev 4456) +++ branches/DLN/eXist-1.0/src/org/exist/xquery/CastExpression.java 2006-09-30 21:32:59 UTC (rev 4457) @@ -95,7 +95,9 @@ try { // casting to QName needs special treatment if(requiredType == Type.QNAME) { - if(item.getType() == Type.ATOMIC || Type.subTypeOf(item.getType(), Type.STRING)) { + if (item.getType() == Type.QNAME) + result = item.toSequence(); + else if(item.getType() == Type.ATOMIC || Type.subTypeOf(item.getType(), Type.STRING)) { result = new QNameValue(context, item.getStringValue()); } else { throw new XPathException(getASTNode(), "Cannot cast " + Type.getTypeName(item.getType()) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |