geronimo-stax-1.0-spec-1.0.1/0000755000000000000000000000000011142275603014230 5ustar rootrootgeronimo-stax-1.0-spec-1.0.1/LICENSE.txt0000644000000000000000000002613710613154543016065 0ustar rootroot Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] 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. geronimo-stax-1.0-spec-1.0.1/NOTICE.txt0000644000000000000000000000025310613154543015753 0ustar rootrootApache Geronimo Copyright 2003-2006 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). geronimo-stax-1.0-spec-1.0.1/pom.xml0000644000000000000000000000416710731777172015570 0ustar rootroot 4.0.0 org.apache.geronimo.specs specs 1.3 ../pom.xml geronimo-stax-api_1.0_spec bundle Streaming API for XML (STAX API 1.0) 1.0.1 javax.xml.stream* 1.0 scm:svn:https://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-stax-api_1.0_spec-1.0.1 scm:svn:https://svn.apache.org/repos/asf/geronimo/trunk/tags/geronimo-stax-api_1.0_spec-1.0.1 https://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-stax-api_1.0_spec-1.0.1 geronimo-stax-1.0-spec-1.0.1/src/0000755000000000000000000000000011142275602015016 5ustar rootrootgeronimo-stax-1.0-spec-1.0.1/src/main/0000755000000000000000000000000011142275602015742 5ustar rootrootgeronimo-stax-1.0-spec-1.0.1/src/main/java/0000755000000000000000000000000011142275602016663 5ustar rootrootgeronimo-stax-1.0-spec-1.0.1/src/main/java/javax/0000755000000000000000000000000011142275602017774 5ustar rootrootgeronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/0000755000000000000000000000000011142275603020575 5ustar rootrootgeronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/XMLConstants.java0000644000000000000000000000235010574057117024003 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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; public class XMLConstants { public static final java.lang.String DEFAULT_NS_PREFIX = ""; public static final java.lang.String XML_NS_PREFIX = "xml"; public static final java.lang.String XML_NS_URI = "http://www.w3.org/XML/1998/namespace"; public static final java.lang.String XMLNS_ATTRIBUTE = "xmlns"; public static final java.lang.String XMLNS_ATTRIBUTE_NS_URI = "http://www.w3.org/2000/xmlns/"; } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/namespace/0000755000000000000000000000000011142275603022531 5ustar rootrootgeronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/namespace/NamespaceContext.java0000644000000000000000000000205510574057117026645 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/0000755000000000000000000000000011142275603022070 5ustar rootrootgeronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/XMLStreamException.java0000644000000000000000000000356110613150651026430 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; public class XMLStreamException extends Exception { protected Throwable nested; protected Location location; public XMLStreamException() { } public XMLStreamException(java.lang.String msg) { super(msg); } public XMLStreamException(java.lang.Throwable th) { this.nested = th; } public XMLStreamException(java.lang.String msg, java.lang.Throwable th) { super(msg); this.nested = th; } public XMLStreamException(java.lang.String msg, Location location, java.lang.Throwable th) { super("ParseError at [row,col]:[" + location.getLineNumber() + "," + location.getColumnNumber() + "]\n" + "Message: " + msg); this.location = location; this.nested = th; } public XMLStreamException(java.lang.String msg, Location location) { super("ParseError at [row,col]:[" + location.getLineNumber() + "," + location.getColumnNumber() + "]\n" + "Message: " + msg); this.location = location; } public java.lang.Throwable getNestedException() { return nested; } public Location getLocation() { return location; } } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/XMLStreamWriter.java0000644000000000000000000000670710573733234025764 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; import javax.xml.namespace.NamespaceContext; public interface XMLStreamWriter { public void close() throws XMLStreamException; public void flush() throws XMLStreamException; public NamespaceContext getNamespaceContext(); public String getPrefix(String uri) throws XMLStreamException; public Object getProperty(String name) throws IllegalArgumentException; public void setDefaultNamespace(String uri) throws XMLStreamException; public void setNamespaceContext(NamespaceContext context) throws XMLStreamException; public void setPrefix(String prefix, String uri) throws XMLStreamException; public void writeAttribute(String localName, String value) throws XMLStreamException; public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException; public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException; public void writeCData(String data) throws XMLStreamException; public void writeCharacters(char[] text, int start, int len) throws XMLStreamException; public void writeCharacters(String text) throws XMLStreamException; public void writeComment(String data) throws XMLStreamException; public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException; public void writeDTD(String dtd) throws XMLStreamException; public void writeEmptyElement(String localName) throws XMLStreamException; public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException; public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException; public void writeEndDocument() throws XMLStreamException; public void writeEndElement() throws XMLStreamException; public void writeEntityRef(String name) throws XMLStreamException; public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException; public void writeProcessingInstruction(String target) throws XMLStreamException; public void writeProcessingInstruction(String target, String data) throws XMLStreamException; public void writeStartDocument() throws XMLStreamException; public void writeStartDocument(String version) throws XMLStreamException; public void writeStartDocument(String encoding, String version) throws XMLStreamException; public void writeStartElement(String localName) throws XMLStreamException; public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException; public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException; } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/XMLStreamConstants.java0000644000000000000000000000305610573733234026456 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; public interface XMLStreamConstants { public static final int ATTRIBUTE = 10; public static final int CDATA = 12; public static final int CHARACTERS = 4; public static final int COMMENT = 5; public static final int DTD = 11; public static final int END_DOCUMENT = 8; public static final int END_ELEMENT = 2; public static final int ENTITY_DECLARATION = 15; public static final int ENTITY_REFERENCE = 9; public static final int NAMESPACE = 13; public static final int NOTATION_DECLARATION = 14; public static final int PROCESSING_INSTRUCTION = 3; public static final int SPACE = 6; public static final int START_DOCUMENT = 7; public static final int START_ELEMENT = 1; }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/XMLStreamReader.java0000644000000000000000000000562210573733234025705 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; public interface XMLStreamReader extends XMLStreamConstants { public void close() throws XMLStreamException; public int getAttributeCount(); public String getAttributeLocalName(int index); public QName getAttributeName(int index); public String getAttributeNamespace(int index); public String getAttributePrefix(int index); public String getAttributeType(int index); public String getAttributeValue(int index); public String getAttributeValue(String namespaceURI, String localName); public String getCharacterEncodingScheme(); public String getElementText() throws XMLStreamException; public String getEncoding(); public int getEventType(); public String getLocalName(); public Location getLocation(); public QName getName(); public NamespaceContext getNamespaceContext(); public int getNamespaceCount(); public String getNamespacePrefix(int index); public String getNamespaceURI(); public String getNamespaceURI(int index); public String getNamespaceURI(String prefix); public String getPIData(); public String getPITarget(); public String getPrefix(); public java.lang.Object getProperty(String name) throws IllegalArgumentException; public String getText(); public char[] getTextCharacters(); public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException; public int getTextLength(); public int getTextStart(); public String getVersion(); public boolean hasName(); public boolean hasNext() throws XMLStreamException; public boolean hasText(); public boolean isAttributeSpecified(int index); public boolean isCharacters(); public boolean isEndElement(); public boolean isStandalone(); public boolean isStartElement(); public boolean isWhiteSpace(); public int next() throws XMLStreamException; public int nextTag() throws XMLStreamException ; public void require(int type, String namespaceURI, String localName) throws XMLStreamException ; public boolean standaloneSet(); } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/XMLEventFactory.java0000644000000000000000000001030010576122310025713 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; import java.util.Iterator; import javax.xml.namespace.NamespaceContext; import javax.xml.stream.events.ProcessingInstruction; import javax.xml.namespace.QName; import javax.xml.stream.events.Characters; import javax.xml.stream.events.Comment; import javax.xml.stream.events.DTD; import javax.xml.stream.events.EndElement; import javax.xml.stream.events.EntityDeclaration; import javax.xml.stream.events.Namespace; import javax.xml.stream.events.Attribute; import javax.xml.stream.events.EndDocument; import javax.xml.stream.events.EntityReference; import javax.xml.stream.events.StartDocument; import javax.xml.stream.events.StartElement; public abstract class XMLEventFactory { protected XMLEventFactory() { } public static XMLEventFactory newInstance() throws FactoryConfigurationError { return (XMLEventFactory)FactoryLocator.locate("javax.xml.stream.XMLEventFactory", "com.ctc.wstx.stax.WstxEventFactory"); } public static XMLEventFactory newInstance(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError { return (XMLEventFactory)FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxEventFactory", classLoader); } public abstract void setLocation(Location location); public abstract Attribute createAttribute(QName name, String value); public abstract Attribute createAttribute(String localName, String value); public abstract Attribute createAttribute(String prefix, String namespaceURI, String localName, String value); public abstract Namespace createNamespace(String namespaceUri); public abstract Namespace createNamespace(String prefix, String namespaceUri); public abstract StartElement createStartElement(QName name, Iterator attributes, Iterator namespaces); public abstract StartElement createStartElement(String prefix, String namespaceUri, String localName); public abstract StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces); public abstract StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context); public abstract EndElement createEndElement(QName name, Iterator namespaces); public abstract EndElement createEndElement(String prefix, String namespaceUri, String localName); public abstract EndElement createEndElement(String prefix, String namespaceUri, String localName, Iterator namespaces); public abstract Characters createCharacters(String content); public abstract Characters createCData(String content); public abstract Characters createSpace(String content); public abstract Characters createIgnorableSpace(String content); public abstract StartDocument createStartDocument(); public abstract StartDocument createStartDocument(String encoding); public abstract StartDocument createStartDocument(String encoding, String version); public abstract StartDocument createStartDocument(String encoding, String version, boolean standalone); public abstract EndDocument createEndDocument(); public abstract EntityReference createEntityReference(String name, EntityDeclaration declaration); public abstract Comment createComment(String text); public abstract ProcessingInstruction createProcessingInstruction( String target, String data); public abstract DTD createDTD(String dtd); } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/FactoryLocator.java0000644000000000000000000001032110576122310025657 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; import java.io.InputStream; import java.io.File; import java.io.FileInputStream; import java.util.Properties; import java.io.BufferedReader; import java.io.InputStreamReader; /* * Here is the beef on the finding the Factory Class * * 1. Use the javax.xml.stream.XMLInputFactory system property. 2. Use the * properties file "lib/stax.properties" in the JRE directory. This * configuration file is in standard java.util.Properties format and contains * the fully qualified name of the implementation class with the key being the * system property defined above. 3. Use the Services API (as detailed in the * JAR specification), if available, to determine the classname. The Services * API will look for a classname in the file * META-INF/services/javax.xml.stream.XMLInputFactory in jars available to the * runtime. Platform default XMLInputFactory instance. * * If the user provided a classloader we'll use that...if not, we'll assume the * classloader of this class. */ class FactoryLocator { static Object locate(String factoryId) throws FactoryConfigurationError { return locate(factoryId, null); } static Object locate(String factoryId, String altClassName) throws FactoryConfigurationError { return locate(factoryId, altClassName, Thread.currentThread().getContextClassLoader()); } static Object locate(String factoryId, String altClassName, ClassLoader classLoader) throws FactoryConfigurationError { try { String prop = System.getProperty(factoryId); if (prop != null) { return loadFactory(prop, classLoader); } } catch (Exception e) { } try { String configFile = System.getProperty("java.home") + File.separator + "lib" + File.separator + "stax.properties"; File f = new File(configFile); if (f.exists()) { Properties props = new Properties(); props.load(new FileInputStream(f)); String factoryClassName = props.getProperty(factoryId); return loadFactory(factoryClassName, classLoader); } } catch (Exception e) { } String serviceId = "META-INF/services/" + factoryId; try { InputStream is = null; if (classLoader == null) { is = ClassLoader.getSystemResourceAsStream(serviceId); } else { is = classLoader.getResourceAsStream(serviceId); } if (is != null) { BufferedReader br = new BufferedReader(new InputStreamReader( is, "UTF-8")); String factoryClassName = br.readLine(); br.close(); if (factoryClassName != null && !"".equals(factoryClassName)) { return loadFactory(factoryClassName, classLoader); } } } catch (Exception ex) { } if (altClassName == null) { throw new FactoryConfigurationError("Unable to locate factory for " + factoryId + ".", null); } return loadFactory(altClassName, classLoader); } private static Object loadFactory(String className, ClassLoader classLoader) throws FactoryConfigurationError { try { Class factoryClass = classLoader == null ? Class.forName(className) : classLoader.loadClass(className); return factoryClass.newInstance(); } catch (ClassNotFoundException x) { throw new FactoryConfigurationError("Requested factory " + className + " cannot be located. Classloader =" + classLoader.toString(), x); } catch (Exception x) { throw new FactoryConfigurationError("Requested factory " + className + " could not be instantiated: " + x, x); } } } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/Location.java0000644000000000000000000000202110574057117024504 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; public interface Location { public int getCharacterOffset(); public int getColumnNumber(); public int getLineNumber(); public String getPublicId(); public String getSystemId(); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/StreamFilter.java0000644000000000000000000000164710574057117025352 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; public interface StreamFilter { public boolean accept(XMLStreamReader reader); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/XMLReporter.java0000644000000000000000000000200610573733234025122 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; public interface XMLReporter { void report(String message, String errorType, Object relatedInformation, Location location) throws XMLStreamException; } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/FactoryConfigurationError.java0000644000000000000000000000315610574057117030117 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; import java.io.Serializable; public class FactoryConfigurationError extends Error implements Serializable { Exception nested; public FactoryConfigurationError() { } public FactoryConfigurationError(Exception e) { nested = e; } public FactoryConfigurationError(Exception e, String msg) { super(msg); nested = e; } public FactoryConfigurationError(java.lang.String msg) { super(msg); } public FactoryConfigurationError(String msg, Exception e) { super(msg); nested = e; } public Exception getException() { return nested; } public String getMessage() { String msg = super.getMessage(); if (msg != null) return msg; if (nested != null) { msg = nested.getMessage(); if (msg == null) msg = nested.getClass().toString(); } return msg; } }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/EventFilter.java0000644000000000000000000000171010574057117025167 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; import javax.xml.stream.events.XMLEvent; public interface EventFilter { public boolean accept(XMLEvent event); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/XMLResolver.java0000644000000000000000000000207110573733234025123 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; public interface XMLResolver { public Object resolveEntity(String publicID, String systemID, String baseURI, String namespace) throws XMLStreamException; } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/util/0000755000000000000000000000000011142275603023045 5ustar rootrootgeronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/util/XMLEventAllocator.java0000644000000000000000000000234010574057117027220 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.util; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.events.XMLEvent; public interface XMLEventAllocator { public XMLEvent allocate(XMLStreamReader reader) throws XMLStreamException; public void allocate(XMLStreamReader reader, XMLEventConsumer consumer) throws XMLStreamException; public XMLEventAllocator newInstance(); } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/util/StreamReaderDelegate.java0000644000000000000000000001205110574057117027726 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.util; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; import javax.xml.stream.Location; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; public class StreamReaderDelegate implements XMLStreamReader { XMLStreamReader reader; public StreamReaderDelegate() { } public StreamReaderDelegate(XMLStreamReader reader) { this.reader = reader; } public void setParent(XMLStreamReader reader) { this.reader = reader; } public XMLStreamReader getParent() { return reader; } public int next() throws XMLStreamException { return reader.next(); } public int nextTag() throws XMLStreamException { return reader.nextTag(); } public String getElementText() throws XMLStreamException { return reader.getElementText(); } public void require(int type, String namespaceURI, String localName) throws XMLStreamException { reader.require(type, namespaceURI, localName); } public boolean hasNext() throws XMLStreamException { return reader.hasNext(); } public void close() throws XMLStreamException { reader.close(); } public String getNamespaceURI(String prefix) { return reader.getNamespaceURI(prefix); } public NamespaceContext getNamespaceContext() { return reader.getNamespaceContext(); } public boolean isStartElement() { return reader.isStartElement(); } public boolean isEndElement() { return reader.isEndElement(); } public boolean isCharacters() { return reader.isCharacters(); } public boolean isWhiteSpace() { return reader.isWhiteSpace(); } public String getAttributeValue(String namespaceURI, String localName) { return reader.getAttributeValue(namespaceURI, localName); } public int getAttributeCount() { return reader.getAttributeCount(); } public QName getAttributeName(int index) { return reader.getAttributeName(index); } public String getAttributePrefix(int index) { return reader.getAttributePrefix(index); } public String getAttributeNamespace(int index) { return reader.getAttributeNamespace(index); } public String getAttributeLocalName(int index) { return reader.getAttributeLocalName(index); } public String getAttributeType(int index) { return reader.getAttributeType(index); } public String getAttributeValue(int index) { return reader.getAttributeValue(index); } public boolean isAttributeSpecified(int index) { return reader.isAttributeSpecified(index); } public int getNamespaceCount() { return reader.getNamespaceCount(); } public String getNamespacePrefix(int index) { return reader.getNamespacePrefix(index); } public String getNamespaceURI(int index) { return reader.getNamespaceURI(index); } public int getEventType() { return reader.getEventType(); } public String getText() { return reader.getText(); } public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException { return reader.getTextCharacters(sourceStart, target, targetStart, length); } public char[] getTextCharacters() { return reader.getTextCharacters(); } public int getTextStart() { return reader.getTextStart(); } public int getTextLength() { return reader.getTextLength(); } public String getEncoding() { return reader.getEncoding(); } public boolean hasText() { return reader.hasText(); } public Location getLocation() { return reader.getLocation(); } public QName getName() { return reader.getName(); } public String getLocalName() { return reader.getLocalName(); } public boolean hasName() { return reader.hasName(); } public String getNamespaceURI() { return reader.getNamespaceURI(); } public String getPrefix() { return reader.getPrefix(); } public String getVersion() { return reader.getVersion(); } public boolean isStandalone() { return reader.isStandalone(); } public boolean standaloneSet() { return reader.standaloneSet(); } public String getCharacterEncodingScheme() { return reader.getCharacterEncodingScheme(); } public String getPITarget() { return reader.getPITarget(); } public String getPIData() { return reader.getPIData(); } public Object getProperty(String name) throws IllegalArgumentException { return reader.getProperty(name); } } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/util/EventReaderDelegate.java0000644000000000000000000000376710575774654027607 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.util; import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.XMLEvent; public class EventReaderDelegate implements XMLEventReader { private XMLEventReader reader; public EventReaderDelegate() { } public EventReaderDelegate(XMLEventReader reader) { this.reader = reader; } public void close() throws XMLStreamException { reader.close(); } public String getElementText() throws XMLStreamException { return reader.getElementText(); } public XMLEventReader getParent() { return reader; } public Object getProperty(java.lang.String name) throws IllegalArgumentException { return reader.getProperty(name); } public boolean hasNext() { return reader.hasNext(); } public Object next() { return reader.next(); } public XMLEvent nextEvent() throws XMLStreamException { return reader.nextEvent(); } public XMLEvent nextTag() throws XMLStreamException { return reader.nextTag(); } public XMLEvent peek() throws XMLStreamException { return reader.peek(); } public void remove() { reader.remove(); } public void setParent(XMLEventReader reader) { this.reader = reader; } }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/util/XMLEventConsumer.java0000644000000000000000000000202610573733234027074 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.util; import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.XMLEvent; public interface XMLEventConsumer { public void add(XMLEvent event) throws XMLStreamException; } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/XMLOutputFactory.java0000644000000000000000000000521110576122310026137 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; public abstract class XMLOutputFactory { public static final String IS_REPAIRING_NAMESPACES = "javax.xml.stream.isRepairingNamespaces"; protected XMLOutputFactory() { } public static XMLOutputFactory newInstance() throws FactoryConfigurationError { return (XMLOutputFactory) FactoryLocator.locate("javax.xml.stream.XMLOutputFactory", "com.ctc.wstx.stax.WstxOutputFactory"); } public static XMLInputFactory newInstance(String factoryId, java.lang.ClassLoader classLoader) throws FactoryConfigurationError { return (XMLInputFactory) FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxOutputFactory", classLoader); } public abstract XMLStreamWriter createXMLStreamWriter(java.io.Writer stream) throws XMLStreamException; public abstract XMLStreamWriter createXMLStreamWriter( java.io.OutputStream stream) throws XMLStreamException; public abstract XMLStreamWriter createXMLStreamWriter( java.io.OutputStream stream, String encoding) throws XMLStreamException; public abstract XMLStreamWriter createXMLStreamWriter( javax.xml.transform.Result result) throws XMLStreamException; public abstract XMLEventWriter createXMLEventWriter( javax.xml.transform.Result result) throws XMLStreamException; public abstract XMLEventWriter createXMLEventWriter( java.io.OutputStream stream) throws XMLStreamException; public abstract XMLEventWriter createXMLEventWriter( java.io.OutputStream stream, String encoding) throws XMLStreamException; public abstract XMLEventWriter createXMLEventWriter(java.io.Writer stream) throws XMLStreamException; public abstract void setProperty(String name, Object value) throws IllegalArgumentException; public abstract Object getProperty(String name) throws IllegalArgumentException; public abstract boolean isPropertySupported(String name); } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/0000755000000000000000000000000011142275603023374 5ustar rootrootgeronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/Namespace.java0000644000000000000000000000177610574057117026154 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; public interface Namespace extends Attribute { public String getNamespaceURI(); public String getPrefix(); public boolean isDefaultNamespaceDeclaration(); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/DTD.java0000644000000000000000000000205110574057117024656 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; import java.util.List; public interface DTD extends XMLEvent { public String getDocumentTypeDeclaration(); public List getEntities(); public List getNotations(); public Object getProcessedDTD(); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/EntityDeclaration.java0000644000000000000000000000212310574057117027665 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; public interface EntityDeclaration extends XMLEvent { public String getBaseURI(); public String getName(); public String getNotationName(); public String getPublicId(); public String getReplacementText(); public String getSystemId(); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/ProcessingInstruction.java0000644000000000000000000000171710574057117030631 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; public interface ProcessingInstruction extends XMLEvent { public String getData(); public String getTarget(); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/Attribute.java0000644000000000000000000000204210574057117026206 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; import javax.xml.namespace.QName; public interface Attribute extends XMLEvent { public String getDTDType(); public QName getName(); public String getValue(); public boolean isSpecified(); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/EndElement.java0000644000000000000000000000201410574057117026262 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; import java.util.Iterator; import javax.xml.namespace.QName; public interface EndElement extends XMLEvent { public QName getName(); public Iterator getNamespaces(); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/StartElement.java0000644000000000000000000000235510574057117026661 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; import java.util.Iterator; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; public interface StartElement extends XMLEvent { public Attribute getAttributeByName(QName name); public Iterator getAttributes(); public QName getName(); public NamespaceContext getNamespaceContext(); public Iterator getNamespaces(); public String getNamespaceURI(String prefix); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/StartDocument.java0000644000000000000000000000213510574057117027042 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; public interface StartDocument extends XMLEvent { public boolean encodingSet(); public String getCharacterEncodingScheme(); public String getSystemId(); public String getVersion(); public boolean isStandalone(); public boolean standaloneSet(); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/XMLEvent.java0000644000000000000000000000324210575666055025720 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; import java.io.Writer; import javax.xml.namespace.QName; import javax.xml.stream.Location; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; public interface XMLEvent extends XMLStreamConstants { public Characters asCharacters(); public EndElement asEndElement(); public StartElement asStartElement(); public int getEventType(); public Location getLocation(); public QName getSchemaType(); public boolean isAttribute(); public boolean isCharacters(); public boolean isEndDocument(); public boolean isEndElement(); public boolean isEntityReference(); public boolean isNamespace(); public boolean isProcessingInstruction(); public boolean isStartDocument(); public boolean isStartElement(); public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException; }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/EntityReference.java0000644000000000000000000000173110574057117027342 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; public interface EntityReference extends XMLEvent { public EntityDeclaration getDeclaration(); public String getName(); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/Characters.java0000644000000000000000000000201610574057117026323 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; public interface Characters extends XMLEvent { public String getData(); public boolean isCData(); public boolean isIgnorableWhiteSpace(); public boolean isWhiteSpace(); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/NotationDeclaration.java0000644000000000000000000000175610574057117030217 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; public interface NotationDeclaration extends XMLEvent { public String getName(); public String getPublicId(); public String getSystemId(); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/Comment.java0000644000000000000000000000164410574057117025654 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; public interface Comment extends XMLEvent { public String getText(); }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/events/EndDocument.java0000644000000000000000000000161610574057117026456 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream.events; public interface EndDocument extends XMLEvent { }geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/XMLEventReader.java0000644000000000000000000000252410574057117025531 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; import java.util.Iterator; import javax.xml.stream.events.XMLEvent; public interface XMLEventReader extends Iterator { public void close() throws XMLStreamException; public String getElementText() throws XMLStreamException; public Object getProperty(java.lang.String name) throws IllegalArgumentException; public boolean hasNext(); public XMLEvent nextEvent() throws XMLStreamException; public XMLEvent nextTag() throws XMLStreamException; public XMLEvent peek() throws XMLStreamException; } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/XMLInputFactory.java0000644000000000000000000001155510576122310025746 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; import javax.xml.stream.util.XMLEventAllocator; public abstract class XMLInputFactory { public static final java.lang.String ALLOCATOR = "javax.xml.stream.allocator"; public static final java.lang.String IS_COALESCING = "javax.xml.stream.isCoalescing"; public static final java.lang.String IS_NAMESPACE_AWARE = "javax.xml.stream.isNamespaceAware"; public static final java.lang.String IS_REPLACING_ENTITY_REFERENCES = "javax.xml.stream.isReplacingEntityReferences"; public static final java.lang.String IS_SUPPORTING_EXTERNAL_ENTITIES = "javax.xml.stream.isSupportingExternalEntities"; public static final java.lang.String IS_VALIDATING = "javax.xml.stream.isValidating"; public static final java.lang.String REPORTER = "javax.xml.stream.reporter"; public static final java.lang.String RESOLVER = "javax.xml.stream.resolver"; public static final java.lang.String SUPPORT_DTD = "javax.xml.stream.supportDTD"; protected XMLInputFactory() { } public static XMLInputFactory newInstance() throws FactoryConfigurationError { // We'll assume the XMLInputFactory from the RI as a backup. return (XMLInputFactory)FactoryLocator.locate("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory"); } public static XMLInputFactory newInstance(java.lang.String factoryId, java.lang.ClassLoader classLoader) throws FactoryConfigurationError { // We'll assume the XMLInputFactory from the RI as a backup. return (XMLInputFactory)FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxInputFactory", classLoader); } public abstract XMLStreamReader createXMLStreamReader(java.io.Reader reader) throws XMLStreamException; public abstract XMLStreamReader createXMLStreamReader( javax.xml.transform.Source source) throws XMLStreamException; public abstract XMLStreamReader createXMLStreamReader( java.io.InputStream stream) throws XMLStreamException; public abstract XMLStreamReader createXMLStreamReader( java.io.InputStream stream, java.lang.String encoding) throws XMLStreamException; public abstract XMLStreamReader createXMLStreamReader( java.lang.String systemId, java.io.InputStream stream) throws XMLStreamException; public abstract XMLStreamReader createXMLStreamReader( java.lang.String systemId, java.io.Reader reader) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader(java.io.Reader reader) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader( java.lang.String systemId, java.io.Reader reader) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader( javax.xml.transform.Source source) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader( java.io.InputStream stream) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader( java.io.InputStream stream, java.lang.String encoding) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader( java.lang.String systemId, java.io.InputStream stream) throws XMLStreamException; public abstract XMLStreamReader createFilteredReader( XMLStreamReader reader, StreamFilter filter) throws XMLStreamException; public abstract XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) throws XMLStreamException; public abstract XMLResolver getXMLResolver(); public abstract void setXMLResolver(XMLResolver resolver); public abstract XMLReporter getXMLReporter(); public abstract void setXMLReporter(XMLReporter reporter); public abstract void setProperty(java.lang.String name, java.lang.Object value) throws java.lang.IllegalArgumentException; public abstract java.lang.Object getProperty(java.lang.String name) throws java.lang.IllegalArgumentException; public abstract boolean isPropertySupported(java.lang.String name); public abstract void setEventAllocator(XMLEventAllocator allocator); public abstract XMLEventAllocator getEventAllocator(); } geronimo-stax-1.0-spec-1.0.1/src/main/java/javax/xml/stream/XMLEventWriter.java0000644000000000000000000000313610574057117025603 0ustar rootroot/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you 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.stream; import javax.xml.namespace.NamespaceContext; import javax.xml.stream.events.XMLEvent; import javax.xml.stream.util.XMLEventConsumer; public interface XMLEventWriter extends XMLEventConsumer { public void add(XMLEvent event) throws XMLStreamException; public void add(XMLEventReader reader) throws XMLStreamException; public void close() throws XMLStreamException; public void flush() throws XMLStreamException; public NamespaceContext getNamespaceContext(); public String getPrefix(String uri) throws XMLStreamException; public void setDefaultNamespace(String uri) throws XMLStreamException; public void setNamespaceContext(NamespaceContext context) throws XMLStreamException; public void setPrefix(String prefix, String uri) throws XMLStreamException; }