Fridrich Strba 2018-12-06 16:07:46 +00:00 committed by Git OBS Bridge
parent e4b54d192f
commit 1453bb0029
10 changed files with 510 additions and 235 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f59a5ef7b51bd883f2e9bda37a9360692e6c5e439b98d9b6ac1953e1f98b0680
size 1792762

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c27b81e139ecfc219202bcad79e77529b082e9ed9797bc1a4c13e1bd8f8e31c9
size 1810232

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ff9a5e3a12b4bdad5a9238db03ed5a4709831d3e2c13fe53601163c374ad2051
size 7079679

View File

@ -1,48 +0,0 @@
--- xerces/src/org/apache/xerces/util/XMLStringBuffer.java 2006/09/18 05:12:57 447241
+++ xerces/src/org/apache/xerces/util/XMLStringBuffer.java 2013/07/25 18:13:37
@@ -111,12 +111,13 @@
*/
public void append(char c) {
if (this.length + 1 > this.ch.length) {
- int newLength = this.ch.length*2;
- if (newLength < this.ch.length + DEFAULT_SIZE)
- newLength = this.ch.length + DEFAULT_SIZE;
- char[] newch = new char[newLength];
- System.arraycopy(this.ch, 0, newch, 0, this.length);
- this.ch = newch;
+ int newLength = this.ch.length * 2;
+ if (newLength < this.ch.length + DEFAULT_SIZE) {
+ newLength = this.ch.length + DEFAULT_SIZE;
+ }
+ char[] newch = new char[newLength];
+ System.arraycopy(this.ch, 0, newch, 0, this.length);
+ this.ch = newch;
}
this.ch[this.length] = c;
this.length++;
@@ -130,9 +131,10 @@
public void append(String s) {
int length = s.length();
if (this.length + length > this.ch.length) {
- int newLength = this.ch.length*2;
- if (newLength < this.length + length + DEFAULT_SIZE)
+ int newLength = this.ch.length * 2;
+ if (newLength < this.length + length + DEFAULT_SIZE) {
newLength = this.ch.length + length + DEFAULT_SIZE;
+ }
char[] newch = new char[newLength];
System.arraycopy(this.ch, 0, newch, 0, this.length);
this.ch = newch;
@@ -150,7 +152,11 @@
*/
public void append(char[] ch, int offset, int length) {
if (this.length + length > this.ch.length) {
- char[] newch = new char[this.ch.length + length + DEFAULT_SIZE];
+ int newLength = this.ch.length * 2;
+ if (newLength < this.length + length + DEFAULT_SIZE) {
+ newLength = this.ch.length + length + DEFAULT_SIZE;
+ }
+ char[] newch = new char[newLength];
System.arraycopy(this.ch, 0, newch, 0, this.length);
this.ch = newch;
}

View File

@ -1,47 +0,0 @@
--- xerces/src/org/apache/xerces/impl/XMLScanner.java 2013/07/03 18:25:06 1499505
+++ xerces/src/org/apache/xerces/impl/XMLScanner.java 2013/07/03 18:29:43
@@ -542,7 +542,7 @@
// document is until we scan the encoding declaration
// you cannot reliably read any characters outside
// of the ASCII range here. -- mrglavas
- String name = fEntityScanner.scanName();
+ String name = scanPseudoAttributeName();
XMLEntityManager.print(fEntityManager.getCurrentEntity());
if (name == null) {
reportFatalError("PseudoAttrNameExpected", null);
@@ -599,6 +599,35 @@
} // scanPseudoAttribute(XMLString):String
/**
+ * Scans the name of a pseudo attribute. The only legal names
+ * in XML 1.0/1.1 documents are 'version', 'encoding' and 'standalone'.
+ *
+ * @return the name of the pseudo attribute or <code>null</code>
+ * if a legal pseudo attribute name could not be scanned.
+ */
+ private String scanPseudoAttributeName() throws IOException, XNIException {
+ final int ch = fEntityScanner.peekChar();
+ switch (ch) {
+ case 'v':
+ if (fEntityScanner.skipString(fVersionSymbol)) {
+ return fVersionSymbol;
+ }
+ break;
+ case 'e':
+ if (fEntityScanner.skipString(fEncodingSymbol)) {
+ return fEncodingSymbol;
+ }
+ break;
+ case 's':
+ if (fEntityScanner.skipString(fStandaloneSymbol)) {
+ return fStandaloneSymbol;
+ }
+ break;
+ }
+ return null;
+ } // scanPseudoAttributeName()
+
+ /**
* Scans a processing instruction.
* <p>
* <pre>

280
xerces-j2-build.patch Normal file
View File

@ -0,0 +1,280 @@
--- xerces-2_12_0/build.xml 2018-11-18 20:10:36.933534130 +0100
+++ xerces-2_12_0/build.xml 2018-11-18 20:12:28.714126419 +0100
@@ -38,13 +38,6 @@
<property name="tests.dir" value="./tests"/>
<property name="tools.dir" value="./tools"/>
- <!-- enable compilation under JDK 1.4 and above -->
- <taskdef name="xjavac" classname="org.apache.xerces.util.XJavac">
- <classpath>
- <pathelement location="${tools.dir}/bin/xjavac.jar"/>
- </classpath>
- </taskdef>
-
<!-- Allow properties following these statements to be overridden -->
<!-- Note that all of these don't have to exist. They've just been defined
incase they are used. -->
@@ -71,7 +64,6 @@
<property name='jar.junit' value='junit.jar'/>
<property name='jar.ant' value='ant.jar'/>
<property name='jar.ant.nodeps' value='ant-nodeps.jar'/>
- <property name='jar.xjavac' value='xjavac.jar'/>
<property name='default.parser.config.name' value='XIncludeAwareParserConfiguration'/>
<property name='default.parser.config.qualified' value='org.apache.xerces.parsers.XIncludeAwareParserConfiguration'/>
@@ -108,7 +100,6 @@
<property name="distsrc.dir" value="${build.dir}/${parser.shortname}-${parser_version}"/>
<property name="disttools.dir" value="${build.dir}/tools"/>
<property name="distbin.dir" value="${build.dir}/${parser.shortname}-${parser_version}"/>
- <property name='src.apis.zip' value="${tools.dir}/xml-commons-external-src.zip"/>
<filter token="year" value="${year}"/>
<filter token="version" value="${parser.Version}"/>
@@ -135,7 +126,6 @@
<echo message=" jars --> generates xercesImpl &amp; xercesSamples jars"/>
<echo message=" jar-schema11 --> 'jar' + XML Schema 1.1 support"/>
<echo message=" jars-schema11 --> 'jars' + XML Schema 1.1 support"/>
- <echo message=" xjavac-jar --> generates the xjavac.jar file"/>
<echo message=" docs --> generates the HTML documentation"/>
<echo message=" javadocs --> generates the API docs (needs Java 1.2 or higher)"/>
<echo message=" samples --> compiles the samples source code"/>
@@ -247,30 +237,6 @@
<copy file="${src.dir}/org/apache/xerces/impl/xpath/regex/message.properties"
tofile="${build.src}/org/apache/xerces/impl/xpath/regex/message_en.properties"/>
- <!-- now deal with API's: -->
- <unzip src="${src.apis.zip}" dest="${build.src}">
- <patternset
- includes="org/xml/sax/**
- javax/xml/**
- javax/xml/datatype/**
- javax/xml/namespace/**
- javax/xml/parsers/**
- javax/xml/stream/**
- javax/xml/transform/**
- javax/xml/validation/**
- javax/xml/xpath/**
- org/w3c/dom/*
- org/w3c/dom/bootstrap/**
- org/w3c/dom/events/**
- org/w3c/dom/html/**
- org/w3c/dom/ls/**
- org/w3c/dom/ranges/**
- org/w3c/dom/traversal/**
- org/w3c/dom/views/**
- org/w3c/dom/xpath/**"
- />
- </unzip>
-
<!-- substitute tokens as needed -->
<replace file="${build.dir}/src/org/apache/xerces/impl/Version.java"
token="@@VERSION@@" value="${parser.Name} ${parser.Version}"/>
@@ -286,7 +252,7 @@
</fileset>
</copy>
- <xjavac srcdir="${build.src}"
+ <javac srcdir="${build.src}"
destdir="${build.dest}"
source="${javac.source}"
target="${javac.target}"
@@ -354,7 +320,7 @@
<copy todir="${build.samples}" >
<fileset dir="${samples.dir}"/>
</copy>
- <xjavac srcdir="${build.samples}"
+ <javac srcdir="${build.samples}"
destdir="${build.dest}"
source="${javac.source}"
target="${javac.target}"
@@ -374,7 +340,7 @@
<fileset dir="${tests.dir}"
excludes="dom/rename/**" />
</copy>
- <xjavac srcdir="${build.tests}"
+ <javac srcdir="${build.tests}"
destdir="${build.dest}"
source="${javac.source}"
target="${javac.target}"
@@ -438,7 +404,7 @@
</target>
- <target name="javadoc-replace" unless="additional.param">
+ <target name="javadoc-replace">
<replace token="@xerces.internal" dir="${build.src}">
<replacevalue><![CDATA[<DL><DT><H1 style="font-size:110%">INTERNAL:</H1><DD>Usage of this class is not supported. It may be altered or removed at any time.</DD></DT></DL>]]></replacevalue>
</replace>
@@ -453,46 +419,33 @@
<!-- =================================================================== -->
<target name="javadocs" depends="prepare-src">
- <condition property="additional.param" value=" -taglet org.apache.xerces.util.ExperimentalTaglet -taglet org.apache.xerces.util.InternalTaglet -tagletpath ${tools.dir}/bin/xerces2taglets.jar">
- <available classname="com.sun.tools.doclets.Taglet"/>
- </condition>
-
<antcall target="javadoc-replace" />
- <condition property="additional.param" value="">
- <not>
- <available classname="com.sun.tools.doclets.Taglet"/>
- </not>
- </condition>
-
<mkdir dir='${build.dir}/docs/javadocs/api'/>
<javadoc packagenames='javax.xml.*,org.w3c.*,org.xml.*'
- locale='en_US'
+ locale='en_US' source="${javac.source}"
sourcepath='${build.src}' destdir='${build.dir}/docs/javadocs/api'
author='true' version='true'
windowtitle='XML Standard API' doctitle='XML Standard API'
bottom='${copyright}'
- additionalparam='${additional.param}'
/>
<mkdir dir='${build.dir}/docs/javadocs/xni'/>
<javadoc packagenames='org.apache.xerces.xni.*'
- locale='en_US'
+ locale='en_US' source="${javac.source}"
sourcepath='${build.src}' destdir='${build.dir}/docs/javadocs/xni'
author='true' version='true'
windowtitle='Xerces Native Interface'
doctitle='Xerces Native Interface'
bottom='${copyright}'
- additionalparam='${additional.param}'
/>
<mkdir dir='${build.dir}/docs/javadocs/xs'/>
<javadoc packagenames='org.apache.xerces.xs, org.apache.xerces.xs.datatypes'
- locale='en_US'
+ locale='en_US' source="${javac.source}"
sourcepath='${build.src}' destdir='${build.dir}/docs/javadocs/xs'
author='true' version='true'
windowtitle='XML Schema API'
doctitle='XML Schema API'
bottom='${copyright}'
- additionalparam='${additional.param}'
/>
<mkdir dir='${build.dir}/docs/javadocs/xerces2'/>
@@ -504,25 +457,23 @@
org.apache.xerces.util,
org.apache.xerces.xinclude,
org.apache.xerces.xpointer'
- locale='en_US'
+ locale='en_US' source="${javac.source}"
sourcepath='${build.src}' destdir='${build.dir}/docs/javadocs/xerces2'
classpath='${tools.dir}/${jar.resolver}:${tools.dir}/${jar.serializer}'
author='true' version='true'
windowtitle='Xerces2 Implementation'
doctitle='Xerces2 Implementation'
bottom='${copyright}'
- additionalparam='${additional.param}'
/>
<mkdir dir='${build.dir}/docs/javadocs/other'/>
<javadoc packagenames='org.apache.html.*,
org.apache.wml.*,
org.apache.xml.serialize.*'
- locale='en_US'
+ locale='en_US' source="${javac.source}"
sourcepath='${build.src}' destdir='${build.dir}/docs/javadocs/other'
author='true' version='true'
windowtitle='Other Classes' doctitle='Other Classes'
bottom='${copyright}'
- additionalparam='${additional.param}'
/>
</target>
@@ -998,7 +949,7 @@
</fileset>
</copy>
- <xjavac srcdir="${build.src}"
+ <javac srcdir="${build.src}"
destdir="${build.dest}"
source="${javac.source}"
target="${javac.target}"
@@ -1233,30 +1184,6 @@
<replace file="${build.dir}/src/org/apache/xerces/parsers/AbstractSAXParser.java"
token="return (fConfiguration instanceof XML11Configurable);" value="return false;"/>
- <!-- now deal with API's: -->
- <unzip src="${src.apis.zip}" dest="${build.src}">
- <patternset
- includes="org/xml/sax/**
- javax/xml/**
- javax/xml/datatype/**
- javax/xml/namespace/**
- javax/xml/parsers/**
- javax/xml/stream/**
- javax/xml/transform/**
- javax/xml/validation/**
- javax/xml/xpath/**
- org/w3c/dom/*
- org/w3c/dom/bootstrap/**
- org/w3c/dom/events/**
- org/w3c/dom/html/**
- org/w3c/dom/ls/**
- org/w3c/dom/ranges/**
- org/w3c/dom/traversal/**
- org/w3c/dom/views/**
- org/w3c/dom/xpath/**"
- />
- </unzip>
-
<!-- substitute tokens as needed -->
<replace file="${build.dir}/src/org/apache/xerces/impl/Version.java"
@@ -1297,7 +1224,7 @@
</fileset>
</copy>
- <xjavac srcdir="${build.src}"
+ <javac srcdir="${build.src}"
destdir="${build.dest}"
source="${javac.source}"
target="${javac.target}"
@@ -1448,7 +1375,7 @@
</fileset>
</copy>
- <xjavac srcdir="${build.src}"
+ <javac srcdir="${build.src}"
destdir="${build.dest}"
source="${javac.source}"
target="${javac.target}"
@@ -1512,36 +1439,4 @@
<copy file="${tools.dir}/${jar.serializer}" tofile="${build.dir}/${jar.serializer}"/>
</target>
- <!-- =================================================================== -->
- <!-- Builds the xjavac jar file -->
- <!-- =================================================================== -->
- <target name="xjavac-jar" depends="prepare">
- <mkdir dir="${build.src}"/>
- <mkdir dir="${build.dest}"/>
-
- <copy file="${tools.dir}/src/XJavac.java"
- tofile="${build.src}/org/apache/xerces/util/XJavac.java"/>
-
- <javac srcdir="${build.src}"
- destdir="${build.dest}"
- source="${javac.source}"
- target="${javac.target}"
- classpath="${build.dir}/classes:${tools.dir}/${jar.ant}:${tools.dir}/${jar.ant.nodeps}"
- debug="${debug}"
- debuglevel="${debuglevel}"
- deprecation="${deprecation}"
- optimize="${optimize}"
- includeAntRuntime="false"
- includeJavaRuntime="false"/>
-
- <jar jarfile="${build.dir}/${jar.xjavac}"
- basedir="${build.dest}"
- compress="true"
- includes="org/apache/xerces/util/XJavac.class">
- <manifest>
- <attribute name="Ant-Version" value="${ant.version}"/>
- </manifest>
- <metainf dir="." includes="LICENSE,NOTICE"/>
- </jar>
- </target>
</project>

View File

@ -1,5 +1,5 @@
--- src/manifest.xerces 2010-11-26 21:42:07.000000000 +0100
+++ src/manifest.xerces 2018-11-18 22:17:04.109447814 +0100
--- src/manifest.xerces 2018-04-21 06:02:09.000000000 +0200
+++ src/manifest.xerces 2018-11-18 18:43:12.785381090 +0100
@@ -1,5 +1,14 @@
Manifest-Version: 1.0
Created-By: @java.version@ (@java.vendor@)
@ -13,5 +13,5 @@
+Require-Bundle: system.bundle,javax.xml;visibility:=reexport, org.apache.xml.resolver;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,org.apache.xml.serializer;bundle-version="[2.7.1,3.0.0)"
+Export-Package: META-INF.services;version="@impl.version@",org.apache.html.dom;version="@impl.version@",org.apache.wml;version="@impl.version@",org.apache.wml.dom;version="@impl.version@",org.apache.xerces.dom;version="@impl.version@",org.apache.xerces.dom.events;version="@impl.version@",org.apache.xerces.dom3.as;version="@impl.version@",org.apache.xerces.impl;version="@impl.version@",org.apache.xerces.impl.dtd;version="@impl.version@",org.apache.xerces.impl.dtd.models;version="@impl.version@",org.apache.xerces.impl.dv;version="@impl.version@",org.apache.xerces.impl.dv.dtd;version="@impl.version@",org.apache.xerces.impl.dv.util;version="@impl.version@",org.apache.xerces.impl.dv.xs;version="@impl.version@",org.apache.xerces.impl.io;version="@impl.version@",org.apache.xerces.impl.msg;version="@impl.version@",org.apache.xerces.impl.validation;version="@impl.version@",org.apache.xerces.impl.xpath;version="@impl.version@",org.apache.xerces.impl.xpath.regex;version="@impl.version@",org.apache.xerces.impl.xs;version="@impl.version@",org.apache.xerces.impl.xs.identity;version="@impl.version@",org.apache.xerces.impl.xs.models;version="@impl.version@",org.apache.xerces.impl.xs.opti;version="@impl.version@",org.apache.xerces.impl.xs.traversers;version="@impl.version@",org.apache.xerces.impl.xs.util;version="@impl.version@",org.apache.xerces.jaxp;version="@impl.version@",org.apache.xerces.jaxp.datatype;version="@impl.version@",org.apache.xerces.jaxp.validation;version="@impl.version@",org.apache.xerces.parsers;version="@impl.version@",org.apache.xerces.stax;version="@impl.version@",org.apache.xerces.stax.events;version="@impl.version@",org.apache.xerces.util;version="@impl.version@",org.apache.xerces.xinclude;version="@impl.version@",org.apache.xerces.xni;version="@impl.version@",org.apache.xerces.xni.grammars;version="@impl.version@",org.apache.xerces.xni.parser;version="@impl.version@",org.apache.xerces.xpointer;version="@impl.version@",org.apache.xerces.xs;version="@impl.version@",org.apache.xerces.xs.datatypes;version="@impl.version@",org.apache.xml.serialize;version="@impl.version@",org.w3c.dom.html;version="@impl.version@"
Name: org/apache/xerces/impl/Version.class
Name: org/apache/xerces/impl/
Comment: @impl.name@

View File

@ -1,7 +1,53 @@
-------------------------------------------------------------------
Thu Dec 6 13:15:48 UTC 2018 - Fridrich Strba <fstrba@suse.com>
Thu Dec 6 15:37:26 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Do not distribute the private xml-apis and xml-resolver
- Upgrade to version 2.12.0
* This release expands on Xerces-J's experimental support for
XML Schema 1.1 by providing a fully compliant XML Schema 1.1
implementation. It fixes several bugs which were present in
Xerces-J 2.11.0 and also includes a few other enhancements and
performance improvements.
+ add: Report all id/idref problems when validating XML against
DTD or XML Schema.
+ add: Implemented improvements to XML Schema 1.1 CTA
implementation and inheritable attributes.
+ update: Implemented improved error/warning message reporting
for various XML Schema use cases.
+ update: Implemented few performance enhancements (affecting
parsing/validation latency and memory footprint) to the
implementation.
+ fix: Fixed minor bugs in Xerces-J's regex support in XML
Schema <pattern> facet.
+ fix: Implemented various fixes to XML Schema 1.1
assert/assertion implementation.
+ fix: Fixed possible security issue: an implementation of the
NamedNodeMapImpl class in the JAXP component did not limit the
amount of memory allocated when creating object instance from
a serialized form. A specially-crafted input could cause a
java application to use an excessive amount of memory when
deserialized.
+ fix: Implemented minor and major fixes in certain areas, to
XML Schema 1.0 and 1.1 implementations.
+ fix: Fixed the issue related to, XIncludeTextReader doesn't
handle null Content Types properly.
+ fix: Fixed minor problems in the DOM (Level 3 Core)
implementation.
+ fix: Fixed few errors related to Xerces-J's build component.
+ fix: Solved a minor bug in SoftReferenceSymbolTable
implementation component.
+ fix: Fixed various bugs and made various improvements.
- Removed patches:
* arrays-doubling.patch
* scan-pseudo-attribute.patch
+ integrated upstream
- Added patches:
* xerces-j2-build.patch
+ Don't use the bundled xml-apis, but depend on an existing
package
+ Don't use custom taglets and ant tasks
- Do not bundle the xml-apis and xml-resolver and stop using
alternatives
- Install as a maven artifact
-------------------------------------------------------------------
Tue Oct 3 15:33:36 UTC 2017 - fstrba@suse.com

View File

@ -16,175 +16,169 @@
#
%define cvs_version 2_11_0
%global cvs_version 2_12_0
%define __requires_exclude system.bundle
Name: xerces-j2
Version: 2.11.0
Version: 2.12.0
Release: 0
Summary: Java XML parser
License: Apache-2.0
License: Apache-2.0 AND W3C
Group: Development/Libraries/Java
Url: http://xml.apache.org/xerces2-j/
URL: http://xerces.apache.org/xerces2-j/
Source0: http://www.eu.apache.org/dist/xerces/j/source/Xerces-J-src.%{version}.tar.gz
Source1: http://www.eu.apache.org/dist/xerces/j/source/Xerces-J-tools.%{version}.tar.gz
Source2: %{name}-version.sh
Source1: %{name}-version.sh
Source2: %{name}-constants.sh
Source3: %{name}-version.1
Source4: %{name}-constants.sh
Source5: %{name}-constants.1
# PATCH-FIX-UPSTREAM bnc#814241 XERCESJ-1616
Patch0: arrays-doubling.patch
Patch1: scan-pseudo-attribute.patch
Patch2: xerces-2_11_0-jdk7.patch
Source4: %{name}-constants.1
Source5: http://repo.maven.apache.org/maven2/xerces/xercesImpl/%{version}/xercesImpl-%{version}.pom
# Patch the build so that it doesn't try to use bundled xml-commons source
# Also remove the use of the special taglets and xjavac task
Patch0: %{name}-build.patch
Patch1: xerces-2_11_0-jdk7.patch
BuildRequires: ant
BuildRequires: apache-parent
BuildRequires: dos2unix
BuildRequires: java-devel >= 1.6
BuildRequires: fdupes
BuildRequires: java-devel
BuildRequires: javapackages-local
BuildRequires: unzip
Requires(post): update-alternatives
Requires(pre): update-alternatives
Provides: jaxp_parser_impl
BuildRequires: xalan-j2 >= 2.7.1
BuildRequires: xml-commons-apis >= 1.4.01
BuildRequires: xml-commons-resolver >= 1.2
# Explicit javapackages-tools requires since scripts use
# /usr/share/java-utils/java-functions
Requires: javapackages-tools
Requires: xalan-j2 >= 2.7.1
Requires: xml-commons-apis >= 1.4.01
Requires: xml-commons-resolver >= 1.2
Provides: %{name}-scripts = %{version}-%{release}
Provides: jaxp_parser_impl = 1.4
Obsoletes: %{name}-scripts < %{version}-%{release}
BuildArch: noarch
%description
Welcome to the future! Xerces2 is the next generation of high
performance, fully compliant XML parsers in the Apache Xerces family.
This new version of Xerces introduces the Xerces Native Interface
(XNI), a complete framework for building parser components and
configurations that is extremely modular and easy to program.
Welcome to the future! Xerces2 is the next generation of high performance,
fully compliant XML parsers in the Apache Xerces family. This new version of
Xerces introduces the Xerces Native Interface (XNI), a complete framework for
building parser components and configurations that is extremely modular and
easy to program.
The Apache Xerces2 parser is the reference implementation of XNI but
other parser components, configurations, and parsers can be written
using the Xerces Native Interface. For complete design and
implementation documents, refer to the XNI Manual.
The Apache Xerces2 parser is the reference implementation of XNI but other
parser components, configurations, and parsers can be written using the Xerces
Native Interface. For complete design and implementation documents, refer to
the XNI Manual.
Xerces 2 is a fully conforming XML Schema processor. For more
information, refer to the XML Schema page.
Xerces2 is a fully conforming XML Schema processor. For more information,
refer to the XML Schema page.
Xerces 2 also provides a partial implementation of Document Object
Model Level 3 Core, Load and Save and Abstract Schemas [deprecated]
Working Drafts. For more information, refer to the DOM Level 3
Implementation page.
Xerces2 also provides a complete implementation of the Document Object Model
Level 3 Core and Load/Save W3C Recommendations and provides a complete
implementation of the XML Inclusions (XInclude) W3C Recommendation. It also
provides support for OASIS XML Catalogs v1.1.
Xerces2 is able to parse documents written according to the XML 1.1
Recommendation, except that it does not yet provide an option to enable
normalization checking as described in section 2.13 of this specification. It
also handles name spaces according to the XML Namespaces 1.1 Recommendation,
and will correctly serialize XML 1.1 documents if the DOM level 3 load/save
APIs are in use.
%package javadoc
Summary: Javadocs for %{name}
Group: Development/Libraries/Java
%description javadoc
This package contains the API documentation for %{name}.
%package demo
Summary: Demonstration and sample files for xerces-j2
Summary: Demonstrations and samples for %{name}
Group: Development/Libraries/Java
Requires: %{name} = %{version}
Requires: %{name} = %{version}-%{release}
%description demo
Welcome to the future! Xerces2 is the next generation of high
performance, fully compliant XML parsers in the Apache Xerces family.
This new version of Xerces introduces the Xerces Native Interface
(XNI), a complete framework for building parser components and
configurations that is extremely modular and easy to program.
The Apache Xerces2 parser is the reference implementation of XNI but
other parser components, configurations, and parsers can be written
using the Xerces Native Interface. For complete design and
implementation documents, refer to the XNI Manual.
Xerces 2 is a fully conforming XML Schema processor. For more
information, refer to the XML Schema page.
Xerces 2 also provides a partial implementation of Document Object
Model Level 3 Core, Load and Save and Abstract Schemas [deprecated]
Working Drafts. For more information, refer to the DOM Level 3
Implementation page.
This package contains demonstration and sample files for Xerces2.
%package scripts
Summary: Additional utility scripts for xerces-j2
Group: Development/Libraries/Java
Requires: %{name} = %{version}
%description scripts
Welcome to the future! Xerces2 is the next generation of high
performance, fully compliant XML parsers in the Apache Xerces family.
This new version of Xerces introduces the Xerces Native Interface
(XNI), a complete framework for building parser components and
configurations that is extremely modular and easy to program.
The Apache Xerces2 parser is the reference implementation of XNI but
other parser components, configurations, and parsers can be written
using the Xerces Native Interface. For complete design and
implementation documents, refer to the XNI Manual.
Xerces 2 is a fully conforming XML Schema processor. For more
information, refer to the XML Schema page.
Xerces 2 also provides a partial implementation of Document Object
Model Level 3 Core, Load and Save and Abstract Schemas [deprecated]
Working Drafts. For more information, refer to the DOM Level 3
Implementation page.
This package contains additional utility scripts for Xerces2.
%{summary}.
%prep
%setup -q -n xerces-%{cvs_version}
%setup -q -T -a 1 -D -n xerces-%{cvs_version}
%setup -q -T -D -n xerces-%{cvs_version}
find -name '*.class' -exec rm -f '{}' \;
find -name '*.jar' -exec rm -f '{}' \;
find -type f -print |xargs -i dos2unix {}
%patch0 -p1
%patch1 -p1
%patch2 -p1
echo 'javac.target=1.6' > build.properties
echo 'javac.source=1.6' >> build.properties
sed -i 's/\r//' LICENSE README NOTICE build.sh
%build
## this uses the ant.jar provided by the xerces packages. Tough luck,
# jpackage bootstrap has to start somewhere. It is not installed,
# though.
export GC_MAXIMUM_HEAP_SIZE="134217728"
export CLASSPATH=$CLASSPATH:$(build-classpath antlr-bootstrap)
sh build.sh jars
#ant tests test
mkdir -p tools
pushd tools
ln -sf $(build-classpath xalan-j2-serializer) serializer.jar
ln -sf $(build-classpath xml-commons-apis) xml-apis.jar
ln -sf $(build-classpath xml-commons-resolver) resolver.jar
popd
# Build everything
export ANT_OPTS="-Xmx256m -Djava.awt.headless=true -Dbuild.sysclasspath=first -Ddisconnected=true"
ant -Djavac.source=1.6 -Djavac.target=1.6 \
-Dbuild.compiler=modern \
clean jars javadocs
%install
# jars
mkdir -p %{buildroot}%{_javadir}
cp -p build/xercesImpl.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# jar
install -dm 755 %{buildroot}%{_javadir}
install -pm 644 build/xercesImpl.jar %{buildroot}%{_javadir}/%{name}.jar
(cd %{buildroot}%{_javadir} && ln -s %{name}.jar jaxp_parser_impl.jar)
# pom
install -dm 755 %{buildroot}%{_mavenpomdir}
install -pm 644 %{SOURCE5} %{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar -a xerces:xerces,xerces:xmlParserAPIs,apache:xerces-j2
# javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}
mkdir -p %{buildroot}%{_javadocdir}/%{name}/impl
mkdir -p %{buildroot}%{_javadocdir}/%{name}/xs
mkdir -p %{buildroot}%{_javadocdir}/%{name}/xni
mkdir -p %{buildroot}%{_javadocdir}/%{name}/other
cp -pr build/docs/javadocs/xerces2/* %{buildroot}%{_javadocdir}/%{name}/impl
cp -pr build/docs/javadocs/api/* %{buildroot}%{_javadocdir}/%{name}/xs
cp -pr build/docs/javadocs/xni/* %{buildroot}%{_javadocdir}/%{name}/xni
cp -pr build/docs/javadocs/other/* %{buildroot}%{_javadocdir}/%{name}/other
%fdupes -s %{buildroot}%{_javadocdir}
# scripts
mkdir -p %{buildroot}%{_bindir}
install -p -m 755 %{SOURCE2} %{buildroot}%{_bindir}/%{name}-version
install -p -m 755 %{SOURCE4} %{buildroot}%{_bindir}/%{name}-constants
# mans
install -pD -m755 -T %{SOURCE1} %{buildroot}%{_bindir}/%{name}-version
install -pD -m755 -T %{SOURCE2} %{buildroot}%{_bindir}/%{name}-constants
# manual pages
install -d -m 755 %{buildroot}%{_mandir}/man1
install -p -m 644 %{SOURCE3} %{buildroot}%{_mandir}/man1
install -p -m 644 %{SOURCE5} %{buildroot}%{_mandir}/man1
install -p -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1
# demo
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -p build/xercesSamples.jar \
%{buildroot}%{_datadir}/%{name}/%{name}-samples.jar
install -pD -T build/xercesSamples.jar %{buildroot}%{_datadir}/%{name}/%{name}-samples.jar
cp -pr data %{buildroot}%{_datadir}/%{name}
# alternatives
mkdir -p %{buildroot}%{_sysconfdir}/alternatives/
ln -sf %{_sysconfdir}/alternatives/jaxp_parser_impl.jar %{buildroot}%{_javadir}/jaxp_parser_impl.jar
%post
%{_sbindir}/update-alternatives --install %{_javadir}/jaxp_parser_impl.jar jaxp_parser_impl %{_javadir}/%{name}.jar 23
%{_sbindir}/update-alternatives --auto jaxp_parser_impl
%preun
if [ $1 = 0 ] ; then
%{_sbindir}/update-alternatives --remove jaxp_parser_impl %{_javadir}/%{name}.jar
fi
update-alternatives --remove jaxp_parser_impl %{_javadir}/%{name}.jar >/dev/null 2>&1 || :
# it deletes the link, set it up again
ln -sf %{name}.jar %{_javadir}/jaxp_parser_impl.jar
%files
%doc LICENSE README
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{name}.jar
%{_javadir}/jaxp_parser_impl.jar
%ghost %{_sysconfdir}/alternatives/jaxp_parser_impl.jar
%license LICENSE
%doc NOTICE README
%{_bindir}/*
%{_javadir}/*
%{_mandir}/*/*
%{_mavenpomdir}/*
%if %{defined _maven_repository}
%{_mavendepmapfragdir}/%{name}
%else
%{_datadir}/maven-metadata/%{name}.xml*
%endif
%files javadoc
%{_javadocdir}/%{name}
%files demo
%{_datadir}/%{name}
%files scripts
%{_bindir}/*
%{_mandir}/man1/*
%changelog

53
xercesImpl-2.12.0.pom Normal file
View File

@ -0,0 +1,53 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<name>Xerces2-j</name>
<modelVersion>4.0.0</modelVersion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.0</version>
<description>
Xerces2 is the next generation of high performance, fully compliant XML parsers in the Apache Xerces family. This new version of Xerces introduces the Xerces Native Interface (XNI), a complete framework for building parser components and configurations that is extremely modular and easy to program.
The Apache Xerces2 parser is the reference implementation of XNI but other parser components, configurations, and parsers can be written using the Xerces Native Interface. For complete design and implementation documents, refer to the XNI Manual.
Xerces2 is a fully conforming XML Schema 1.0 processor. A partial experimental implementation of the XML Schema 1.1 Structures and Datatypes Working Drafts (December 2009) and an experimental implementation of the XML Schema Definition Language (XSD): Component Designators (SCD) Candidate Recommendation (January 2010) are provided for evaluation. For more information, refer to the XML Schema page.
Xerces2 also provides a complete implementation of the Document Object Model Level 3 Core and Load/Save W3C Recommendations and provides a complete implementation of the XML Inclusions (XInclude) W3C Recommendation. It also provides support for OASIS XML Catalogs v1.1.
Xerces2 is able to parse documents written according to the XML 1.1 Recommendation, except that it does not yet provide an option to enable normalization checking as described in section 2.13 of this specification. It also handles namespaces according to the XML Namespaces 1.1 Recommendation, and will correctly serialize XML 1.1 documents if the DOM level 3 load/save APIs are in use.
</description>
<url>https://xerces.apache.org/xerces2-j/</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://svn.apache.org/repos/asf/xerces/java/</url>
<connection>https://svn.apache.org/repos/asf/xerces/java/tags/Xerces-J_2_12_0/</connection>
</scm>
<dependencies>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
<dependency>
<groupId>xml-resolver</groupId>
<artifactId>xml-resolver</artifactId>
<version>1.2</version>
<optional>true</optional>
</dependency>
</dependencies>
<developers>
<developer>
<id>xerces</id>
<name>Apache Software Foundation</name>
<email>j-dev@xerces.apache.org</email>
<url>http://www.apache.org</url>
<organization>Apache Software Foundation</organization>
<organizationUrl>http://www.apache.org</organizationUrl>
</developer>
</developers>
</project>