!1 package init

Merge pull request !1 from small_leek/master
This commit is contained in:
openeuler-ci-bot 2020-08-31 17:10:49 +08:00 committed by Gitee
commit 0072aa63a5
11 changed files with 1593 additions and 0 deletions

360
mpl-1.0.txt Normal file
View File

@ -0,0 +1,360 @@
MOZILLA PUBLIC LICENSE
Version 1.0
----------------
1. Definitions.
1.1. ``Contributor'' means each entity that creates or contributes to
the creation of Modifications.
1.2. ``Contributor Version'' means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. ``Covered Code'' means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. ``Electronic Distribution Mechanism'' means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. ``Executable'' means Covered Code in any form other than Source
Code.
1.6. ``Initial Developer'' means the individual or entity identified as
the Initial Developer in the Source Code notice required by Exhibit A.
1.7. ``Larger Work'' means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. ``License'' means this document.
1.9. ``Modifications'' means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. ``Original Code'' means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this License
is not already Covered Code governed by this License.
1.11. ``Source Code'' means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus any
associated interface definition files, scripts used to control
compilation and installation of an Executable, or a list of source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. ``You'' means an individual or a legal entity exercising rights
under, and complying with all of the terms of, this License or a future
version of this License issued under Section 6.1. For legal entities,
``You'' includes any entity which controls, is controlled by, or is
under common control with You. For purposes of this definition,
``control'' means (a) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (b) ownership of fifty percent (50%) or more of the
outstanding shares or beneficial ownership of such entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) to use, reproduce, modify, display, perform, sublicense and
distribute the Original Code (or portions thereof) with or without
Modifications, or as part of a Larger Work; and
(b) under patents now or hereafter owned or controlled by Initial
Developer, to make, have made, use and sell (``Utilize'') the
Original Code (or portions thereof), but solely to the extent that
any such patent is reasonably necessary to enable You to Utilize
the Original Code (or portions thereof) and not to any greater
extent that may be necessary to Utilize further Modifications or
combinations.
2.2. Contributor Grant.
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) to use, reproduce, modify, display, perform, sublicense and
distribute the Modifications created by such Contributor (or
portions thereof) either on an unmodified basis, with other
Modifications, as Covered Code or as part of a Larger Work; and
(b) under patents now or hereafter owned or controlled by
Contributor, to Utilize the Contributor Version (or portions
thereof), but solely to the extent that any such patent is
reasonably necessary to enable You to Utilize the Contributor
Version (or portions thereof), and not to any greater extent that
may be necessary to Utilize further Modifications or combinations.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be distributed
only under the terms of this License or a future version of this
License released under Section 6.1, and You must include a copy of this
License with every copy of the Source Code You distribute. You may not
offer or impose any terms on any Source Code version that alters or
restricts the applicable version of this License or the recipients'
rights hereunder. However, You may include an additional document
offering the additional rights described in Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which you contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that the
Modification is derived, directly or indirectly, from Original Code
provided by the Initial Developer and including the name of the Initial
Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If You have knowledge that a party claims an intellectual property
right in particular functionality or code (or its utilization
under this License), you must include a text file with the source
code distribution titled ``LEGAL'' which describes the claim and
the party making the claim in sufficient detail that a recipient
will know whom to contact. If you obtain such knowledge after You
make Your Modification available as described in Section 3.2, You
shall promptly modify the LEGAL file in all copies You make
available thereafter and shall take other steps (such as notifying
appropriate mailing lists or newsgroups) reasonably calculated to
inform those who received the Covered Code that new knowledge has
been obtained.
(b) Contributor APIs.
If Your Modification is an application programming interface and
You own or control patents which are reasonably necessary to
implement that API, you must also include this information in the
LEGAL file.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code, and this License in any documentation for the Source Code, where
You describe recipients' rights relating to Covered Code. If You
created one or more Modification(s), You may add your name as a
Contributor to the notice described in Exhibit A. If it is not possible
to put such notice in a particular Source Code file due to its
structure, then you must include such notice in a location (such as a
relevant directory file) where a user would be likely to look for such
a notice. You may choose to offer, and to charge a fee for, warranty,
support, indemnity or liability obligations to one or more recipients
of Covered Code. However, You may do so only on Your own behalf, and
not on behalf of the Initial Developer or any Contributor. You must
make it absolutely clear than any such warranty, support, indemnity or
liability obligation is offered by You alone, and You hereby agree to
indemnify the Initial Developer and every Contributor for any liability
incurred by the Initial Developer or such Contributor as a result of
warranty, support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of the
Covered Code is available under the terms of this License, including a
description of how and where You have fulfilled the obligations of
Section 3.2. The notice must be conspicuously included in any notice in
an Executable version, related documentation or collateral in which You
describe recipients' rights relating to the Covered Code. You may
distribute the Executable version of Covered Code under a license of
Your choice, which may contain terms different from this License,
provided that You are in compliance with the terms of this License and
that the license for the Executable version does not attempt to limit
or alter the recipient's rights in the Source Code version from the
rights set forth in this License. If You distribute the Executable
version under a different license You must make it absolutely clear
that any terms which differ from this License are offered by You alone,
not by the Initial Developer or any Contributor. You hereby agree to
indemnify the Initial Developer and every Contributor for any liability
incurred by the Initial Developer or such Contributor as a result of
any such terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to statute
or regulation then You must: (a) comply with the terms of this License
to the maximum extent possible; and (b) describe the limitations and
the code they affect. Such description must be included in the LEGAL
file described in Section 3.4 and must be included with all
distributions of the Source Code. Except to the extent prohibited by
statute or regulation, such description must be sufficiently detailed
for a recipient of ordinary skill to be able to understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A, and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation (``Netscape'') may publish revised
and/or new versions of the License from time to time. Each version will
be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If you create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), you must (a) rename Your license so that the
phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or
any confusingly similar phrase do not appear anywhere in your license
and (b) otherwise make it clear that your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial Developer,
Original Code or Contributor in the notice described in Exhibit A shall
not of themselves be deemed to be modifications of this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER
PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND
ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT
EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a ``commercial item,'' as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer
software'' and ``commercial computer software documentation,'' as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if any,
provides otherwise), excluding its conflict-of-law provisions. With
respect to disputes in which at least one party is a citizen of, or an
entity chartered or registered to do business in, the United States of
America: (a) unless otherwise agreed in writing, all disputes relating
to this License (excepting any dispute relating to intellectual
property rights) shall be subject to final and binding arbitration,
with the losing party paying all costs of arbitration; (b) any
arbitration relating to this Agreement shall be held in Santa Clara
County, California, under the auspices of JAMS/EndDispute; and (c) any
litigation relating to this Agreement shall be subject to the
jurisdiction of the Federal Courts of the Northern District of
California, with venue lying in Santa Clara County, California, with
the losing party responsible for costs, including without limitation,
court costs and reasonable attorneys fees and expenses. The application
of the United Nations Convention on Contracts for the International
Sale of Goods is expressly excluded. Any law or regulation which
provides that the language of a contract shall be construed against the
drafter shall not apply to this License.
12. RESPONSIBILITY FOR CLAIMS.
Except in cases where another Contributor has failed to comply with
Section 3.4, You are responsible for damages arising, directly or
indirectly, out of Your utilization of rights under this License, based
on the number of copies of Covered Code you made available, the
revenues you received from utilizing such rights, and other relevant
factors. You agree to work with affected parties to distribute
responsibility on an equitable basis.
EXHIBIT A.
``The contents of this file are subject to the Mozilla Public License
Version 1.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.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
The Original Code is ______________________________________.
The Initial Developer of the Original Code is ________________________.
Portions created by ______________________ are Copyright (C) ______
_______________________. All Rights Reserved.
Contributor(s): ______________________________________.''

360
mpl-1.1.txt Normal file
View File

@ -0,0 +1,360 @@
MOZILLA PUBLIC LICENSE
Version 1.0
----------------
1. Definitions.
1.1. ``Contributor'' means each entity that creates or contributes to
the creation of Modifications.
1.2. ``Contributor Version'' means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. ``Covered Code'' means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. ``Electronic Distribution Mechanism'' means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. ``Executable'' means Covered Code in any form other than Source
Code.
1.6. ``Initial Developer'' means the individual or entity identified as
the Initial Developer in the Source Code notice required by Exhibit A.
1.7. ``Larger Work'' means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. ``License'' means this document.
1.9. ``Modifications'' means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. ``Original Code'' means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this License
is not already Covered Code governed by this License.
1.11. ``Source Code'' means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus any
associated interface definition files, scripts used to control
compilation and installation of an Executable, or a list of source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. ``You'' means an individual or a legal entity exercising rights
under, and complying with all of the terms of, this License or a future
version of this License issued under Section 6.1. For legal entities,
``You'' includes any entity which controls, is controlled by, or is
under common control with You. For purposes of this definition,
``control'' means (a) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (b) ownership of fifty percent (50%) or more of the
outstanding shares or beneficial ownership of such entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) to use, reproduce, modify, display, perform, sublicense and
distribute the Original Code (or portions thereof) with or without
Modifications, or as part of a Larger Work; and
(b) under patents now or hereafter owned or controlled by Initial
Developer, to make, have made, use and sell (``Utilize'') the
Original Code (or portions thereof), but solely to the extent that
any such patent is reasonably necessary to enable You to Utilize
the Original Code (or portions thereof) and not to any greater
extent that may be necessary to Utilize further Modifications or
combinations.
2.2. Contributor Grant.
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) to use, reproduce, modify, display, perform, sublicense and
distribute the Modifications created by such Contributor (or
portions thereof) either on an unmodified basis, with other
Modifications, as Covered Code or as part of a Larger Work; and
(b) under patents now or hereafter owned or controlled by
Contributor, to Utilize the Contributor Version (or portions
thereof), but solely to the extent that any such patent is
reasonably necessary to enable You to Utilize the Contributor
Version (or portions thereof), and not to any greater extent that
may be necessary to Utilize further Modifications or combinations.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be distributed
only under the terms of this License or a future version of this
License released under Section 6.1, and You must include a copy of this
License with every copy of the Source Code You distribute. You may not
offer or impose any terms on any Source Code version that alters or
restricts the applicable version of this License or the recipients'
rights hereunder. However, You may include an additional document
offering the additional rights described in Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which you contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that the
Modification is derived, directly or indirectly, from Original Code
provided by the Initial Developer and including the name of the Initial
Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If You have knowledge that a party claims an intellectual property
right in particular functionality or code (or its utilization
under this License), you must include a text file with the source
code distribution titled ``LEGAL'' which describes the claim and
the party making the claim in sufficient detail that a recipient
will know whom to contact. If you obtain such knowledge after You
make Your Modification available as described in Section 3.2, You
shall promptly modify the LEGAL file in all copies You make
available thereafter and shall take other steps (such as notifying
appropriate mailing lists or newsgroups) reasonably calculated to
inform those who received the Covered Code that new knowledge has
been obtained.
(b) Contributor APIs.
If Your Modification is an application programming interface and
You own or control patents which are reasonably necessary to
implement that API, you must also include this information in the
LEGAL file.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code, and this License in any documentation for the Source Code, where
You describe recipients' rights relating to Covered Code. If You
created one or more Modification(s), You may add your name as a
Contributor to the notice described in Exhibit A. If it is not possible
to put such notice in a particular Source Code file due to its
structure, then you must include such notice in a location (such as a
relevant directory file) where a user would be likely to look for such
a notice. You may choose to offer, and to charge a fee for, warranty,
support, indemnity or liability obligations to one or more recipients
of Covered Code. However, You may do so only on Your own behalf, and
not on behalf of the Initial Developer or any Contributor. You must
make it absolutely clear than any such warranty, support, indemnity or
liability obligation is offered by You alone, and You hereby agree to
indemnify the Initial Developer and every Contributor for any liability
incurred by the Initial Developer or such Contributor as a result of
warranty, support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of the
Covered Code is available under the terms of this License, including a
description of how and where You have fulfilled the obligations of
Section 3.2. The notice must be conspicuously included in any notice in
an Executable version, related documentation or collateral in which You
describe recipients' rights relating to the Covered Code. You may
distribute the Executable version of Covered Code under a license of
Your choice, which may contain terms different from this License,
provided that You are in compliance with the terms of this License and
that the license for the Executable version does not attempt to limit
or alter the recipient's rights in the Source Code version from the
rights set forth in this License. If You distribute the Executable
version under a different license You must make it absolutely clear
that any terms which differ from this License are offered by You alone,
not by the Initial Developer or any Contributor. You hereby agree to
indemnify the Initial Developer and every Contributor for any liability
incurred by the Initial Developer or such Contributor as a result of
any such terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to statute
or regulation then You must: (a) comply with the terms of this License
to the maximum extent possible; and (b) describe the limitations and
the code they affect. Such description must be included in the LEGAL
file described in Section 3.4 and must be included with all
distributions of the Source Code. Except to the extent prohibited by
statute or regulation, such description must be sufficiently detailed
for a recipient of ordinary skill to be able to understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A, and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation (``Netscape'') may publish revised
and/or new versions of the License from time to time. Each version will
be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If you create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), you must (a) rename Your license so that the
phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or
any confusingly similar phrase do not appear anywhere in your license
and (b) otherwise make it clear that your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial Developer,
Original Code or Contributor in the notice described in Exhibit A shall
not of themselves be deemed to be modifications of this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER
PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND
ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT
EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a ``commercial item,'' as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer
software'' and ``commercial computer software documentation,'' as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if any,
provides otherwise), excluding its conflict-of-law provisions. With
respect to disputes in which at least one party is a citizen of, or an
entity chartered or registered to do business in, the United States of
America: (a) unless otherwise agreed in writing, all disputes relating
to this License (excepting any dispute relating to intellectual
property rights) shall be subject to final and binding arbitration,
with the losing party paying all costs of arbitration; (b) any
arbitration relating to this Agreement shall be held in Santa Clara
County, California, under the auspices of JAMS/EndDispute; and (c) any
litigation relating to this Agreement shall be subject to the
jurisdiction of the Federal Courts of the Northern District of
California, with venue lying in Santa Clara County, California, with
the losing party responsible for costs, including without limitation,
court costs and reasonable attorneys fees and expenses. The application
of the United Nations Convention on Contracts for the International
Sale of Goods is expressly excluded. Any law or regulation which
provides that the language of a contract shall be construed against the
drafter shall not apply to this License.
12. RESPONSIBILITY FOR CLAIMS.
Except in cases where another Contributor has failed to comply with
Section 3.4, You are responsible for damages arising, directly or
indirectly, out of Your utilization of rights under this License, based
on the number of copies of Covered Code you made available, the
revenues you received from utilizing such rights, and other relevant
factors. You agree to work with affected parties to distribute
responsibility on an equitable basis.
EXHIBIT A.
``The contents of this file are subject to the Mozilla Public License
Version 1.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.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
The Original Code is ______________________________________.
The Initial Developer of the Original Code is ________________________.
Portions created by ______________________ are Copyright (C) ______
_______________________. All Rights Reserved.
Contributor(s): ______________________________________.''

BIN
saxon-resources9-4.zip Normal file

Binary file not shown.

305
saxon.1 Normal file
View File

@ -0,0 +1,305 @@
.\" Title: saxon
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
.\" Date: February 2008
.\" Manual:
.\" Source:
.\"
.TH "SAXON" "1" "February 2008" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
saxon - command line XSLT 2.0 processor
.SH "SYNOPSIS"
.HP 12
\fBsaxon\fR [\fIOPTION\fR...] [\fB\-s:\fR\fB\fISOURCEFILE\fR\fR] [\fB\-xsl:\fR\fB\fISTYLESHEET\fR\fR] [\fB\-o:\fR\fB\fIOUTPUT\fR\fR] [\fINAME\fR=\fIVALUE\fR...]
.SH "DESCRIPTION"
.PP
This manual page documents briefly the
\fBsaxon\fR
command\. This page was written for the
Debian(TM)
distribution because the original program does not have a manual page\. Instead, it has HTML documentation which is shipped in the "saxon\-manual" package\.
.PP
\fBsaxon\fR
is a command line wrapper around the Saxon\-B XSLT and XQuery processor\. Using
\fBsaxon\fR
you can process XML documents with
\fIXSLT 2\.0\fR
stylesheets directly from the command line\. Internally,
\fBsaxon\fR
is a wrapper around the Java class
\fBnet\.sf\.saxon\.Transform\fR
implemented by Saxon\-B\.
.PP
\fBsaxon\fR
is usually invoked passing the 3 options made explicit in the above synopsis\. Usually, those options correspond respectively to the input XML file to be transformed, the XSLT stylesheet describing the desired transformation, and the output file where to save the result\. However, the meaning and the need of passing them is affected by a number of other options that can be specified\. See the option reference below for more information\.
.SS "Parameters"
.PP
At the end of the command line, a list of
\fIparameters\fR
can be given\. Parameters are passed using the syntax
\fINAME\fR=\fIVALUE\fR, to specify parameters\' names and values\.
.PP
A parameter name prefixed with "+" (plus sign) will be interpreted as a
\fIfilesystem path parameter\fR
If the path points to a single file, that file will be parsed as XML and its document node will be passed as the parameter value\. If the path points to a directory, all directly contained files will be parsed as XML files, and the sequence of their document nodes will be passed as the parameter value\.
.PP
A parameter name prefixed with "!" (exclamation mark) will be interpted as a output/serialization parameter\. See the specifications of XQuery and XSLT 2\.0 for more information on output/serialization parameters\.
.PP
To pass parameters belonging to the non\-null namespace, the syntax {\fIuri\fR}\fIlocalname\fR=\fIvalue\fR
is provided\.
.PP
Parameters will be visible as global variables during XSLT processing, provided they have been declared with <xsl:param>\. evaluation, provided they have been declared in the query prolog\. See the XSLT specification for more information on variables and their declarations\.
.SH "OPTIONS"
.PP
A summary of supported options is included below\. Options can be passed in any order\.
.PP
We first report the options which are shared by
\fBsaxon\fR
and
\fBsaxonq\fR, then those specific to
\fBsaxon\fR
(or which have a different semantics)\.
.PP
Some options are flagged as "Saxon\-SA only", such options work only if Saxon\-SA is installed\. Note that Saxon\-SA is a commercial product, as such it is not available in Debian\.
.SS "Common options"
.PP
\fB\-cr\fR:\fIclassname\fR
.RS 4
Specify a class to be used for processing collection URIs passed to the
\fBcollection()\fR
function\. The class must implement
net\.sf\.saxon\.CollectionURIResolver\.
.RE
.PP
\fB\-dtd\fR: {[on] | [off]}
.RS 4
Enable or disable DTD validation\. Default: off\.
.RE
.PP
\fB\-expand\fR: {[on] | [off]}
.RS 4
When validation is enabled, expand default values in validated documents\. This option enables or disables such an expansion\. Default: on\.
.RE
.PP
\fB\-explain\fR [:\fIfilename\fR]
.RS 4
Display an execution plan; the output is in XML format\. If filename is not given it will be displayed on standard output\.
.RE
.PP
\fB\-ext\fR: {[on] | [off]}
.RS 4
Enable or disable the ability to invoke external Java functions from query files and stylesheets\. Beware that enabling them is a potential security risk when processing untrusted files\. Default: off\.
.RE
.PP
\fB\-l\fR: {[on] | [off]}
.RS 4
Keep (when on) or throw away (when off) line numbers in tress corresponding to source documents\. When kept, line numbers can be accessed using the function
\fBsaxon:line\-number()\fR\. Default: off\.
.RE
.PP
\fB\-outval\fR: {[recover] | [fatal]}
.RS 4
When validation is required, set whether validation errors are fatal (when "fatal" is passed) or if they only trigger warnings (when "recover" is)\. Default: fatal\.
.RE
.PP
\fB\-p\fR: {[on] | [off]}
.RS 4
Enable or disable usage of the
PTreeURIResolver\. Saxon\-SA only\.
.RE
.PP
\fB\-r\fR:\fIclassname\fR
.RS 4
Specify a class to be used for resolving all URIs\.
.RE
.PP
\fB\-repeat\fR:\fIN\fR
.RS 4
Repeat the transformation N times\. For benchmarking purposes\.
.RE
.PP
\fB\-sa\fR
.RS 4
Perform Schema\-aware processing\. Saxon\-SA only\.
.RE
.PP
\fB\-strip\fR: {[all] | [none] | [ignorable]}
.RS 4
Specify whitespace stripping policy for source documents: strip all of them ("all"), strip none of them ("none"), strip ignorable whitespace only ("ignorable")\. Default: none\.
.RE
.PP
\fB\-t\fR
.RS 4
Display version, timing, and other debugging information on standard error\.
.RE
.PP
\fB\-tree\fR: {[tiny] | [linked]}
.RS 4
Select the implementation of the internal tree model: tiny tree model ("tiny") or linked tree model ("linked")\. See the Saxon documentation for more information on the internal tree model\. Default: tiny\.
.RE
.PP
\fB\-T\fR [:\fIclassname\fR]
.RS 4
Trace various aspect of the processing; an optional class name can be given to specify a user\-chosen tracer\. The class must implement
net\.sf\.saxon\.trace\.TraceListener\. The default is a system supplied tracer\. This option implies
\fB\-l\fR\.
.RE
.PP
\fB\-TJ\fR
.RS 4
Enable tracing of external Java method invocation\. See
\fB\-ext\fR\.
.RE
.PP
\fB\-u\fR
.RS 4
Force interpretation of source document names as URI\. By default they are considered to be file names, unless they start with "file:" or "http:"\.
.RE
.PP
\fB\-val\fR: {[strict] | [lax]}
.RS 4
When validation is enabled, choose among "strict" or "lax" validation\. Saxon\-SA only\.
.RE
.PP
\fB\-x\fR:\fIclassname\fR
.RS 4
Specify a class to be used as SAX parser for input documents\. The class must implement either
org\.xml\.sax\.Parser
or
org\.xml\.sax\.XMLReader\.
.RE
.PP
\fB\-xi\fR
.RS 4
Apply XInclude processing to all input documents\.
.RE
.PP
\fB\-xmlversion\fR: {[1\.0] | [1\.1]}
.RS 4
Choose the XML version for processing input documents\. "1\.1" must be specified to process XML 1\.1 and Namespaces 1\.1 constructs\. Default: 1\.0\.
.RE
.PP
\fB\-?\fR
.RS 4
Display a help message and exit\.
.RE
.SS "Options specific to saxon"
.PP
\fB\-a\fR
.RS 4
Use the "<?xml\-stylesheet \.\.\. ?>" processing instruction from the source document to find the stylesheet to be used\. This option is not compatible with
\fB\-xsl\fR\.
.RE
.PP
\fB\-c\fR:\fIfilename\fR
.RS 4
Use the compiled stylesheet stored in filename\. This option is not compatible with
\fB\-xsl\fR\.
.RE
.PP
\fB\-im\fR:\fImodename\fR
.RS 4
Use modename as the initial mode used for the transformation\. Qualified modes can be specified as "{\fIuri\fR}\fIlocalname\fR"\.
.RE
.PP
\fB\-it\fR:\fItemplatename\fR
.RS 4
Use templatename as the initial named template for the transformation\. When this option is used,
\fB\-xsl\fR
is optional\.
.RE
.PP
\fB\-m\fR:\fIclassname\fR
.RS 4
Specify a class to be used as the receiver for messages generated by <xsl:message>\. The class must implement
net\.sf\.saxon\.event\.Receiver\.
.RE
.PP
\fB\-o\fR:\fIpath\fR
.RS 4
Specify the path to be used for saving generated output\. Usually path points to a filename where the main result document will be saved\. If not specified such a document will be written to standard output\.
.sp
Additional output documents generated using the <xsl:result\-document> command uses path as the basename for the "href" attribute of the command\. If
\fB\-o\fR
is missing they will be saved relatively to the current working directory\.
.sp
When
\fB\-s\fR
identifies a directory, also
\fB\-o\fR
should identify one\. All the output documents will then be written under such a directory\.
.RE
.PP
\fB\-or\fR:\fIclassname\fR
.RS 4
Specify a class to be used as the output resolver for the "href" attribute of <xsl:result\-document>\. The class must implement
net\.sf\.saxon\.OutputURIResolver\.
.RE
.PP
\fB\-s\fR:\fIpath\fR
.RS 4
Specify the input file or directory\. This option is required unless
\fB\-it\fR
has been given\. If path points to a filename, that file will be parsed as an XML document and its document node will be the context item at the beginning of the transformation\. The special filename "\-" can be used to require reading the input document from standard input\.
.sp
If path points to a directory all files directly contained in it will be individually transformed\. In such a case
\fB\-o\fR
is required\.
\fB\-u\fR
affects the intepretation of path\.
.RE
.PP
\fB\-versmsg\fR: {[on] | [off]}
.RS 4
Enable or disable the warning about using an XSLT 2\.0 processor (which Saxon\-B is) on stylesheets which specify version="1\.0" in their root element\. Default: on\.
.RE
.PP
\fB\-warnings\fR: {[silent] | [recover] | [fatal]}
.RS 4
Set the policy for handling recoverable errors: "silent" for silent recovery, "recover" for recovery with warning output on standard error, "fatal" for no recovery\. Default: recover\.
.RE
.PP
\fB\-xsl\fR:\fIfilename\fR
.RS 4
Specify the main XSLT stylesheet to be used for the transformation\. This option is required unless
\fB\-a\fR
or
\fB\-c\fR
are specified\. The special filename "\-" can be used to require reading the sylesheet from standard input\.
\fB\-u\fR
affects the intepretation of filename\.
.RE
.PP
\fB\-y\fR:\fIfilename\fR
.RS 4
Specify a class to be used as SAX parser for stylesheets\. The class must implement either
org\.xml\.sax\.Parser
or
org\.xml\.sax\.XMLReader\. See also
\fB\-x\fR\.
.RE
.SH "SEE ALSO"
.PP
saxonq (1), XSL Transformations (XSLT) Version 2\.0 (W3C Recommendation)\.
.PP
This program is fully documented by the HTML documentation of Saxon, available in the "saxon\-manual" package\.
.SH "AUTHOR"
.PP
This manual page was written by
Stefano
Zacchiroli
<zack@debian\.org>
for the
Debian(TM)
system (but may be used by others)\. Permission is granted to copy, distribute and/or modify this document under the terms of the
GNU
General Public License, Version 3 or any later version published by the Free Software Foundation\.
.PP
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common\-licenses/GPL\.
.SH "COPYRIGHT"
Copyright \(co 2008 Stefano Zacchiroli
.br

79
saxon.build.script Normal file
View File

@ -0,0 +1,79 @@
<!-- simple generic build file -->
<project name="saxon" default="all" basedir=".">
<!-- Properties -->
<property name="name" value="saxon"/>
<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"/>
<!-- 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/**,net/**"/>
</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}" encoding="ISO-8859-1"/>
</target>
<!-- Build jar archives -->
<target name="jar" depends="classes">
<jar jarfile="${build.lib}/${name}.jar"
basedir="${build.classes}">
<manifest>
<attribute name="Main-Class" value="net.sf.saxon.Transform" />
</manifest>
<service type="javax.xml.transform.TransformerFactory"
provider="net.sf.saxon.TransformerFactoryImpl"/>
<service type="javax.xml.xpath.XPathFactory">
<provider classname="net.sf.saxon.xpath.XPathFactoryImpl"/>
<provider classname="http\://java.sun.com/jaxp/xpath/dom: net.sf.saxon.xpath.XPathFactoryImpl"/>
<provider classname="http\://saxon.sf.net/jaxp/xpath/om: net.sf.saxon.xpath.XPathFactoryImpl"/>
</service>
</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.*"
encoding="ISO-8859-1"
>
<link href="${j2se.javadoc}"/>
<link href="${jdom.javadoc}"/>
</javadoc>
</target>
<!-- Build everything -->
<target name="all" depends="jar,javadoc"/>
</project>

41
saxon.saxon.script Normal file
View File

@ -0,0 +1,41 @@
#!/bin/sh
#
# saxon script
# JPackage Project <http://www.jpackage.org/>
. /usr/share/java-utils/java-functions
MAIN_CLASS=net.sf.saxon.Transform
BASE_JARS="saxon.jar xml-commons-apis.jar jaxp_parser_impl.jar bea-stax-api.jar bea-stax-ri.jar"
# Optional jars
CLASSPATH="$CLASSPATH:"$(build-classpath docbook-xsl-saxon \
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:/etc/java/resolver"
# 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 "$@"

39
saxon.saxonq.script Normal file
View File

@ -0,0 +1,39 @@
#!/bin/sh
#
# saxon script
# JPackage Project <http://www.jpackage.org/>
. /usr/share/java-utils/java-functions
MAIN_CLASS=net.sf.saxon.Query
BASE_JARS="saxon.jar xml-commons-apis.jar jaxp_parser_impl.jar bea-stax-api.jar bea-stax-ri.jar"
# Optional jars
CLASSPATH="$CLASSPATH:"$(build-classpath docbook-xsl-saxon \
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:/etc/java/resolver"
# Tune options to use resolver.
r=org.apache.xml.resolver.tools.ResolvingXMLReader
if ! echo $@ | grep "\\-x:" >/dev/null 2>&1 ; then
args="$args -x:$r"
fi
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 "$@"

156
saxon.spec Normal file
View File

@ -0,0 +1,156 @@
%global version_str %(sed -e 's/\\./-/g' <<<"%{version}")
%global version_major_minor %(sed -e 's/\\([0-9]*\\.[0-9]*\\)\\..*/\\1/g' <<<"%{version}")
%global version_major_minor_str %(sed -e 's/\\./-/g' <<<"%{version_major_minor}")
%global version_maven %(sed -e 's/\\(.*\\)\\.\\([0-9]*\\)/\\1-\\2/g' <<<"%{version}")
%global artifact_id Saxon-HE
Summary: Java XPath, XSLT 2.0 and XQuery implementation
Name: saxon
Version: 9.4.0.9
Release: 1
License: MPLv1.0 and MPLv1.1 and ASL 1.1 and UCD and MIT
URL: http://saxon.sourceforge.net/
Source0: https://downloads.sourceforge.net/project/saxon/Saxon-HE/%{version_major_minor}/saxon%{version_str}source.zip
Source1: %{name}.saxon.script
Source2: %{name}.saxonq.script
Source3: %{name}.build.script
Source4: %{name}.1
Source5: %{name}q.1
Source6: https://downloads.sourceforge.net/project/saxon/Saxon-HE/%{version_major_minor}/saxon-resources%{version_major_minor_str}.zip
Source8: http://www.mozilla.org/MPL/1.0/index.txt#/mpl-1.0.txt
Source9: http://www.mozilla.org/MPL/1.0/index.txt#/mpl-1.1.txt
BuildRequires: unzip java-devel >= 1:1.6.0 ant javapackages-local bea-stax-api
BuildRequires: xml-commons-apis xml-commons-resolver xom java-javadoc jdom >= 0:1.0-0.b7
BuildRequires: jdom-javadoc >= 0:1.0-0.b9.3jpp jdom2 dom4j
Requires: bea-stax-api bea-stax
Obsoletes: %{name}-xpath < %{version}-%{release}
Provides: %{name}-xpath = %{version}-%{release}
Obsoletes: %{name}-xom < %{version}-%{release}
Provides: %{name}-xom = %{version}-%{release}
Obsoletes: %{name}-sql < %{version}-%{release}
Provides: %{name}-sql = %{version}-%{release}
Obsoletes: %{name}-jdom < %{version}-%{release}
Provides: %{name}-jdom = %{version}-%{release}
Obsoletes: %{name}-dom < %{version}-%{release}
Provides: %{name}-dom = %{version}-%{release}
BuildArch: noarch
%description
Saxon HE is Saxonica's non-schema-aware implementation of the XPath 2.0,
XSLT 2.0, and XQuery 1.0 specifications aligned with the W3C Candidate
Recommendation published on 3 November 2005. It is a complete and
conformant implementation, providing all the mandatory features of
those specifications and nearly all the optional features.
%package manual
Summary: Manual for %{name}
%description manual
Manual for %{name}.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
Javadoc for %{name}.
%package demo
Summary: Demos for %{name}
Requires: %{name} = %{version}-%{release}
%description demo
Demonstrations and samples for %{name}.
%package scripts
Summary: Utility scripts for %{name}
Requires: %{name} = %{version}-%{release}
%description scripts
Utility scripts for %{name}.
%prep
%setup -q -c
unzip -q %{SOURCE6}
cp -p %{SOURCE3} ./build.xml
rm -rf net/sf/saxon/dotnet samples/cs
rm -rf net/sf/saxon/xqj
rm -rf net/sf/saxon/option/sql/SQLElementFactory.java
rm -rf docs/api
find . \( -name "*.jar" -name "*.pyc" \) -delete
cp %{SOURCE8} %{SOURCE9} .
cat >%{artifact_id}-%{version_maven}.pom <<POM_XML
<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>net.sf.saxon</groupId>
<artifactId>%{artifact_id}</artifactId>
<version>%{version_maven}</version>
<packaging>jar</packaging>
<name>%{artifact_id}</name>
<url>http://saxon.sf.net/</url>
<description>The XSLT and XQuery Processor</description>
<licenses>
<license>
<name>Mozilla Public License Version 2.0</name>
<url>http://www.mozilla.org/MPL/2.0/</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:svn:https://dev.saxonica.com/repos/archive/opensource/latest%{version_major_minor}/</connection>
<developerConnection>scm:svn:https://dev.saxonica.com/repos/archive/opensource/latest%{version_major_minor}/</developerConnection>
<url>https://saxon.svn.sourceforge.net/svnroot/saxon/latest%{version_major_minor}/</url>
</scm>
</project>
POM_XML
%build
mkdir -p build/classes
cat >build/classes/edition.properties <<EOF
config=net.sf.saxon.Configuration
platform=net.sf.saxon.java.JavaPlatform
EOF
export CLASSPATH=$(build-classpath axiom xml-commons-apis xml-commons-resolver jdom jdom2 xom bea-stax-api dom4j)
ant \
-Dj2se.javadoc=%{_javadocdir}/java \
-Djdom.javadoc=%{_javadocdir}/jdom
%mvn_artifact %{artifact_id}-%{version_maven}.pom build/lib/saxon.jar
%mvn_alias : :saxon
%mvn_alias : net.sf.saxon:saxon::dom:
%install
%mvn_install
ln -s %{artifact_id}.jar $RPM_BUILD_ROOT/%{_javadir}/saxon/saxon.jar
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr build/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -pr samples/* $RPM_BUILD_ROOT%{_datadir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}
install -p -m755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}q
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -p -m644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
install -p -m644 %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/%{name}q.1
%post
mv %{_javadir}/jaxp_transform_impl.jar{,.tmp} || :
update-alternatives --remove jaxp_transform_impl %{_javadir}/saxon/%{artifact_id}.jar &>/dev/null || :
mv %{_javadir}/jaxp_transform_impl.jar{.tmp,} || :
%files -f .mfiles
%license mpl-1.0.txt mpl-1.1.txt
%{_javadir}/%{name}/saxon.jar
%files manual
%doc doc/*
%files javadoc
%doc mpl-1.0.txt mpl-1.1.txt
%{_javadocdir}/%{name}
%files demo
%{_datadir}/%{name}
%files scripts
%{_bindir}/%{name}
%{_bindir}/%{name}q
%{_mandir}/man1/%{name}.1*
%{_mandir}/man1/%{name}q.1*
%changelog
* Thu Jul 23 2020 Jeffery.Gao <gaojianxing@huawei.com> - 9.4.0.9-1
- Package init

4
saxon.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: NA
src_repo: NA
tag_prefix: NA
seperator: NA

BIN
saxon9-4-0-9source.zip Normal file

Binary file not shown.

249
saxonq.1 Normal file
View File

@ -0,0 +1,249 @@
.\" Title: saxonq
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
.\" Date: February 2008
.\" Manual:
.\" Source:
.\"
.TH "SAXONQ" "1" "February 2008" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
saxonq - command line XQuery processor
.SH "SYNOPSIS"
.HP 14
\fBsaxonq\fR [\fIOPTION\fR...] \fI\fIQUERYFILE\fR\fR [\fINAME\fR=\fIVALUE\fR...]
.SH "DESCRIPTION"
.PP
This manual page documents briefly the
\fBsaxonq\fR
command\. This page was written for the
Debian(TM)
distribution because the original program does not have a manual page\. Still, it has HTML documentation which is shipped in the "saxon\-manual" package\.
.PP
\fBsaxonq\fR
is a command line wrapper around the Saxon\-B XSLT and XQuery processor\. Using
\fBsaxonq\fR
you can evaluate
\fIXQuery\fR
queries directly from the command line\. Internally,
\fBsaxonq\fR
is a wrapper around the Java class
\fBnet\.sf\.saxon\.Query\fR
implemented by Saxon\-B\.
.PP
\fBsaxonq\fR
should be invoked passing a (required) filename containing the XQuery query to be evaluated; the special filename "\-" can be given to require reading the query from standard input\.
.PP
Before the query filename a list of options can be given, see below\.
.SS "Parameters"
.PP
At the end of the command line, a list of
\fIparameters\fR
can be given\. Parameters are passed using the syntax
\fINAME\fR=\fIVALUE\fR, to specify parameters\' names and values\.
.PP
A parameter name prefixed with "+" (plus sign) will be interpreted as a
\fIfilesystem path parameter\fR
If the path points to a single file, that file will be parsed as XML and its document node will be passed as the parameter value\. If the path points to a directory, all directly contained files will be parsed as XML files, and the sequence of their document nodes will be passed as the parameter value\.
.PP
A parameter name prefixed with "!" (exclamation mark) will be interpted as a output/serialization parameter\. See the specifications of XQuery and XSLT 2\.0 for more information on output/serialization parameters\.
.PP
To pass parameters belonging to the non\-null namespace, the syntax {\fIuri\fR}\fIlocalname\fR=\fIvalue\fR
is provided\.
.PP
Parameters will be visible as external variables during query evaluation, provided they have been declared in the query prolog\. See the XQuery specification for more information on variables and their declarations\.
.SH "OPTIONS"
.PP
A summary of supported options is included below\. Options can be passed in any order\.
.PP
We first report the options which are shared by
\fBsaxonq\fR
and
\fBsaxon\fR, then those specific to
\fBsaxonq\fR
(or which have a different semantics)\.
.PP
Some options are flagged as "Saxon\-SA only", such options work only if Saxon\-SA is installed\. Note that Saxon\-SA is a commercial product, as such it is not available in Debian\.
.SS "Common options"
.PP
\fB\-cr\fR:\fIclassname\fR
.RS 4
Specify a class to be used for processing collection URIs passed to the
\fBcollection()\fR
function\. The class must implement
net\.sf\.saxon\.CollectionURIResolver\.
.RE
.PP
\fB\-dtd\fR: {[on] | [off]}
.RS 4
Enable or disable DTD validation\. Default: off\.
.RE
.PP
\fB\-expand\fR: {[on] | [off]}
.RS 4
When validation is enabled, expand default values in validated documents\. This option enables or disables such an expansion\. Default: on\.
.RE
.PP
\fB\-explain\fR [:\fIfilename\fR]
.RS 4
Display an execution plan; the output is in XML format\. If filename is not given it will be displayed on standard output\.
.RE
.PP
\fB\-ext\fR: {[on] | [off]}
.RS 4
Enable or disable the ability to invoke external Java functions from query files and stylesheets\. Beware that enabling them is a potential security risk when processing untrusted files\. Default: off\.
.RE
.PP
\fB\-l\fR: {[on] | [off]}
.RS 4
Keep (when on) or throw away (when off) line numbers in tress corresponding to source documents\. When kept, line numbers can be accessed using the function
\fBsaxon:line\-number()\fR\. Default: off\.
.RE
.PP
\fB\-outval\fR: {[recover] | [fatal]}
.RS 4
When validation is required, set whether validation errors are fatal (when "fatal" is passed) or if they only trigger warnings (when "recover" is)\. Default: fatal\.
.RE
.PP
\fB\-p\fR: {[on] | [off]}
.RS 4
Enable or disable usage of the
PTreeURIResolver\. Saxon\-SA only\.
.RE
.PP
\fB\-r\fR:\fIclassname\fR
.RS 4
Specify a class to be used for resolving all URIs\.
.RE
.PP
\fB\-repeat\fR:\fIN\fR
.RS 4
Repeat the transformation N times\. For benchmarking purposes\.
.RE
.PP
\fB\-sa\fR
.RS 4
Perform Schema\-aware processing\. Saxon\-SA only\.
.RE
.PP
\fB\-strip\fR: {[all] | [none] | [ignorable]}
.RS 4
Specify whitespace stripping policy for source documents: strip all of them ("all"), strip none of them ("none"), strip ignorable whitespace only ("ignorable")\. Default: none\.
.RE
.PP
\fB\-t\fR
.RS 4
Display version, timing, and other debugging information on standard error\.
.RE
.PP
\fB\-tree\fR: {[tiny] | [linked]}
.RS 4
Select the implementation of the internal tree model: tiny tree model ("tiny") or linked tree model ("linked")\. See the Saxon documentation for more information on the internal tree model\. Default: tiny\.
.RE
.PP
\fB\-T\fR [:\fIclassname\fR]
.RS 4
Trace various aspect of the processing; an optional class name can be given to specify a user\-chosen tracer\. The class must implement
net\.sf\.saxon\.trace\.TraceListener\. The default is a system supplied tracer\. This option implies
\fB\-l\fR\.
.RE
.PP
\fB\-TJ\fR
.RS 4
Enable tracing of external Java method invocation\. See
\fB\-ext\fR\.
.RE
.PP
\fB\-u\fR
.RS 4
Force interpretation of source document names as URI\. By default they are considered to be file names, unless they start with "file:" or "http:"\.
.RE
.PP
\fB\-val\fR: {[strict] | [lax]}
.RS 4
When validation is enabled, choose among "strict" or "lax" validation\. Saxon\-SA only\.
.RE
.PP
\fB\-x\fR:\fIclassname\fR
.RS 4
Specify a class to be used as SAX parser for input documents\. The class must implement either
org\.xml\.sax\.Parser
or
org\.xml\.sax\.XMLReader\.
.RE
.PP
\fB\-xi\fR
.RS 4
Apply XInclude processing to all input documents\.
.RE
.PP
\fB\-xmlversion\fR: {[1\.0] | [1\.1]}
.RS 4
Choose the XML version for processing input documents\. "1\.1" must be specified to process XML 1\.1 and Namespaces 1\.1 constructs\. Default: 1\.0\.
.RE
.PP
\fB\-?\fR
.RS 4
Display a help message and exit\.
.RE
.SS "Options specific to saxonq"
.PP
\fB\-mr:\fR\fB\fIclassname\fR\fR
.RS 4
Use the specifed class as a
ModuleURIResolver
to resolve query module URIs\. The class must implement
net\.sf\.saxon\.query\.ModuleURIResolver\.
.RE
.PP
\fB\-o\fR:\fIfilename\fR
.RS 4
Send the query output to the specified filename\. If not specified the output will be sent to standard output\. See also
\fB\-wrap\fR\.
.RE
.PP
\fB\-pipe\fR: {[push] | [pull]}
.RS 4
Internally, execute query in push or pull mode\. Mainly for testing purposes\. Push mode is usually faster when intermediate tree are constructed in memory\. Default: push\.
.RE
.PP
\fB\-projection\fR: {[on] | [off]}
.RS 4
Enable or disable document projection, i\.e\. the ability to throw away tree parts which will not be accessed by a query\. Saxon\-SA only\.
.RE
.PP
\fB\-s\fR: {[\fIfile\fR] | [\fIURI\fR]}
.RS 4
Read document input from the specified filename ("\-" can be given to read from standard input)\. The read document will be available to the query as the context node\.
\fB\-u\fR
affects how filename is interpreted\.
.RE
.PP
\fB\-wrap\fR: {[on] | [off]}
.RS 4
Enable or disable wrapping of query result in a XML structure which makes explicit the kind of each output node or atomic value\. For example free\-standing attributes will be wrapped in an explicit XML element stating that they are attributes\. When this is off, the query output will be wrapped only using a document node; in such a setting is possible that output parts, such as free\-standing attributes, can\'t be serialized\. Default: off\.
.RE
.SH "SEE ALSO"
.PP
saxon (1), XQuery 1\.0: An XML Query Language (W3C Recommendation)\.
.PP
This program is fully documented by the HTML documentation of Saxon, available in the "saxon\-manual" package\.
.SH "AUTHOR"
.PP
This manual page was written by
Stefano
Zacchiroli
<zack@debian\.org>
for the
Debian(TM)
system (but may be used by others)\. Permission is granted to copy, distribute and/or modify this document under the terms of the
GNU
General Public License, Version 3 or any later version published by the Free Software Foundation\.
.PP
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common\-licenses/GPL\.
.SH "COPYRIGHT"
Copyright \(co 2008 Stefano Zacchiroli
.br