You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ra...@apache.org on 2005/10/11 18:47:35 UTC
svn commit: r312915 - in /xmlbeans/trunk: ./
src/xmlpublic/javax/xml/namespace/ test/src/ValidatingXSRTests/checkin/
test/src/misc/checkin/ test/src/xmlcursor/jsr173/checkin/
Author: radup
Date: Tue Oct 11 09:47:21 2005
New Revision: 312915
URL: http://svn.apache.org/viewcvs?rev=312915&view=rev
Log:
Updated the build to download a new version of the JSR-173 jar licensed under Apache.
Contributed by Lawrence Jones
Added:
xmlbeans/trunk/src/xmlpublic/javax/xml/namespace/NamespaceContext.java
Removed:
xmlbeans/trunk/test/src/xmlcursor/jsr173/checkin/SaveLoadTests.java
Modified:
xmlbeans/trunk/NOTICE.txt
xmlbeans/trunk/build.xml
xmlbeans/trunk/test/src/ValidatingXSRTests/checkin/ValidatingXMLStreamReaderTests.java
xmlbeans/trunk/test/src/misc/checkin/RichParserTests.java
xmlbeans/trunk/testbuild.xml
Modified: xmlbeans/trunk/NOTICE.txt
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/NOTICE.txt?rev=312915&r1=312914&r2=312915&view=diff
==============================================================================
--- xmlbeans/trunk/NOTICE.txt (original)
+++ xmlbeans/trunk/NOTICE.txt Tue Oct 11 09:47:21 2005
@@ -24,3 +24,6 @@
- Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
+
+ - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
+ Copyright 2005 BEA under the terms of the Apache Software License 2.0
Modified: xmlbeans/trunk/build.xml
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/build.xml?rev=312915&r1=312914&r2=312915&view=diff
==============================================================================
--- xmlbeans/trunk/build.xml (original)
+++ xmlbeans/trunk/build.xml Tue Oct 11 09:47:21 2005
@@ -54,17 +54,18 @@
<delete>
<fileset dir="external/lib">
<include name="saxonb8-2.zip"/>
- <include name="jsr173_1.0_api-mini-bundle.jar"/>
+ <include name="jsr173_1.0_api_bundle.jar"/>
<include name="jsr173_1.0_api.jar"/>
- <include name="jsr173_1.0_ri.jar"/>
- <include name="BEA Binary RI License (JSR 173).1(Clean).txt"/>
- <include name="README(jsr_173 api and ri).txt"/>
<include name="saxon8.jar"/>
<include name="xcresolver.zip"/>
- <!-- the 3 entries below are to delete the previous versions of the jsr173 jars -->
+ <!-- the entries below are to delete the previous versions of the jsr173 jars -->
<include name="jsr173.jar"/>
<include name="jsr173_api.jar"/>
<include name="jsr173_ri.jar"/>
+ <include name="jsr173_1.0_api-mini-bundle.jar"/>
+ <include name="jsr173_1.0_ri.jar"/>
+ <include name="BEA Binary RI License (JSR 173).1(Clean).txt"/>
+ <include name="README(jsr_173 api and ri).txt"/>
</fileset>
</delete>
</target>
@@ -110,39 +111,37 @@
<copy file="external/lib/saxon8.jar" tofile="build/lib/saxon8.jar"/>
</target>
- <target name="jsr173-mini-bundle.downloaded">
- <condition property="jsr173-mini-bundle.exists">
- <available file="external/lib/jsr173_1.0_api-mini-bundle.jar"/>
+ <target name="jsr173-bundle.downloaded">
+ <condition property="jsr173-bundle.exists">
+ <available file="external/lib/jsr173_1.0_api_bundle.jar"/>
</condition>
</target>
- <target name="jsr173-mini-bundle.jar"
- depends="jsr173-mini-bundle.downloaded, dirs"
- unless="jsr173-mini-bundle.exists">
- <get dest="external/lib/jsr173_1.0_api-mini-bundle.jar"
- src="http://workshop.bea.com/xmlbeans/jsr173v1/jsr173_1.0_api-mini-bundle.jar"
+ <target name="jsr173-bundle.jar"
+ depends="jsr173-bundle.downloaded, dirs"
+ unless="jsr173-bundle.exists">
+ <get dest="external/lib/jsr173_1.0_api_bundle.jar"
+ src="http://workshop.bea.com/xmlbeans/jsr173v1/jsr173_1.0_api_bundle.jar"
verbose="true" usetimestamp="true" ignoreerrors="true"/>
</target>
<target name="jsr173_1.0.jars.extracted">
<condition property="jsr173_1.0.jars.exist">
- <and>
- <available file="build/lib/jsr173_1.0_api.jar"/>
- <available file="build/lib/jsr173_1.0_ri.jar"/>
- </and>
+ <available file="build/lib/jsr173_1.0_api.jar"/>
</condition>
</target>
<target name="jsr173_1.0.jars"
- depends="jsr173-mini-bundle.jar, jsr173_1.0.jars.extracted"
+ depends="jsr173-bundle.jar, jsr173_1.0.jars.extracted"
unless="jsr173_1.0.jars.exist">
- <unjar src="external/lib/jsr173_1.0_api-mini-bundle.jar" dest="external/lib" />
+ <unjar src="external/lib/jsr173_1.0_api_bundle.jar" dest="external/lib" >
+ <patternset>
+ <include name="jsr173_1.0_api.jar"/>
+ </patternset>
+ </unjar>
- <!-- copy jsr173 API and RI jars and license files to build/lib -->
+ <!-- copy jsr173 API jar and license files to build/lib -->
<copy file="external/lib/jsr173_1.0_api.jar" tofile="build/lib/jsr173_1.0_api.jar"/>
- <copy file="external/lib/jsr173_1.0_ri.jar" tofile="build/lib/jsr173_1.0_ri.jar"/>
- <copy file="external/lib/BEA Binary RI License (JSR 173).1(Clean).txt" tofile="build/lib/BEA Binary RI License (JSR 173).1(Clean).txt"/>
- <copy file="external/lib/README(jsr_173 api and ri).txt" tofile="build/lib/README(jsr_173 api and ri).txt"/>
</target>
<!-- get resolver.jar -->
Added: xmlbeans/trunk/src/xmlpublic/javax/xml/namespace/NamespaceContext.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/xmlpublic/javax/xml/namespace/NamespaceContext.java?rev=312915&view=auto
==============================================================================
--- xmlbeans/trunk/src/xmlpublic/javax/xml/namespace/NamespaceContext.java (added)
+++ xmlbeans/trunk/src/xmlpublic/javax/xml/namespace/NamespaceContext.java Tue Oct 11 09:47:21 2005
@@ -0,0 +1,25 @@
+/* Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.xml.namespace;
+
+import java.util.Iterator;
+
+public interface NamespaceContext {
+
+ public String getNamespaceURI(String prefix);
+ public String getPrefix(String namespaceURI);
+ public Iterator getPrefixes(String namespaceURI);
+}
Modified: xmlbeans/trunk/test/src/ValidatingXSRTests/checkin/ValidatingXMLStreamReaderTests.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/test/src/ValidatingXSRTests/checkin/ValidatingXMLStreamReaderTests.java?rev=312915&r1=312914&r2=312915&view=diff
==============================================================================
--- xmlbeans/trunk/test/src/ValidatingXSRTests/checkin/ValidatingXMLStreamReaderTests.java (original)
+++ xmlbeans/trunk/test/src/ValidatingXSRTests/checkin/ValidatingXMLStreamReaderTests.java Tue Oct 11 09:47:21 2005
@@ -29,6 +29,7 @@
import java.io.FileNotFoundException;
import java.io.FileInputStream;
import java.io.File;
+import java.io.IOException;
import java.io.StringReader;
import java.util.Collection;
import java.util.ArrayList;
@@ -41,6 +42,7 @@
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlOptions;
+import org.apache.xmlbeans.XmlException;
import org.openuri.testNumerals.DocDocument;
@@ -75,13 +77,18 @@
}
}
- private static void validate(ValidatingXMLStreamReader valXsr, File file) throws XMLStreamException, FileNotFoundException
+ private static void validate(ValidatingXMLStreamReader valXsr, File file) throws XMLStreamException, IOException
{
Collection errors = new ArrayList();
- XMLStreamReader xsr = XMLInputFactory.newInstance().
- createXMLStreamReader(new FileInputStream(file));
+ XMLStreamReader xsr = null;
+ try {
+ xsr = XmlObject.Factory.
+ parse(new FileInputStream(file)).newXMLStreamReader();
+ } catch (XmlException e) {
+ throw new XMLStreamException(e);
+ }
- valXsr.init(xsr, false, null /* validate an entire document */ ,
+ valXsr.init(xsr, true, null /* validate an entire document */ ,
XmlBeans.typeLoaderForClassLoader(ValidatingXMLStreamReader.class.getClassLoader()),
null,
errors);
@@ -508,7 +515,12 @@
{
String doc = "<doc xmlns='" + URI_NUMERALS + "'><int>5</int><float>7.654321</float></doc>";
- XMLStreamReader xsr = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(doc));
+ XMLStreamReader xsr = null;
+ try {
+ xsr = XmlObject.Factory.parse(doc).newXMLStreamReader();
+ } catch (XmlException e) {
+ throw new XMLStreamException(e);
+ }
xsr.nextTag();
Collection errors = new ArrayList();
Modified: xmlbeans/trunk/test/src/misc/checkin/RichParserTests.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/test/src/misc/checkin/RichParserTests.java?rev=312915&r1=312914&r2=312915&view=diff
==============================================================================
--- xmlbeans/trunk/test/src/misc/checkin/RichParserTests.java (original)
+++ xmlbeans/trunk/test/src/misc/checkin/RichParserTests.java Tue Oct 11 09:47:21 2005
@@ -24,6 +24,8 @@
import org.apache.xmlbeans.GDuration;
import org.apache.xmlbeans.GDurationBuilder;
import org.apache.xmlbeans.XmlCalendar;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.impl.richParser.XMLStreamReaderExt;
import org.apache.xmlbeans.impl.richParser.XMLStreamReaderExtImpl;
@@ -57,9 +59,9 @@
public void testPrimitiveTypes() throws Exception
{
- XMLInputFactory factory = XMLInputFactory.newInstance();
- XMLStreamReader xsr = factory.createXMLStreamReader(new FileInputStream(
- JarUtil.getResourceFromJarasFile("xbean/misc/primitiveTypes.xml")));
+ XMLStreamReader xsr = XmlObject.Factory.parse(new FileInputStream(
+ JarUtil.getResourceFromJarasFile("xbean/misc/primitiveTypes.xml"))).
+ newXMLStreamReader();
XMLStreamReaderExt xsrext = new XMLStreamReaderExtImpl(xsr);
while (xsrext.hasNext())
Modified: xmlbeans/trunk/testbuild.xml
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/testbuild.xml?rev=312915&r1=312914&r2=312915&view=diff
==============================================================================
--- xmlbeans/trunk/testbuild.xml (original)
+++ xmlbeans/trunk/testbuild.xml Tue Oct 11 09:47:21 2005
@@ -851,7 +851,7 @@
<target name="checkin">
<property name="test.area" value="checkin"/>
<property name="excludes"
- value="**/compile/scomp/checkin/**"/>
+ value="**/compile/scomp/checkin/**,**/tools/inst2xsd/checkin/**"/>
<antcall target="build"/>
<antcall target="run.junit"/>
<antcall target="-compile.run.exluded"/>
@@ -860,7 +860,7 @@
<!-- convenience target for just running compile tests -->
<target name="compile.run">
<property name="excludes"
- value="**/compile/scomp/checkin/**"/>
+ value="**/compile/scomp/checkin/**,**/tools/inst2xsd/checkin/**"/>
<antcall target="-compile.run.exluded"/>
</target>
<!-- This test, for some reason, upon compilation,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org