update to 8.7.3 [release 8.7.3-1mamba;Fri Aug 19 2022]

This commit is contained in:
Silvan Calarco 2024-01-06 00:11:27 +01:00
parent e87a58abe6
commit 6153ff920a
7 changed files with 30 additions and 704 deletions

View File

@ -1,19 +1,4 @@
# java-saxon8 # java-saxon8
The SAXON package is a collection of tools for processing XML documents. The SAXON package is a collection of tools for processing XML documents.
The main components are:
- An XSLT processor, which implements the Version 1.0 XSLT and XPath
Recommendations from the World Wide Web Consortium, found at
http://www.w3.org/TR/1999/REC-xslt-19991116 and
http://www.w3.org/TR/1999/REC-xpath-19991116 with a number of powerful
extensions. This version of Saxon also includes many of the new features
defined in the XSLT 1.1 working draft, but for conformance and portability
reasons these are not available if the stylesheet header specifies
version="1.0".
- A Java library, which supports a similar processing model to XSL, but allows
full programming capability, which you need if you want to perform complex
processing of the data or to access external services such as a relational
database.
So you can use SAXON with any SAX-compliant XML parser by writing XSLT
stylesheets, by writing Java applications, or by any combination of the two.

View File

@ -1,148 +0,0 @@
.\" Kudos to: xsltproc(1), help2man,
.\" http://www.saxonica.com/documentation/using-xsl/commandline.html
.TH SAXON8 "1" "March 2006" "8.7" "User Commands"
.SH NAME
saxon8 \- manual page for saxon8
.SH SYNOPSIS
.B saxon8
[\fIoptions\fR] \fIsource-document stylesheet \fR[ \fIparams\fR...]
.SH DESCRIPTION
saxon8 applies a given stylesheet to a given source XML document.
.SH OPTIONS
For a schema\-aware transformation, specify the option \fB\-sa\fR, or (on the Java platform only) use the alternate entry point com.saxonica.Transform. For more details see Schema\-Aware Transformations.
.TP
The options must come first, then the two file names, then the params. The stylesheet is omitted if the \fB\-a\fR option is present.
.TP
The options are as follows (in any order):
.TP
\fB\-a\fR
Use the xml\-stylesheet processing instruction in the source document to identify the stylesheet to be used. The stylesheet argument should be omitted.
.TP
\fB\-c\fR
Indicates that the stylesheet argument identifies a compiled stylesheet rather than an XML source stylesheet. The stylesheet must have been previously compiled as described in Compiling a Stylesheet.
.TP
\fB\-cr\fR classname
Use the specified CollectionURIResolver to process collection URIs passed to the collection() function. The CollectionURIResolver is a user\-defined class that implements the net.sf.saxon.CollectionURIResolver interface.
.TP
\fB\-ds\fR | \fB\-dt\fR
Selects the implementation of the internal tree model. \fB\-dt\fR selects the tiny tree model (the default). \fB\-ds\fR selects the linked tree model. See Choosing a tree model.
.TP
\fB\-im\fR modename
Selects the initial mode for the transformation. If this is namespaced, it can be written as {uri}localname
.TP
\fB\-it\fR template
Selects the initial named template to be executed. If this is namespaced, it can be written as {uri}localname. When this option is used, the source file should be omitted.
.TP
\fB\-l\fR
Switches line numbering on for the source document. Line numbers are accessible through the extension function saxon:line\-number(), or from a trace listener.
.TP
\fB\-m\fR classname
Use the specified Emitter to process the output from xsl:message. The class must implement the net.sf.saxon.output.Emitter class. This interface is similar to a SAX ContentHandler, it takes a stream of events to generate output. In general the content of a message is an XML fragment. By default the standard XML emitter is used, configured to write to the standard error stream, and to include no XML declaration. Each message is output as a new document.
.TP
\fB\-noext\fR
Suppress calls on extension functions, other than system\-supplied Saxon and EXSLT extension functions. This option is useful when loading an untrusted stylesheet, perhaps from a remote site using an http:// URL; it ensures that the stylesheet cannot call Java methods and thereby gain privileged access to resources on your machine.
.TP
\fB\-novw\fR
No version warnings. This suppresses the warning message that is normally issued (as required by the W3C specification) when running an XSLT 2.0 processor against a stylesheet that specifies version=1.0.
.TP
\fB\-o\fR filename
Send output to named file. In the absence of this option, the results go to standard output. If the source argument identifies a directory, this option is mandatory and must also identify a directory; on completion it will contain one output file for each file in the source directory. If the stylesheet writes secondary output files using the xsl:result\-document instruction; this filename acts as the base URI for the href attribute of this instruction. In the absence of this option, secondary output files are written relative to the current working directory.
.TP
\fB\-p\fR
Use the PTreeURIResolver. This option is available in Saxon\-SA only. It cannot be used in conjunction with the \fB\-r\fR option, and it automatically switches on the \fB\-u\fR and \fB\-sa\fR options. The effect is twofold. Firstly, Saxon\-specific file extensions are recognized in URIs (including the URI of the source document on the command line). Currently the only Saxon\-specific file extension is .ptree, which indicates that the source document is supplied in the form of a Saxon PTree. This is a binary representation of an XML document, designed for speed of loading. Secondly, Saxon\-specific query parameters are recognized in a URI. Currently the only query parameter that is recognized is val. This may take the values strict, lax, or strip. For example, source.xml?val=strict loads a document with strict schema validation.
.TP
\fB\-r\fR classname
Use the specified URIResolver to process all URIs. The URIResolver is a user\-defined class, that extends the net.sf.saxon.URIResolver class, whose function is to take a URI supplied as a string, and return a SAX InputSource. It is invoked to process URIs used in the document() function, in the xsl:include and xsl:import elements, and (if \fB\-u\fR is also specified) to process the URIs of the source file and stylesheet file provided on the command line.
.TP
\fB\-sa\fR
Invoke a schema\-aware transformation. Requires Saxon\-SA to be installed.
.TP
\fB\-sall\fR
Strips all whitespace text nodes from source documents before any further processing, regardless of any xsl:strip\-space declarations in the stylesheet, or any xml:space attributes in the source document.
.TP
\fB\-signorable\fR
Strips all ignorable whitespace text nodes from source documents before any further processing, regardless of any xsl:strip\-space declarations in the stylesheet, or any xml:space attributes in the source document. Whitespace text nodes are ignorable if they appear in elements defined in the DTD or schema as having element\-only content.
.TP
\fB\-snone\fR
Strips no whitespace before further processing. (However, whitespace will still be stripped if this is specified in the stylesheet using xsl:strip\-space).
.TP
\fB\-t\fR
Display version and timing information to the standard error output. The output also traces the files that are read and writing, and extension modules that are loaded.
.TP
\fB\-T\fR
Display stylesheet tracing information to the standard error output. This traces execution of each instruction in the stylesheet, so the output can be quite voluminous. Also switches line numbering on for the source document.
.TP
\fB\-TJ\fR
Switches on tracing of the binding of calls to external Java methods. This is useful when analyzing why Saxon fails to find a Java method to match an extension function call in the stylesheet, or why it chooses one method over another when several are available.
.TP
\fB\-TL\fR classname
Run the stylesheet using the specified TraceListener. The classname names a user\-defined class, which must implement net.sf.saxon.trace.TraceListener
.TP
\fB\-TP\fR
Run the stylesheet using the TraceListener TimedTraceListener. This creates an output file giving timings for each instruction executed. This output file can subsequently be analyzed to give an execution time profile for the stylesheet. See Performance Analysis.
.TP
\fB\-u\fR
Indicates that the names of the source document and the style document are URLs; otherwise they are taken as filenames, unless they start with http: or file:, in which case they are taken as URLs
.TP
\fB\-v\fR
Requests DTD\-based validation of the source file and of any files read using the document() function. Requires an XML parser that supports validation.
.TP
\fB\-val\fR
Requests schema\-based validation of the source file and of any files read using the document() function. This option is available only with Saxon\-SA, and it automatically switches on the \fB\-sa\fR option.
.TP
\fB\-vlax\fR
This option is available only with Saxon\-SA, and it automatically switches on the \fB\-sa\fR option. It requests lax validation of source documents using an XML Schema. That is, the document will be validated if a suitable schema is available, and will not be validated otherwise.
.TP
\fB\-vw\fR
Indicates that validation errors found when validating the result tree should be treated as warnings only. This option is available only with the Saxon\-SA version of the command, com.saxonica.Transform.
.TP
\fB\-w0\fR, w1, or w2
Indicates the policy for handling recoverable errors in the stylesheet: w0 means recover silently, w1 means recover after writing a warning message to the system error output, w2 means signal the error and do not attempt recovery. (Note, this does not currently apply to all errors that the XSLT recommendation describes as recoverable). The default is w1.
.TP
\fB\-x\fR classname
Use specified SAX parser for source file and any files loaded using the document() function. The parser must be the fully\-qualified class name of a Java class that implements the org.xml.sax.Parser or org.xml.sax.XMLReader interface
.TP
\fB\-y\fR classname
Use specified SAX parser for stylesheet file, including any loaded using xsl:include or xsl:import. The parser must be the fully\-qualified class name of a Java class that implements the org.xml.sax.Parser or org.xml.sax.XMLReader interface
.TP
\fB\-1\fR.1
Allow XML 1.1 and XML Namespaces 1.1 constructs. This option must be set if source documents using XML 1.1 are to be read, or if result documents are to be serialized as XML 1.1. This option also enables use of XML 1.1 constructs within the stylesheet itself.
.TP
\-?
Display command syntax
.TP
source\-document
Identifies the source file or directory. Mandatory. If this is a directory, all the files in the directory will be processed individually. In this case the \fB\-o\fR option is mandatory, and must also identify a directory, to contain the corresponding output files. A directory must be specified as a filename, not as a URL. The source\-document can be specified as \- to take the source from standard input.
.TP
stylesheet
Identifies the stylesheet. Mandatory unless the \fB\-a\fR option is used. If the \fB\-c\fR option is used, this argument identifies a compiled stylesheet. The stylesheet argument can be specified as \- to read the stylesheet from standard input.
A param takes the form name=value, name being the name of the parameter, and value the value of the parameter. These parameters are accessible within the stylesheet as normal variables, using the syntax, provided they are declared using a top\-level xsl:param element. If there is no such declaration, the supplied parameter value is silently ignored. If the xsl:param element has an as attribute indicating the required type, then the string value supplied on the command line is cast to this type: this may result in an error, for example if an integer is required and the supplied value cannot be converted to an integer.
.TP
A param preceded by a leading exclamation mark (!) is interpreted as an output parameter. For example, !indent=yes requests indented output. This is equivalent to specifying the attribute indent=yes on an xsl:output declaration in the stylesheet. An output parameter specified on the command line overrides one specified within the stylesheet.
.TP
A param preceded by a leading plus sign (+) is interpreted as a filename or directory. The content of the file is parsed as XML, and the resulting document node is passed to the stylesheet as the value of the parameter. If the parameter value is a directory, then all the immediately contained files are parsed as XML, and the resulting sequence of document nodes is passed as the value of the parameter. For example, +lookup=lookup.xml sets the value of the stylesheet parameter lookup to the document node at the root of the tree representing the parsed contents of the file lookup.xml.
.TP
Under Windows, and some other operating systems, it is possible to supply a value containing spaces by enclosing it in double quotes, for example name=John Smith. This is a feature of the operating system shell, not something Saxon does, so it may not work the same way under every operating system. (In the jEdit console plugin it has to be written as name=John Smith)
.TP
If the parameter name is in a non\-null namespace, the parameter can be given a value using the syntax {uri}localname=value. Here uri is the namespace URI of the parameter's name, and localname is the local part of the name.
.TP
This applies also to output parameters. For example, you can set the indentation level to 4 by using the parameter !{http://saxon.sf.net/}indent\-spaces=4. See also Additional attributes for xsl:output.
.TP
If the \fB\-a\fR option is used, the name of the stylesheet is omitted. The source document must contain a <?xml\-stylesheet?> processing instruction before the first element start tag; this processing instruction must have a pseudo\-attribute href that identifies the relative or absolute URL of the stylsheet document, and a pseudo\-attribute type whose value is text/xml, application/xml, or text/xsl. For example:
.TP
<?xml\-stylesheet type=text/xsl href=../style3.xsl ?>
.TP
It is also possible to refer to a stylesheet embedded within the source document, provided it has an id attribute and the id attribute is declared in the DTD as being of type ID.
.SH FILES
.B __RESOLVERDIR__/CatalogManager.properties
.RS
The central catalog manager configuration file used by \fBsaxon\fR
for resolving XML entities and URIs if xml-commons-resolver is
available.
.SH "SEE ALSO"
.BR xsltproc (1)
.SH AUTHOR
Michael H. Kay <mike@saxonica.com>

View File

@ -1,107 +0,0 @@
<!-- simple generic build file -->
<project name="saxon" default="all" basedir=".">
<!-- Properties -->
<property name="name" value="saxon8"/>
<property name="src" value="src"/>
<property name="build" value="build"/>
<property name="build.classes" value="${build}/classes"/>
<property name="build.doc" value="${build}/api"/>
<property name="build.lib" value="${build}/lib"/>
<property name="j2se.javadoc" value="/usr/share/javadoc/j2se"/>
<property name="jdom.javadoc" value="/usr/share/javadoc/jdom"/>
<property name="fop.javadoc" value="/usr/share/javadoc/fop"/>
<!-- Targets -->
<!-- Prepare build directories -->
<target name="prepare">
<mkdir dir="${src}"/>
<mkdir dir="${build}"/>
<mkdir dir="${build.classes}"/>
<mkdir dir="${build.lib}"/>
<mkdir dir="${build.doc}"/>
<copy todir="${src}">
<fileset dir="." includes="com/**,org/**"/>
</copy>
</target>
<!-- Kill all the created directories -->
<target name="clean">
<delete dir="${build}"/>
<delete dir="${src}"/>
</target>
<!-- Build classes -->
<target name="classes" depends="prepare">
<javac srcdir="${src}" destdir="${build.classes}"/>
</target>
<!-- Build jar archives -->
<!--
3118502 11-22-05 14:03 saxon8.jar
43963 11-22-05 14:03 saxon8-dom.jar
14206 11-22-05 14:03 saxon8-jdom.jar
14720 11-22-05 14:03 saxon8-sql.jar
16776 11-22-05 14:03 saxon8-xom.jar
37925 11-22-05 14:03 saxon8-xpath.jar
-->
<target name="jar" depends="classes">
<!-- dom -->
<jar destfile="${build.lib}/${name}-dom.jar"
basedir="${build.classes}"
includes="net/sf/saxon/dom/*"/>
<!-- jdom -->
<jar destfile="${build.lib}/${name}-jdom.jar"
basedir="${build.classes}"
includes="net/sf/saxon/jdom/*"/>
<!-- sql -->
<jar destfile="${build.lib}/${name}-sql.jar"
basedir="${build.classes}"
includes="net/sf/saxon/sql/*"/>
<!-- xom -->
<jar destfile="${build.lib}/${name}-xom.jar"
basedir="${build.classes}"
includes="net/sf/saxon/xom/*"/>
<!-- xpath -->
<jar destfile="${build.lib}/${name}-xpath.jar"
basedir="${build.classes}"
includes="net/sf/saxon/xpath/*">
<metainf dir="src/META-INF"
includes="services/javax.xml.xpath.*" />
</jar>
<!-- main -->
<jar jarfile="${build.lib}/${name}.jar"
basedir="${build.classes}"
excludes="net/sf/saxon/xom/,net/sf/saxon/xpath/,net/sf/saxon/sql/,net/sf/saxon/dom/,net/sf/saxon/jdom/">
<metainf dir="src/META-INF"
includes="services/javax.xml.transform.*" />
<manifest>
<attribute name="Main-Class" value="net.sf.saxon.Transform" />
</manifest>
</jar>
</target>
<!-- Build the full JavaDocs -->
<target name="javadoc" depends="prepare">
<javadoc sourcepath="${src}"
destdir="${build.doc}"
doctitle="${name} JavaDoc"
windowtitle="${name} JavaDoc"
package="true"
author="true"
version="true"
packagenames="net.sf.saxon.*,org.w3c.xsl.*"
>
<link href="${j2se.javadoc}"/>
<link href="${jdom.javadoc}"/>
<link href="${fop.javadoc}"/>
</javadoc>
</target>
<!-- Build everything -->
<target name="all" depends="jar,javadoc"/>
</project>

View File

@ -1,41 +0,0 @@
#!/bin/sh
#
# saxon script
# JPackage Project <http://www.jpackage.org/>
. /usr/share/java-utils/java-functions
MAIN_CLASS=net.sf.saxon.Transform
BASE_JARS="saxon8.jar xml-commons-apis.jar xerces-j2.jar bea-stax-api.jar bea-stax-ri.jar"
# Optional jars
CLASSPATH="$CLASSPATH:"$(build-classpath docbook-xsl-saxon \
excalibur/avalon-logkit xml-commons-resolver 2>/dev/null) || :
# If we have resolver, add the CatalogManager.properties dir to CLASSPATH,
# and tweak command line options so that it's used.
args=
if echo "$CLASSPATH" | grep xml-commons-resolver >/dev/null 2>&1 ; then
CLASSPATH="$CLASSPATH:__RESOLVERDIR__"
# Tune options to use resolver.
r=org.apache.xml.resolver.tools.ResolvingXMLReader
for opt in -x -y ; do
if ! echo $@ | grep "\\$opt " >/dev/null 2>&1 ; then
args="$args $opt $r"
fi
done
r=org.apache.xml.resolver.tools.CatalogResolver
if ! echo $@ | grep "\\-r " >/dev/null 2>&1 ; then
args="$args -r $r"
fi
fi
# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS
# Let's start
run $args "$@"

View File

@ -1,41 +0,0 @@
#!/bin/sh
#
# saxon script
# JPackage Project <http://www.jpackage.org/>
. /usr/share/java-utils/java-functions
MAIN_CLASS=net.sf.saxon.Query
BASE_JARS="saxon8.jar xml-commons-apis.jar xerces-j2.jar bea-stax-api.jar bea-stax-ri.jar"
# Optional jars
CLASSPATH="$CLASSPATH:"$(build-classpath docbook-xsl-saxon \
excalibur/avalon-logkit xml-commons-resolver 2>/dev/null) || :
# If we have resolver, add the CatalogManager.properties dir to CLASSPATH,
# and tweak command line options so that it's used.
args=
if echo "$CLASSPATH" | grep xml-commons-resolver >/dev/null 2>&1 ; then
CLASSPATH="$CLASSPATH:__RESOLVERDIR__"
# Tune options to use resolver.
r=org.apache.xml.resolver.tools.ResolvingXMLReader
for opt in -x -y ; do
if ! echo $@ | grep "\\$opt " >/dev/null 2>&1 ; then
args="$args $opt $r"
fi
done
r=org.apache.xml.resolver.tools.CatalogResolver
if ! echo $@ | grep "\\-r " >/dev/null 2>&1 ; then
args="$args -r $r"
fi
fi
# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS
# Let's start
run $args "$@"

View File

@ -1,216 +1,58 @@
%define pkgver %(echo %version | tr . -) %define pkgver %(echo %version | tr . -)
%define javahome /usr/lib/jvm/java
Name: java-saxon8 Name: java-saxon8
Version: 8.7 Version: 8.7.3
Release: 3mamba Release: 1mamba
Summary: Java XSLT processor Summary: Java XSLT processor
Group: Development/Libraries/Java Group: Development/Libraries/Java
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: gil <puntogil@libero.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://saxon.sourceforge.net URL: http://saxon.sourceforge.net
# wget http://download.sf.net/saxon/saxon-resources8-7.zip Source0: https://sourceforge.net/projects/saxon/files/Saxon-B/%{version}/saxonb%{pkgver}j.zip
Source0: saxon-resources%{pkgver}.zip
Source1: java-saxon8.saxon.script
Source2: java-saxon8.saxonq.script
Source3: java-saxon8.build.script
Source4: java-saxon8.1
Source5: java-saxon8q.1
License: MPL License: MPL
BuildRequires: apache-ant ## AUTOBUILDREQ-BEGIN
BuildRequires: apache-fop == 0.95 ## AUTOBUILDREQ-END
BuildRequires: apache-fop-javadoc == 0.95 BuildRequires: javapackages
BuildRequires: java-bea-stax Requires: javapackages
BuildRequires: java-bea-stax-api Provides: java-saxon8-dom
BuildRequires: java-dom Obsoletes: java-saxon8-dom <= 8.7-3mamba
BuildRequires: java-dom-javadoc Provides: java-saxon8-jdom
BuildRequires: java-dom4j Obsoletes: java-saxon8-jdom <= 8.7-3mamba
BuildRequires: java-xom Provides: java-saxon8-sql
BuildRequires: jpackage-utils Obsoletes: java-saxon8-sql <= 8.7-3mamba
BuildRequires: java-openjdk Provides: java-saxon8-xom
BuildRequires: java-openjdk-javadoc Obsoletes: java-saxon8-xom <= 8.7-3mamba
BuildRequires: xml-commons-apis Provides: java-saxon8-xpath
Requires: java-bea-stax Obsoletes: java-saxon8-xpath <= 8.7-3mamba
Requires: java-bea-stax-api
Requires: java-dom
Requires: java-dom4j
Requires: jpackage-utils
Requires: xml-commons-apis
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
The SAXON package is a collection of tools for processing XML documents. The SAXON package is a collection of tools for processing XML documents.
The main components are:
- An XSLT processor, which implements the Version 1.0 XSLT and XPath
Recommendations from the World Wide Web Consortium, found at
http://www.w3.org/TR/1999/REC-xslt-19991116 and
http://www.w3.org/TR/1999/REC-xpath-19991116 with a number of powerful
extensions. This version of Saxon also includes many of the new features
defined in the XSLT 1.1 working draft, but for conformance and portability
reasons these are not available if the stylesheet header specifies
version="1.0".
- A Java library, which supports a similar processing model to XSL, but allows
full programming capability, which you need if you want to perform complex
processing of the data or to access external services such as a relational
database.
So you can use SAXON with any SAX-compliant XML parser by writing XSLT
stylesheets, by writing Java applications, or by any combination of the two.
%package scripts
Group: Applications/Publishing
Summary: Utility scripts for %{name}
Requires: jpackage-utils
Requires: %{name} = %{version}-%{release}
%description scripts
The SAXON package is a collection of tools for processing XML documents.
This package contains utility scripts for %{name}.
%package dom
Summary: DOM support for %{name}
Group: Applications/Publishing
Requires: %{name} = %{version}-%{release}
%description dom
The SAXON package is a collection of tools for processing XML documents.
Provides additional classes enabling Saxon to be used with
the DOM Document Object Model. Supports using a DOM as the
input or output of transformations and queries, and calling
extension functions that use DOM interfaces to access a
Saxon tree structure. Requires DOM level 3 (dom.jar, part
of JAXP 1.3) to be on the classpath, if not running under
JDK 1.5.
%package jdom
Group: Development/Libraries/Java
Summary: JDOM support for %{name}
Requires: java-dom
Requires: %{name} = %{version}-%{release}
%description jdom
The SAXON package is a collection of tools for processing XML documents.
This package contains JDOM support for %{name}.
%package sql
Summary: SQL support for %{name}
Group: Applications/Publishing
Requires: %{name} = %{version}-%{release}
%description sql
The SAXON package is a collection of tools for processing XML documents.
This package contains supports XSLT extensions for accessing and updating a
relational database from within a stylesheet.
%package xom
Summary: XOM support for %{name}
Group: Applications/Publishing
Requires: %{name} = %{version}-%{release}
Requires: java-xom
%description xom
The SAXON package is a collection of tools for processing XML documents.
Provides additional classes enabling Saxon to be used with
XOM trees. Supports using a XOM document as the input or
output of transformations and queries. Requires xom.jar on
the classpath.
%package xpath
Summary: XPATH support for %{name}
Group: Applications/Publishing
Requires: %{name} = %{version}-%{release}
%description xpath
The SAXON package is a collection of tools for processing XML documents.
Provides support for the JAXP 1.3 XPath API. Requires the
JAXP 1.3 version of jaxp-api.jar on the classpath, if not
running under JDK 1.5.
%package demo
Group: Documentation
Summary: Demos for %{name}
Requires: %{name} = %{version}-%{release}
%description demo
The SAXON package is a collection of tools for processing XML documents.
This package contains demonstrations and samples for %{name}.
%package manual
Group: Documentation
Summary: Manual for %{name}
%description manual
The SAXON package is a collection of tools for processing XML documents.
This package contains manual for %{name}.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
Requires: java-dom-javadoc
%description javadoc
The SAXON package is a collection of tools for processing XML documents.
This package contains javadoc for %{name}
%prep %prep
%setup -q -c %{name}-%{version} %setup -q -c %{name}-%{version}
for j in $(find -name "*.jar"); do
mv $j $j.no
done
find -name "*.exe" -exec rm -rf {} \;
mkdir src
(
cd src
unzip -q ../source.zip
find . -name CVS -exec rm -rf {} \;
rm -rf net/sf/saxon/dotnet/
)
cp -p %{S:3} ./build.xml
rm -rf docs/api
mkdir -p build/classes
%build %build
export JAVA_HOME=%javahome
export CLASSPATH=$(build-classpath xml-commons-jaxp-1.3-apis xom fop jdom dom4j bea-stax-ri bea-stax-api)
ant \
-Dj2se.javadoc=%{_javadocdir}/java \
-Dfop.javadoc=%{_javadocdir}/fop \
-Djdom.javadoc=%{_javadocdir}/jdom
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir} mkdir -p %{buildroot}%{_javadir}
install -pm 644 build/lib/saxon8.jar \ install -pm 644 saxon8.jar \
%{buildroot}%{_javadir}/saxon8-%{version}.jar %{buildroot}%{_javadir}/saxon8-%{version}.jar
install -pm 644 build/lib/saxon8-xpath.jar \ install -pm 644 saxon8-xpath.jar \
%{buildroot}%{_javadir}/saxon8-xpath-%{version}.jar %{buildroot}%{_javadir}/saxon8-xpath-%{version}.jar
install -pm 644 build/lib/saxon8-dom.jar \ install -pm 644 saxon8-dom.jar \
%{buildroot}%{_javadir}/saxon8-dom-%{version}.jar %{buildroot}%{_javadir}/saxon8-dom-%{version}.jar
install -pm 644 build/lib/saxon8-jdom.jar \ install -pm 644 saxon8-jdom.jar \
%{buildroot}%{_javadir}/saxon8-jdom-%{version}.jar %{buildroot}%{_javadir}/saxon8-jdom-%{version}.jar
install -pm 644 build/lib/saxon8-xom.jar \ install -pm 644 saxon8-xom.jar \
%{buildroot}%{_javadir}/saxon8-xom-%{version}.jar %{buildroot}%{_javadir}/saxon8-xom-%{version}.jar
install -pm 644 build/lib/saxon8-sql.jar \ install -pm 644 saxon8-sql.jar \
%{buildroot}%{_javadir}/saxon8-sql-%{version}.jar %{buildroot}%{_javadir}/saxon8-sql-%{version}.jar
( (
@ -220,28 +62,6 @@ install -pm 644 build/lib/saxon8-sql.jar \
done done
) )
mkdir -p %{buildroot}%{_javadocdir}/saxon8-%{version}
cp -pr build/api/* %{buildroot}%{_javadocdir}/saxon8-%{version}
ln -s saxon8-%{version} %{buildroot}%{_javadocdir}/saxon8
mkdir -p %{buildroot}%{_datadir}/saxon8
cp -pr samples/* %{buildroot}%{_datadir}/saxon8
mkdir -p %{buildroot}%{_bindir}
sed 's,__RESOLVERDIR__,%{_sysconfdir}/java/resolver,' < %{S:1} > %{buildroot}%{_bindir}/saxon8
sed 's,__RESOLVERDIR__,%{_sysconfdir}/java/resolver,' < %{S:2} > %{buildroot}%{_bindir}/saxon8q
mkdir -p %{buildroot}%{_mandir}/man1
sed 's,__RESOLVERDIR__,%{_sysconfdir}/java/resolver,' < %{S:4} > %{buildroot}%{_mandir}/man1/saxon8.1
sed 's,__RESOLVERDIR__,%{_sysconfdir}/java/resolver,' < %{S:5} > %{buildroot}%{_mandir}/man1/saxon8q.1
ln -s %{_sysconfdir}/alternatives \
%{buildroot}%{_javadir}/jaxp_transform_impl.jar
for i in doc/*.html; do
tr -d \\r < $i > temp_file.html; mv temp_file.html $i
done
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -249,54 +69,24 @@ done
%defattr(-,root,root) %defattr(-,root,root)
%{_javadir}/saxon8-%{version}.jar %{_javadir}/saxon8-%{version}.jar
%{_javadir}/saxon8.jar %{_javadir}/saxon8.jar
%ghost %{_javadir}/jaxp_transform_impl.jar
%files scripts
%defattr(755,root,root,755)
%{_bindir}/saxon8
%{_bindir}/saxon8q
%{_mandir}/man1/saxon8.1.gz
%{_mandir}/man1/saxon8q.1.gz
%files dom
%defattr(-,root,root)
%{_javadir}/saxon8-dom-%{version}.jar %{_javadir}/saxon8-dom-%{version}.jar
%{_javadir}/saxon8-dom.jar %{_javadir}/saxon8-dom.jar
%files jdom
%defattr(-,root,root)
%{_javadir}/saxon8-jdom-%{version}.jar %{_javadir}/saxon8-jdom-%{version}.jar
%{_javadir}/saxon8-jdom.jar %{_javadir}/saxon8-jdom.jar
%files sql
%defattr(-,root,root)
%{_javadir}/saxon8-sql-%{version}.jar %{_javadir}/saxon8-sql-%{version}.jar
%{_javadir}/saxon8-sql.jar %{_javadir}/saxon8-sql.jar
%files xom
%defattr(-,root,root)
%{_javadir}/saxon8-xom-%{version}.jar %{_javadir}/saxon8-xom-%{version}.jar
%{_javadir}/saxon8-xom.jar %{_javadir}/saxon8-xom.jar
%files xpath
%defattr(-,root,root)
%{_javadir}/saxon8-xpath-%{version}.jar %{_javadir}/saxon8-xpath-%{version}.jar
%{_javadir}/saxon8-xpath.jar %{_javadir}/saxon8-xpath.jar
%files demo
%defattr(-,root,root)
%{_datadir}/saxon8
%files manual
%defattr(-,root,root)
%doc doc/*.html
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/saxon8-%{version}
%{_javadocdir}/saxon8
%changelog %changelog
* Fri Aug 19 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 8.7.3-1mamba
- update to 8.7.3
* Fri Aug 19 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 8.7-4mamba
- repackaged using upstream prebuild jars
* Thu Mar 24 2011 gil <puntogil@libero.it> 8.7-3mamba * Thu Mar 24 2011 gil <puntogil@libero.it> 8.7-3mamba
- rebuilt with java-openjdk support - rebuilt with java-openjdk support

View File

@ -1,112 +0,0 @@
.\" Kudos to: xsltproc(1), help2man,
.\" http://www.saxonica.com/documentation/using-xquery/commandline.html
.TH SAXON8Q "1" "March 2006" "8.7" "User Commands"
.SH NAME
saxon8q \- manual page for saxon8q
.SH SYNOPSIS
.B saxon8q
[\fIoptions\fR] \fIquery \fR[ \fIparams\fR...]
.SH DESCRIPTION
saxon8q runs a query contained in a file.
.SH OPTIONS
The options must come first, then the file name containing the query, then the params.
.TP
The options are as follows (in any order):
.TP
\fB\-cr\fR classname
Use the specified CollectionURIResolver to process collection URIs passed to the collection() function. The CollectionURIResolver is a user\-defined class that implements the net.sf.saxon.CollectionURIResolver interface.
.TP
\fB\-ds\fR
Use the linked tree model for source documents. See Choosing a Tree Model.
.TP
\fB\-dt\fR
Use the tinytree tree model for source documents. This is the default tree model. See Choosing a Tree Model.
.TP
\fB\-e\fR
Display a query execution plan. This is a representation of the expression tree after rewriting by the optimizer.
.TP
\fB\-l\fR
Causes line numbers to be maintained for source documents. These are accessible using the extension function saxon:line\-number(). Line numbers are useful when the purpose of the query is to find errors or anomalies in the source XML file. Without this option, line numbers are available while source documents are being parsed and validated, but they are not retained in the tree representation of the document.
.TP
\fB\-mr\fR classname
Use the specified ModuleURIResolver to process all query module URIs. The ModuleURIResolver is a user\-defined class that implements the net.sf.saxon.query.ModuleURIResolver interface. It is invoked to process URIs used in the import module declaration in the query prolog, and (if \fB\-u\fR is also specified, or if the file name begins with http: or file:) to process the URI of the query source file provided on the command line.
.TP
\fB\-noext\fR
Prevents the query calling external Java functions. This is useful for safety if the query is untrusted.
.TP
\fB\-o\fR filename
Send output to named file. In the absence of this option, the results go to standard output. The output format depends on whether the \fB\-wrap\fR option is present.
.TP
\fB\-p\fR
Use the PTreeURIResolver. This option is available in Saxon\-SA only. It cannot be used in conjunction with the \fB\-r\fR option, and it automatically switches on the \fB\-u\fR and \fB\-sa\fR options. The effect is twofold. Firstly, Saxon\-specific file extensions are recognized in URIs (including the URI of the source document on the command line). Currently the only Saxon\-specific file extension is .ptree, which indicates that the source document is supplied in the form of a Saxon PTree. This is a binary representation of an XML document, designed for speed of loading. Secondly, Saxon\-specific query parameters are recognized in a URI. Currently the only query parameter that is recognized is val. This may take the values strict, lax, or strip. For example, source.xml?validation=strict loads a document with strict schema validation.
.TP
\fB\-pull\fR
Execute query in pull mode. This may give performance advantages for certain kinds of query, especially queries that construct intermediate trees in memory.
.TP
\fB\-r\fR classname
Use the specified URIResolver to process all URIs. The URIResolver is a user\-defined class, that implements the URIResolver interface defined in JAXP, whose function is to take a URI supplied as a string, and return a SAX InputSource. It is invoked to process URIs used in the doc() function, and (if \fB\-u\fR is also specified) to process the URI of the source file provided on the command line.
.TP
\fB\-s\fR filename\-or\-URI
Take input from the specified file. If the \fB\-u\fR option is specified, or if the name begins with file: or http:, then the name is assumed to be a URI rather than a filename. This file must contain an XML document. The document node of the document is made available to the query as the context item. The source document can be specified as \- to take the source from standard input.
.TP
\fB\-sall\fR
Strips all whitespace text nodes from source documents before any further processing, regardless of any xml:space attributes in the source document.
.TP
\fB\-signorable\fR
Strips all ignorable whitespace text nodes from source documents before any further processing, regardless of any xml:space attributes in the source document. Whitespace text nodes are ignorable if they appear in elements defined in the DTD or schema as having element\-only content.
.TP
\fB\-snone\fR
Strips no whitespace before further processing.
.TP
\fB\-strip\fR
Equivalent to \fB\-sall\fR: retained for compatibility.
.TP
\fB\-t\fR
Display version and timing information to the standard error output. The output also traces the files that are read and written, and extension modules that are loaded.
.TP
\fB\-T\fR
Enable execution tracing. This will cause a trace of the query execution to be output to the standard error output. The events that are traced are currently function calls (entry and exit) and element construction.
.TP
\fB\-TJ\fR
Switches on tracing of the binding of calls to external Java methods. This is useful when analyzing why Saxon fails to find a Java method to match an extension function call in the stylesheet, or why it chooses one method over another when several are available.
.TP
\fB\-u\fR
Indicates that the name of the source document is a URI; otherwise it is taken as a filename, unless it starts with http: or file:, in which case they it is taken as a URL.
.TP
\fB\-v\fR
Indicates that source documents are to be parsed using a validating parser (this invokes DTD validation, not schema validation).
.TP
\fB\-val\fR
This option is available only with Saxon\-SA, and it automatically switches on the \fB\-sa\fR option. It requests strict validation of source documents using an XML Schema.
.TP
\fB\-vlax\fR
This option is available only with Saxon\-SA, and it automatically switches on the \fB\-sa\fR option. It requests lax validation of source documents using an XML Schema. That is, the document will be validated if a suitable schema is available, and will not be validated otherwise.
.TP
\fB\-vw\fR
Indicates that validation errors found when validating the result tree should be treated as warnings only. This option is available only with the Saxon\-SA version of the command, com.saxonica.Query.
.TP
\fB\-wrap\fR
Wraps the result sequence in an XML element structure that indicates the type of each node or atomic value in the query result. This format can handle any type of query result. In the absence of this option, the command effectively wraps a document{} constructor around the supplied query, so that the result is a single XML document, which is then serialized. This will fail if the query result includes constructs that cannot be added to a document node in this way, notably free\-standing attribute nodes.
.TP
\fB\-1\fR.1
Allow XML 1.1 and XML Namespaces 1.1 constructs. This option must be set if source documents using XML 1.1 are to be read, or if result documents are to be serialized as XML 1.1. This option also enables use of XML 1.1 constructs within the query itself.
.TP
\-?
Display command syntax
.TP
query Identifies the file containing the query. Mandatory. The argument can be specified as \- to read the query from standard input. The query can also be specified inline by enclosing it in curly braces (if it contains spaces, you will also need quotes outside the curly braces to keep the command line processor happy). For example java net.sf.saxon.Query {doc('a.xml')//p[1]} selects elements within the file a.xml in the current directory.
A param takes the form name=value, name being the name of the parameter, and value the value of the parameter. These parameters are accessible within the query as external variables, using the syntax, provided they are declared in the query prolog. If there is no such declaration, the supplied parameter value is silently ignored.
.PP
A param preceded by a leading plus sign (+) is interpreted as a filename or directory. The content of the file is parsed as XML, and the resulting document node is passed to the stylesheet as the value of the parameter. If the parameter value is a directory, then all the immediately contained files are parsed as XML, and the resulting sequence of document nodes is passed as the value of the parameter. For example, +lookup=lookup.xml sets the value of the external variable lookup to the document node at the root of the tree representing the parsed contents of the file lookup.xml.
.PP
A param preceded by a leading exclamation mark is interpreted as a serialization parameter. For example, !indent=yes requests indented output, and !encoding=iso\-8859\-1 requests that the serialized output be in ISO 8859/1 encoding. This is equivalent to specifying the option declaration declare option saxon:output indent=yes; or declare option saxon:output encoding=iso\-8859\-1; in the query prolog.
.PP
Under Windows, and some other operating systems, it is possible to supply a value containing spaces by enclosing it in double quotes, for example name=John Smith. This is a feature of the operating system shell, not something Saxon does, so it may not work the same way under every operating system.
.PP
If the parameter name is in a non\-null namespace, the parameter can be given a value using the syntax {uri}localname=value. Here uri is the namespace URI of the parameter's name, and localname is the local part of the name.
.PP
This applies also to output parameters. For example, you can set the indentation level to 4 by using the parameter !{http://saxon.sf.net/}indent\-spaces=4. For the extended set of output parameters supported by Saxon, see Additional serialization parameters.
.SH AUTHOR
Michael H. Kay <mike@saxonica.com>