You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ce...@apache.org on 2005/01/15 02:37:43 UTC

svn commit: r125243 - in xmlbeans/trunk: src/common/org/apache/xmlbeans/impl/common test/cases/xbean/xmlcursor test/cases/xbean/xmlcursor/xquery

Author: cezar
Date: Fri Jan 14 17:37:42 2005
New Revision: 125243

URL: http://svn.apache.org/viewcvs?view=rev&rev=125243
Log:
Contributed by Yana. Adding xquery tests. Adjusting behavior of XPath parsing for backward compatibility
Added:
   xmlbeans/trunk/test/cases/xbean/xmlcursor/XQueryInput.xml
   xmlbeans/trunk/test/cases/xbean/xmlcursor/XQueryInput.xsd
   xmlbeans/trunk/test/cases/xbean/xmlcursor/xquery/
   xmlbeans/trunk/test/cases/xbean/xmlcursor/xquery/2DocJoin.xq
   xmlbeans/trunk/test/cases/xbean/xmlcursor/xquery/Constructor.xq
   xmlbeans/trunk/test/cases/xbean/xmlcursor/xquery/Join.xq
Modified:
   xmlbeans/trunk/src/common/org/apache/xmlbeans/impl/common/XPath.java

Modified: xmlbeans/trunk/src/common/org/apache/xmlbeans/impl/common/XPath.java
Url: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/common/org/apache/xmlbeans/impl/common/XPath.java?view=diff&rev=125243&p1=xmlbeans/trunk/src/common/org/apache/xmlbeans/impl/common/XPath.java&r1=125242&p2=xmlbeans/trunk/src/common/org/apache/xmlbeans/impl/common/XPath.java&r2=125243
==============================================================================
--- xmlbeans/trunk/src/common/org/apache/xmlbeans/impl/common/XPath.java	(original)
+++ xmlbeans/trunk/src/common/org/apache/xmlbeans/impl/common/XPath.java	Fri Jan 14 17:37:42 2005
@@ -923,9 +923,15 @@
                     }
                     _externalNamespaces.put( prefix, uri );
 
-                    if (! tokenize( ";" ))
-                       throw newError(
+                    if (! tokenize( ";" )){
+			//TODO: uncomment
+                       ;
+			/*
+			throw newError(
                             "Namespace declaration must end with ;" ); 
+			*/
+
+			}
                     _externalNamespaces.put(_NS_BOUNDARY,new Integer(_offset));
 
                     continue;

Added: xmlbeans/trunk/test/cases/xbean/xmlcursor/XQueryInput.xml
Url: http://svn.apache.org/viewcvs/xmlbeans/trunk/test/cases/xbean/xmlcursor/XQueryInput.xml?view=auto&rev=125243
==============================================================================
--- (empty file)
+++ xmlbeans/trunk/test/cases/xbean/xmlcursor/XQueryInput.xml	Fri Jan 14 17:37:42 2005
@@ -0,0 +1,15 @@
+<company name="Apache">
+	<employee>
+		<name>Bob</name>
+		<ssn>1000</ssn>
+	</employee>
+	<employee>
+		<name>Beth</name>
+		<ssn>1001</ssn>
+	</employee>
+	<employee>
+		<name>NotBob</name>
+		<ssn>1000</ssn>
+	</employee>
+</company>
+

Added: xmlbeans/trunk/test/cases/xbean/xmlcursor/XQueryInput.xsd
Url: http://svn.apache.org/viewcvs/xmlbeans/trunk/test/cases/xbean/xmlcursor/XQueryInput.xsd?view=auto&rev=125243
==============================================================================
--- (empty file)
+++ xmlbeans/trunk/test/cases/xbean/xmlcursor/XQueryInput.xsd	Fri Jan 14 17:37:42 2005
@@ -0,0 +1,19 @@
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+   xmlns="http://xbean.test/xmlcursor/XQueryInput"
+   targetNamespace="http://xbean.test/xmlcursor/XQueryInput"
+>
+	<xsd:element name="company">
+		<xsd:complexType>
+		   <xsd:sequence>
+			<xsd:element name="employee" type="EmpT"/>
+		 </xsd:sequence>
+	</xsd:complexType>	
+	</xsd:element>
+
+	<xsd:complexType name="EmpT">
+		 <xsd:sequence>
+			<xsd:element name="name" type="xsd:string"/>
+			<xsd:element name="ssn" type="xsd:positiveInteger"/>
+		 </xsd:sequence>
+	</xsd:complexType>	
+</xsd:schema>
\ No newline at end of file

Added: xmlbeans/trunk/test/cases/xbean/xmlcursor/xquery/2DocJoin.xq
Url: http://svn.apache.org/viewcvs/xmlbeans/trunk/test/cases/xbean/xmlcursor/xquery/2DocJoin.xq?view=auto&rev=125243
==============================================================================

Added: xmlbeans/trunk/test/cases/xbean/xmlcursor/xquery/Constructor.xq
Url: http://svn.apache.org/viewcvs/xmlbeans/trunk/test/cases/xbean/xmlcursor/xquery/Constructor.xq?view=auto&rev=125243
==============================================================================
--- (empty file)
+++ xmlbeans/trunk/test/cases/xbean/xmlcursor/xquery/Constructor.xq	Fri Jan 14 17:37:42 2005
@@ -0,0 +1,6 @@
+for $e in $this//employee
+return 
+		<person>
+			{ $e/name }
+		</person>
+	
\ No newline at end of file

Added: xmlbeans/trunk/test/cases/xbean/xmlcursor/xquery/Join.xq
Url: http://svn.apache.org/viewcvs/xmlbeans/trunk/test/cases/xbean/xmlcursor/xquery/Join.xq?view=auto&rev=125243
==============================================================================
--- (empty file)
+++ xmlbeans/trunk/test/cases/xbean/xmlcursor/xquery/Join.xq	Fri Jan 14 17:37:42 2005
@@ -0,0 +1,10 @@
+for $a in $this//employee
+return <result>
+		{ $a/ssn },
+		{ $a/name },
+		{
+		for $b in $this//employee 
+		where $b/ssn=$a/ssn and $a/name !=$b/name
+		return $b/name
+		}
+	</result>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org