OBS User unknown 2009-07-16 03:07:35 +00:00 committed by Git OBS Bridge
commit 3df6450669
16 changed files with 405 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

0
ready Normal file
View File

6
werken-xpath-0.9.4.pom Normal file
View File

@ -0,0 +1,6 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>werken-xpath</groupId>
<artifactId>werken-xpath</artifactId>
<version>0.9.4</version>
</project>

55
werken-xpath-Driver.patch Normal file
View File

@ -0,0 +1,55 @@
--- test/src/com/werken/xpath/test/Driver.java.sav 2000-11-09 18:43:30.000000000 +0100
+++ test/src/com/werken/xpath/test/Driver.java 2006-05-05 20:40:06.000000000 +0200
@@ -12,6 +12,7 @@
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;
import org.jdom.output.XMLOutputter;
+import org.jdom.output.Format;
import java.io.File;
import java.io.IOException;
@@ -98,6 +99,10 @@
{
e.printStackTrace();
}
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace();
+ }
System.out.println("================================================================================");
System.out.println("TEST SUMMARY");
@@ -150,6 +155,10 @@
{
e.printStackTrace();
}
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace();
+ }
if ( doc != null )
{
@@ -221,8 +230,11 @@
}
else
{
- XMLOutputter outputter = new XMLOutputter(" ", true);
-
+ XMLOutputter outputter = new XMLOutputter();
+ Format fmt = outputter.getFormat();
+ fmt.setIndent(" ");
+ fmt.setLineSeparator("\n");
+
try
{
@@ -412,7 +424,7 @@
elemID = "";
}
- resultNode.addAttribute("id", elemID);
+ resultNode.setAttribute("id", elemID);
node.addContent( resultNode );
results.addContent( node );
}

View File

@ -0,0 +1,17 @@
--- src/com/werken/xpath/ElementNamespaceContext.java.sav 2006-05-05 19:54:34.000000000 +0200
+++ src/com/werken/xpath/ElementNamespaceContext.java 2006-05-05 19:55:02.000000000 +0200
@@ -62,12 +62,12 @@
lineage.push(_element);
- Element elem = _element.getParent();
+ Element elem = (Element)_element.getParent();
while (elem != null)
{
lineage.push(elem);
- elem = elem.getParent();
+ elem = (Element)elem.getParent();
}
List nsList = null;

View File

@ -0,0 +1,22 @@
--- src/com/werken/xpath/impl/NodeTypeStep.java.sav 2006-05-05 20:09:00.000000000 +0200
+++ src/com/werken/xpath/impl/NodeTypeStep.java 2006-05-05 20:09:25.000000000 +0200
@@ -84,16 +84,16 @@
{
if ( isAbsolute() )
{
- results.addAll( applyToNodes( ((Element)node).getDocument().getMixedContent() ) );
+ results.addAll( applyToNodes( ((Element)node).getDocument().getContent() ) );
}
else
{
- results.addAll( applyToNodes( ((Element)node).getMixedContent() ) );
+ results.addAll( applyToNodes( ((Element)node).getContent() ) );
}
}
else if ( node instanceof Document )
{
- results.addAll( applyToNodes( ((Document)node).getMixedContent() ) );
+ results.addAll( applyToNodes( ((Document)node).getContent() ) );
}
return results;

View File

@ -0,0 +1,11 @@
--- src/com/werken/xpath/impl/ParentStep.java.sav 2006-05-05 20:01:17.000000000 +0200
+++ src/com/werken/xpath/impl/ParentStep.java 2006-05-05 20:02:17.000000000 +0200
@@ -50,7 +50,7 @@
if ( each instanceof Element )
{
- parent = ((Element)each).getParent();
+ parent = (Element)((Element)each).getParent();
if (parent != null)
{

View File

@ -0,0 +1,38 @@
--- src/com/werken/xpath/util/Partition.java.sav 2006-05-05 19:58:58.000000000 +0200
+++ src/com/werken/xpath/util/Partition.java 2006-05-05 19:59:29.000000000 +0200
@@ -67,7 +67,7 @@
public static List followingSiblings(Element node)
{
- Element parent = node.getParent();
+ Element parent = (Element)node.getParent();
if (parent == null)
{
@@ -95,7 +95,7 @@
public static List preceedingSiblings(Element node)
{
- Element parent = node.getParent();
+ Element parent = (Element)node.getParent();
if (parent == null)
{
@@ -137,7 +137,7 @@
results.addAll( Partition.descendants( each ) );
}
- Element parent = node.getParent();
+ Element parent = (Element)node.getParent();
if (parent != null)
{
@@ -170,7 +170,7 @@
results.addAll( Partition.descendants( each ) );
}
- Element parent = node.getParent();
+ Element parent = (Element)node.getParent();
if (parent != null)
{

View File

@ -0,0 +1,11 @@
--- src/com/werken/xpath/function/StringFunction.java.sav 2006-05-05 20:15:22.000000000 +0200
+++ src/com/werken/xpath/function/StringFunction.java 2006-05-05 20:15:34.000000000 +0200
@@ -71,7 +71,7 @@
public static String evaluate(Element elem)
{
- List content = elem.getMixedContent();
+ List content = elem.getContent();
Iterator contentIter = content.iterator();
Object each = null;

13
werken-xpath-Test.patch Normal file
View File

@ -0,0 +1,13 @@
--- src/com/werken/xpath/Test.java.sav 2006-05-05 20:17:22.000000000 +0200
+++ src/com/werken/xpath/Test.java 2006-05-05 20:18:22.000000000 +0200
@@ -61,6 +61,10 @@
{
jde.printStackTrace(System.err);
}
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace(System.err);
+ }
}

View File

@ -0,0 +1,47 @@
--- src/com/werken/xpath/impl/UnAbbrStep.java.sav 2000-10-31 21:20:56.000000000 +0100
+++ src/com/werken/xpath/impl/UnAbbrStep.java 2006-05-05 20:20:11.000000000 +0200
@@ -175,7 +175,7 @@
}
}
- return aggregateResults;;
+ return aggregateResults;
}
private List applyPredicates(List nodeSet,
@@ -227,7 +227,7 @@
if ( node instanceof Element )
{
- List children = ((Element)node).getMixedContent();
+ List children = ((Element)node).getContent();
results.addAll( applyTo( children,
support,
@@ -235,7 +235,7 @@
}
else if ( node instanceof Document )
{
- List children = ((Document)node).getMixedContent();
+ List children = ((Document)node).getContent();
results.addAll( applyTo( children,
support,
@@ -256,7 +256,7 @@
if ( node instanceof Element )
{
- List children = ((Element)node).getMixedContent();
+ List children = ((Element)node).getContent();
results.addAll( applyTo( children,
support,
@@ -264,7 +264,7 @@
}
else if ( node instanceof Document )
{
- List children = ((Document)node).getMixedContent();
+ List children = ((Document)node).getContent();
results.addAll( applyTo( children,
support,

View File

@ -0,0 +1,8 @@
--- runtests.sh.sav 2006-05-05 20:46:37.000000000 +0200
+++ runtests.sh 2006-05-05 20:46:54.000000000 +0200
@@ -11,4 +11,4 @@
CP=$ANTLR_CP:$JDOM_CP:$XPATH_CP:$TEST_CP:$XERCES_CP
-java -classpath $CP $TEST_DRIVER $TESTS_XML
+java -classpath $CLASSPATH $TEST_DRIVER $TESTS_XML

5
werken-xpath.changes Normal file
View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Wed Jun 3 16:51:20 CEST 2009 - mvyskocil@suse.cz
- Initial SUSE packaging from jpackage.org 5.0

145
werken-xpath.spec Normal file
View File

@ -0,0 +1,145 @@
#
# spec file for package werken-xpath (Version 0.9.4)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define dotname werken.xpath
%define section free
Name: werken-xpath
Version: 0.9.4
Release: 2
Summary: XPath implementation using JDOM
License: Apache Software License-like
Source0: %{dotname}-%{version}-beta-src.tar.bz2
Source1: %{name}-%{version}.pom
Patch0: %{name}-ElementNamespaceContext.patch
Patch1: %{name}-Partition.patch
Patch2: %{name}-ParentStep.patch
Patch3: %{name}-NodeTypeStep.patch
Patch4: %{name}-UnAbbrStep.patch
Patch5: %{name}-StringFunction.patch
Patch6: %{name}-Test.patch
Patch7: %{name}-Driver.patch
Patch8: %{name}-runtests_sh.patch
Url: http://sourceforge.net/projects/werken-xpath/
Requires: jdom
BuildRequires: ant >= 1.6
BuildRequires: antlr
BuildRequires: jdom
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
BuildRequires: jpackage-utils >= 1.7.2
Group: Development/Libraries/Java
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: werken.xpath = %{version}-%{release}
Obsoletes: werken.xpath <= 0.9.4
Requires(post): jpackage-utils >= 1.7.2
Requires(postun): jpackage-utils >= 1.7.2
%description
werken.xpath is an implementation of the W3C XPath Recommendation, on
top of the JDOM library. It takes as input a XPath expression, and a
JDOM tree, and returns a NodeSet (java.util.List) of selected
elements. Is is being used in the development of the
as-yet-unreleased werken.xslt (eXtensible Stylesheet Language) and the
werken.canonical (XML canonicalization) packages.
%package javadoc
License: Apache Software License-like
Summary: Javadoc for %{name}
Group: Development/Documentation
BuildRequires: java-javadoc
Requires(post): /bin/rm /bin/ln
Requires(postun): /bin/rm
Provides: werken.xpath-javadoc = %{version}-%{release}
Obsoletes: werken.xpath-javadoc <= 0.9.4
%description javadoc
werken.xpath is an implementation of the W3C XPath Recommendation, on
top of the JDOM library. It takes as input a XPath expression, and a
JDOM tree, and returns a NodeSet (java.util.List) of selected
elements. Is is being used in the development of the
as-yet-unreleased werken.xslt (eXtensible Stylesheet Language) and the
werken.canonical (XML canonicalization) packages.
%prep
%setup -q -n %{dotname}
%patch0 -b .sav
%patch1 -b .sav
%patch2 -b .sav
%patch3 -b .sav
%patch4 -b .sav
%patch5 -b .sav
%patch6 -b .sav
%patch7 -b .sav
%patch8 -b .sav
# remove all binary libs
for j in $(find . -name "*.jar"); do
mv $j $j.no
done
#pushd lib
#ln -sf $(build-classpath antlr) antlr-runtime.jar
#ln -sf $(build-classpath jdom) jdom.jar
#ln -sf $(build-classpath xerces-j2) xerces.jar
#popd
%build
export CLASSPATH=$(build-classpath jdom antlr xerces-j2 xml-commons-apis)
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 -Dbuild.compiler=modern package javadoc compile-test
# Note that you'll have to java in PATH for this to work, it is by default
# when using a JPackage JVM.
CLASSPATH=$CLASSPATH:build/werken.xpath.jar:build/test/classes
sh runtests.sh
%install
# jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}
cp -p build/%{dotname}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done
ln -sf %{name}.jar %{dotname}.jar)
# pom
mkdir -p $RPM_BUILD_ROOT%{_datadir}/maven2/default_poms
cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/maven2/default_poms/JPP-werken-xpath.pom
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%clean
rm -rf $RPM_BUILD_ROOT
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%defattr(0644,root,root,0755)
%doc INSTALL LICENSE LIMITATIONS README TODO
%{_javadir}/*
%{_datadir}/maven2/default_poms/*
%config %{_mavendepmapfragdir}
%dir %{_datadir}/maven2
%dir %{_datadir}/maven2/default_poms
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%changelog

BIN
werken.xpath-0.9.4-beta-src.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.