gnu: jasper: Update to 2.0.25 [fixes CVE-2021-26926].
[jackhill/guix/guix.git] / gnu / packages / xml.scm
CommitLineData
d0414883 1;;; GNU Guix --- Functional package management for GNU
3a2efbc8 2;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
0899144f 3;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
b715dbac 4;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
10ac0f9f 5;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
cc537187 6;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
96fd87c9 7;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
0efb6452 8;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
fe9451c5 9;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com>
c74c7c13 10;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
e9f62e52 11;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
5eec378b 12;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
19c33040 13;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
3c986a7d 14;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
bafafa80 15;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
c950a2a5 16;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
f9f67fcb 17;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
5bc2d579 18;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
76fed2b3 19;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
3b695802 20;;; Copyright © 2017 Petter <petter@mykolab.ch>
767d24e8 21;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
2cce23bf 22;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
f85c8dd8 23;;; Copyright © 2018 Jack Hill <jackhill@jackhill.us>
8fda8b7d 24;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
f2a53a4a 25;;; Copyright © 2020 Paul Garlick <pgarlick@tourbillion-technology.com>
53657739 26;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
38e5bc92 27;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
b04198a1 28;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
c577b306 29;;; Copyright © 2021 Michael Rohleder <mike@rohleder.de>
de99dc48 30;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
d0414883
LC
31;;;
32;;; This file is part of GNU Guix.
33;;;
34;;; GNU Guix is free software; you can redistribute it and/or modify it
35;;; under the terms of the GNU General Public License as published by
36;;; the Free Software Foundation; either version 3 of the License, or (at
37;;; your option) any later version.
38;;;
39;;; GNU Guix is distributed in the hope that it will be useful, but
40;;; WITHOUT ANY WARRANTY; without even the implied warranty of
41;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42;;; GNU General Public License for more details.
43;;;
44;;; You should have received a copy of the GNU General Public License
45;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
46
1ffa7090 47(define-module (gnu packages xml)
f0444eaf 48 #:use-module (gnu packages)
53657739 49 #:use-module (gnu packages base)
0899144f 50 #:use-module (gnu packages autotools)
79a0eabd 51 #:use-module (gnu packages check)
322cbda7 52 #:use-module (gnu packages compression)
2cce23bf 53 #:use-module (gnu packages curl)
cc537187
RW
54 #:use-module (gnu packages docbook)
55 #:use-module (gnu packages documentation)
a34eafce 56 #:use-module (gnu packages gettext)
cc537187 57 #:use-module (gnu packages glib)
cc537187 58 #:use-module (gnu packages gnome)
72e20842 59 #:use-module (gnu packages gnupg)
cc537187 60 #:use-module (gnu packages graphviz)
72e20842 61 #:use-module (gnu packages gtk)
1a17ca26 62 #:use-module (gnu packages java)
aff0cce9 63 #:use-module (gnu packages nss)
f0444eaf 64 #:use-module (gnu packages perl)
5ccde207 65 #:use-module (gnu packages perl-check)
f0444eaf 66 #:use-module (gnu packages python)
a7fd7b68 67 #:use-module (gnu packages tls)
ad871fc6 68 #:use-module (gnu packages web)
b5b73a82 69 #:use-module ((guix licenses) #:prefix license:)
d0414883
LC
70 #:use-module (guix packages)
71 #:use-module (guix download)
3047c7ba 72 #:use-module (guix git-download)
77d7b57c 73 #:use-module (guix build-system ant)
6ce212b8 74 #:use-module (guix build-system cmake)
2a1e82bb 75 #:use-module (guix build-system gnu)
72e20842 76 #:use-module (guix build-system meson)
37f9ff63 77 #:use-module (guix build-system perl)
7ce32242 78 #:use-module (guix build-system python)
e4aab734
RW
79 #:use-module (gnu packages linux)
80 #:use-module (gnu packages pkg-config))
d0414883 81
72e20842
RG
82(define-public libxmlb
83 (package
84 (name "libxmlb")
85 (version "0.1.15")
86 (source
87 (origin
88 (method git-fetch)
89 (uri
90 (git-reference
8ed4c468 91 (url "https://github.com/hughsie/libxmlb")
72e20842
RG
92 (commit version)))
93 (file-name (git-file-name name version))
94 (sha256
95 (base32 "1mb73pnfwqc4mm0lm16yfn0lj495h8hcciprb2v6wgy3ifnnjxib"))))
96 (build-system meson-build-system)
97 (arguments
98 `(#:glib-or-gtk? #t))
99 (native-inputs
100 `(("gobject-introspection" ,gobject-introspection)
101 ("gtk-doc" ,gtk-doc)
102 ("pkg-config" ,pkg-config)))
103 (inputs
104 `(("appstream-glib" ,appstream-glib)
105 ("glib" ,glib)))
106 (synopsis "Library to help create and query binary XML blobs")
107 (description "Libxmlb library takes XML source, and converts it to a
108structured binary representation with a deduplicated string table; where the
109strings have the NULs included. This allows an application to mmap the binary
110XML file, do an XPath query and return some strings without actually parsing
111the entire document.")
112 (home-page "https://github.com/hughsie/libxmlb")
113 (license license:lgpl2.1+)))
114
d0414883
LC
115(define-public expat
116 (package
117 (name "expat")
6cd34029 118 (version "2.2.9")
f85c8dd8
JH
119 (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
120 (origin
121 (method url-fetch)
122 (uri (list (string-append "mirror://sourceforge/expat/expat/"
fb9a23a3 123 version "/expat-" version ".tar.xz")
f85c8dd8
JH
124 (string-append
125 "https://github.com/libexpat/libexpat/releases/download/R_"
126 (string-map dot->underscore version)
fb9a23a3 127 "/expat-" version ".tar.xz")))
f85c8dd8
JH
128 (sha256
129 (base32
6cd34029 130 "1960mmgbb4cm64n1p0nz3hrs1pw03hkrfcw8prmnn4622mdrd9hy")))))
d0414883 131 (build-system gnu-build-system)
767abd37
MB
132 (arguments
133 '(#:configure-flags '("--disable-static")))
e5e33f90 134 (home-page "https://libexpat.github.io/")
9e771e3b 135 (synopsis "Stream-oriented XML parser library written in C")
d0414883
LC
136 (description
137 "Expat is an XML parser library written in C. It is a
138stream-oriented parser in which an application registers handlers for
139things the parser might find in the XML document (like start tags).")
140 (license license:expat)))
f0444eaf 141
5bc2d579
GG
142(define-public libebml
143 (package
144 (name "libebml")
c577b306 145 (version "1.4.1")
5bc2d579
GG
146 (source
147 (origin
148 (method url-fetch)
079321fa
TGR
149 (uri (string-append "https://dl.matroska.org/downloads/libebml/"
150 "libebml-" version ".tar.xz"))
5bc2d579 151 (sha256
c577b306 152 (base32 "0ckhf7wcfwik1c8ilwipdr9p7b58pvqvj8x54l6slqah81lwd53f"))))
f3d89181
TGR
153 (build-system cmake-build-system)
154 (arguments
155 `(#:configure-flags
156 (list "-DBUILD_SHARED_LIBS=YES")
157 #:tests? #f)) ; no test suite
a040db6d 158 (home-page "https://matroska-org.github.io/libebml/")
cb778117
TGR
159 (synopsis "C++ library to parse EBML files")
160 (description "libebml is a C++ library to read and write @dfn{EBML}
161(Extensible Binary Meta Language) files. EBML was designed to be a simplified
162binary extension of XML for the purpose of storing and manipulating data in a
5bc2d579
GG
163hierarchical form with variable field lengths.")
164 (license license:lgpl2.1)))
165
f0444eaf
AE
166(define-public libxml2
167 (package
168 (name "libxml2")
c9bba992 169 (version "2.9.10")
f0444eaf
AE
170 (source (origin
171 (method url-fetch)
172 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
173 version ".tar.gz"))
174 (sha256
175 (base32
c9bba992 176 "07xynh8hcxb2yb1fs051xrgszjvj37wnxvxgsj10rzmqzy9y3zma"))))
f0444eaf 177 (build-system gnu-build-system)
5f8642ea
MB
178 (outputs '("out" "static"))
179 (arguments
180 `(#:phases (modify-phases %standard-phases
181 (add-after 'install 'move-static-libs
182 (lambda* (#:key outputs #:allow-other-keys)
183 (let ((src (string-append (assoc-ref outputs "out") "/lib"))
184 (dst (string-append (assoc-ref outputs "static")
185 "/lib")))
186 (mkdir-p dst)
187 (for-each (lambda (ar)
188 (rename-file ar (string-append dst "/"
189 (basename ar))))
190 (find-files src "\\.a$"))
d52680ee
MB
191
192 ;; Remove reference to the static library from the .la
193 ;; file such that Libtool does the right thing when both
194 ;; the shared and static variants are available.
195 (substitute* (string-append src "/libxml2.la")
196 (("^old_library='libxml2.a'") "old_library=''"))
5f8642ea 197 #t))))))
f0444eaf 198 (home-page "http://www.xmlsoft.org/")
35b9e423 199 (synopsis "C parser for XML")
7ba79d5d 200 (inputs `(("xz" ,xz)))
c1944c92 201 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
7ce32242 202 (native-inputs `(("perl" ,perl)))
2a8d4401
LC
203 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
204 ;; sub-directory of any given package.
74528069
LC
205 (native-search-paths (list (search-path-specification
206 (variable "XML_CATALOG_FILES")
207 (separator " ")
208 (files '("xml"))
209 (file-pattern "^catalog\\.xml$")
210 (file-type 'regular))))
2a8d4401 211 (search-paths native-search-paths)
f0444eaf 212 (description
7c125ce0
AK
213 "Libxml2 is the XML C parser and toolkit developed for the Gnome
214project (but it is usable outside of the Gnome platform).")
f0444eaf 215 (license license:x11)))
58cc3b38 216
cc537187
RW
217;; This is the latest stable release.
218(define-public libxmlplusplus
219 (package
220 (name "libxmlplusplus")
221 (version "3.2.0")
222 (source (origin
223 (method git-fetch)
224 (uri (git-reference
8ed4c468 225 (url "https://github.com/libxmlplusplus/libxmlplusplus")
cc537187
RW
226 (commit version)))
227 (file-name (git-file-name name version))
228 (sha256
229 (base32
230 "0wjz591rjlgbah7dcq8i0yn0zw9d62b7g6r0pppx81ic0cx8n8ga"))))
231 (build-system gnu-build-system)
232 (arguments
233 `(#:phases
234 (modify-phases %standard-phases
235 (add-after 'unpack 'fix-documentation
236 (lambda* (#:key inputs #:allow-other-keys)
237 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
238 "/xml/dtd/docbook"))
239 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
240 "/xml/xsl/docbook-xsl-"
241 ,(package-version docbook-xsl))))
242 (substitute* '("examples/dom_xpath/example.xml"
243 "docs/manual/libxml++_without_code.xml")
244 (("http://.*/docbookx\\.dtd")
245 (string-append xmldoc "/docbookx.dtd")))
246 (setenv "SGML_CATALOG_FILES"
247 (string-append xmldoc "/catalog.xml"))
248 (substitute* "docs/manual/docbook-customisation.xsl"
249 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
250 (string-append xsldoc "/html/chunk.xsl"))))
251 #t)))))
252 (propagated-inputs
253 `(("libxml2" ,libxml2)))
254 (inputs
255 `(("glibmm" ,glibmm)))
256 (native-inputs
257 `(("autoconf" ,autoconf)
258 ("automake" ,automake)
259 ("doxygen" ,doxygen)
260 ("docbook-xml" ,docbook-xml)
261 ("docbook-xsl" ,docbook-xsl)
262 ("graphviz" ,graphviz) ; for dot
263 ("libtool" ,libtool)
264 ("libxslt" ,libxslt)
265 ("mm-common" ,mm-common)
266 ("perl" ,perl)
267 ("pkg-config" ,pkg-config)))
268 (home-page "https://github.com/libxmlplusplus/libxmlplusplus/")
269 (synopsis "C++ bindings for libxml2")
270 (description
271 "libxml++ (a.k.a. libxmlplusplus) provides a C++ interface to XML files.
272It uses libxml2 to access the XML files.")
273 (license license:lgpl2.1+)))
274
c2bb58f6
RW
275;; This is the last release providing the 2.6 API, hence the name.
276;; This is needed by tascam-gtk
277(define-public libxmlplusplus-2.6
278 (package
279 (inherit libxmlplusplus)
280 (name "libxmlplusplus")
281 (version "2.40.1")
282 (source (origin
283 (method git-fetch)
284 (uri (git-reference
8ed4c468 285 (url "https://github.com/libxmlplusplus/libxmlplusplus")
c2bb58f6
RW
286 (commit version)))
287 (file-name (git-file-name name version))
288 (sha256
289 (base32
290 "0gbfi4l88w828gmyc9br11l003ylyi4vigp5d1kfgsn0k4cig3y9"))))))
291
7ce32242 292(define-public python-libxml2
e428b2c0 293 (package/inherit libxml2
7ce32242 294 (name "python-libxml2")
785fcb62
MB
295 (source (origin
296 (inherit (package-source libxml2))
297 (patches (cons (search-patch "python-libxml2-utf8.patch")
298 (origin-patches (package-source libxml2))))))
7ce32242 299 (build-system python-build-system)
d3028f5b 300 (outputs '("out"))
7ce32242
SB
301 (arguments
302 `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
303 #:tests? #f
304 #:phases
305 (modify-phases %standard-phases
306 (add-before
307 'build 'configure
308 (lambda* (#:key inputs #:allow-other-keys)
309 (chdir "python")
310 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
311 "cross-libc" "libc")))
312 (libxml2 (assoc-ref inputs "libxml2")))
313 (substitute* "setup.py"
314 ;; For 'libxml2/libxml/tree.h'.
315 (("ROOT = r'/usr'")
316 (format #f "ROOT = r'~a'" libxml2))
317 ;; For 'iconv.h'.
318 (("/opt/include")
aa6f87a2
MW
319 (string-append glibc "/include"))))
320 #t)))))
7ce32242
SB
321 (inputs `(("libxml2" ,libxml2)))
322 (synopsis "Python bindings for the libxml2 library")))
323
324(define-public python2-libxml2
325 (package-with-python2 python-libxml2))
326
58cc3b38
AE
327(define-public libxslt
328 (package
329 (name "libxslt")
badcb119 330 (version "1.1.34")
58cc3b38
AE
331 (source (origin
332 (method url-fetch)
333 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
334 version ".tar.gz"))
335 (sha256
336 (base32
badcb119 337 "0zrzz6kjdyavspzik6fbkpvfpbd25r2qg6py5nnjaabrsr3bvccq"))
28b33172 338 (patches (search-patches "libxslt-generated-ids.patch"))))
58cc3b38 339 (build-system gnu-build-system)
badcb119
MB
340 (arguments
341 `(#:phases (modify-phases %standard-phases
342 (add-before 'check 'disable-fuzz-tests
343 (lambda _
344 ;; Disable libFuzzer tests, because they require
345 ;; instrumentation builds of libxml2 and libxslt.
346 (substitute* "tests/Makefile"
347 (("exslt plugins fuzz")
348 "exslt plugins"))
349 #t)))))
58cc3b38 350 (home-page "http://xmlsoft.org/XSLT/index.html")
35b9e423 351 (synopsis "C library for applying XSLT stylesheets to XML documents")
58cc3b38
AE
352 (inputs `(("libgcrypt" ,libgcrypt)
353 ("libxml2" ,libxml2)
95288fcc 354 ("python" ,python-minimal-wrapper)
60825fdd
MO
355 ("zlib" ,zlib)
356 ("xz" ,xz)))
da66bd38
MO
357 (native-inputs
358 `(("pkg-config" ,pkg-config)))
58cc3b38 359 (description
35b9e423 360 "Libxslt is an XSLT C library developed for the GNOME project. It is
58cc3b38
AE
361based on libxml for XML parsing, tree manipulation and XPath support.")
362 (license license:x11)))
2a1e82bb 363
1729fb52
MC
364(define-public openjade
365 (package
366 (name "openjade")
367 (version "1.3.2")
368 (source (origin
369 (method url-fetch)
370 (uri (string-append "mirror://sourceforge/openjade/openjade/"
371 version "/" name "-" version ".tar.gz"))
372 (sha256
373 (base32
374 "1l92sfvx1f0wmkbvzv1385y1gb3hh010xksi1iyviyclrjb7jb8x"))))
375 (build-system gnu-build-system)
376 (arguments
377 `(#:configure-flags
378 (list (string-append "--enable-spincludedir="
379 (assoc-ref %build-inputs "opensp")
380 "/include/OpenSP")
381 (string-append "--enable-splibdir="
382 (assoc-ref %build-inputs "opensp") "/lib")
383 ;; Workaround segfaults in OpenJade (see:
384 ;; https://bugs.launchpad.net/ubuntu/+source/openjade/+bug/1869734).
385 "CXXFLAGS=-O0")
386 #:parallel-build? #f ;build fails otherwise
387 ;; The test suite fails with diff errors between the actual and
388 ;; expected results, like: (char<? #\a #\A) returning #t rather than
389 ;; #f (see: https://sourceforge.net/p/openjade/bugs/150/).
390 #:tests? #f
391 #:phases
392 (modify-phases %standard-phases
393 (add-after 'unpack 'replace-deprecated-getopt
394 ;; See: https://sourceforge.net/p/openjade/bugs/140/.
395 (lambda _
396 (substitute* "msggen.pl"
397 (("use POSIX;") "use POSIX;\nuse Getopt::Std;")
398 (("do 'getopts.pl';") "")
399 (("&Getopts") "getopts"))
400 #t))
401 (add-after 'replace-deprecated-getopt 'fix-locale-lookup
402 ;; See: https://sourceforge.net/p/openjade/bugs/149/.
403 (lambda _
404 (substitute* "testsuite/expr-lang.dsl"
405 (("\\(language \"EN\" \"US\"\\)")
406 "(language \"EN\" \"US.UTF-8\")"))
407 #t))
408 (add-after 'install 'install-doc
409 (lambda* (#:key outputs #:allow-other-keys)
410 ;; TODO: Generate the manpage from source, with
411 ;; openjade-bootstrap and jadetex. See the file docsrc/Makefile.
412 (let* ((out (assoc-ref outputs "out"))
413 (man1 (string-append out "/share/man/man1")))
414 (install-file "docsrc/openjade.1" man1)
415 #t)))
416 (add-after 'install-doc 'install-dtds
417 (lambda* (#:key outputs #:allow-other-keys)
418 (let* ((out (assoc-ref outputs "out"))
419 (dtd (string-append out "/sgml/dtd")))
420 (mkdir-p dtd)
421 (copy-recursively "dsssl" dtd)
422 #t)))
423 (delete 'check)
424 (add-after 'install 'check
425 (lambda* (#:key tests? out #:allow-other-keys)
426 (if tests?
427 (with-directory-excursion "testsuite"
428 (invoke "make"))
429 (format #t "test suite not run~%"))
430 #t)))))
431 (inputs
432 `(("opensp" ,opensp)))
433 (native-inputs
434 `(("perl" ,perl)))
435 (home-page "http://openjade.sourceforge.net/")
436 (synopsis "ISO/IEC 10179:1996 standard DSSSL language implementation")
437 (description "OpenJade is an implementation of Document Style Semantics
438and Specification Language (DSSSL), a style language to format SGML or XML
439documents. It contains backends for various formats such as RTF, HTML, TeX,
440MIF, SGML2SGML, and FOT.")
441 (license (license:non-copyleft "file://COPYING"
442 "See COPYING in the distribution."))))
443
5eec378b
BW
444(define-public perl-graph-readwrite
445 (package
446 (name "perl-graph-readwrite")
ffbc7d65 447 (version "2.09")
5eec378b
BW
448 (source
449 (origin
450 (method url-fetch)
451 (uri (string-append
452 "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-"
453 version
454 ".tar.gz"))
455 (sha256
456 (base32
ffbc7d65 457 "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh"))))
5eec378b
BW
458 (build-system perl-build-system)
459 (propagated-inputs
460 `(("perl-graph" ,perl-graph)
461 ("perl-parse-yapp" ,perl-parse-yapp)
462 ("perl-xml-parser" ,perl-xml-parser)
463 ("perl-xml-writer" ,perl-xml-writer)))
9aba9b12 464 (home-page "https://metacpan.org/release/Graph-ReadWrite")
5eec378b
BW
465 (synopsis "Modules for reading and writing directed graphs")
466 (description "This is a collection of perl classes for reading and writing
467directed graphs in a variety of file formats. The graphs are represented in
468Perl using Jarkko Hietaniemi's @code{Graph} classes.
469
470There are two base classes. @code{Graph::Reader} is the base class for classes
471which read a graph file and create an instance of the Graph class.
472@code{Graph::Writer} is the base class for classes which take an instance of
473the @code{Graph} class and write it out in a specific file format.")
2f3108ad 474 (license license:perl-license)))
5eec378b 475
b2696a58 476(define-public perl-xml-atom
477 (package
478 (name "perl-xml-atom")
522f1995 479 (version "0.42")
b2696a58 480 (source (origin
481 (method url-fetch)
482 (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
483 "XML-Atom-" version ".tar.gz"))
484 (sha256
485 (base32
522f1995 486 "1wa8kfy1w4mg7kzxim4whyprkn48a2il6fap0b947zywknw4c6y6"))))
b2696a58 487 (build-system perl-build-system)
522f1995
MB
488 (arguments
489 `(#:phases
490 (modify-phases %standard-phases
491 (add-before 'check 'set-perl-search-path
492 (lambda _
493 (setenv "PERL5LIB"
494 (string-append (getcwd) ":"
495 (getenv "PERL5LIB")))
496 #t)))))
b2696a58 497 (native-inputs
50632f0a
TGR
498 ;; TODO package: perl-datetime-format-atom
499 `(("perl-html-tagset" ,perl-html-tagset)
522f1995 500 ("perl-module-build-tiny" ,perl-module-build-tiny)
50632f0a
TGR
501 ("perl-module-install" ,perl-module-install)))
502 (propagated-inputs
b2696a58 503 `(("perl-class-data-inheritable" ,perl-class-data-inheritable)
504 ("perl-datetime" ,perl-datetime)
505 ("perl-datetime-timezone" ,perl-datetime-timezone)
506 ("perl-digest-sha1" ,perl-digest-sha1)
507 ("perl-libwww" ,perl-libwww)
508 ("perl-uri" ,perl-uri)
509 ("perl-xml-libxml" ,perl-xml-libxml)
510 ("perl-xml-xpath" ,perl-xml-xpath)))
9aba9b12 511 (home-page "https://metacpan.org/release/XML-Atom")
b2696a58 512 (synopsis "Atom feed and API implementation")
513 (description
514 "Atom is a syndication, API, and archiving format for weblogs and other data.
515@code{XML::Atom} implements the feed format as well as a client for the API.")
2f3108ad 516 (license license:perl-license)))
b2696a58 517
d66fa696
MB
518(define-public perl-xml-descent
519 (package
520 (name "perl-xml-descent")
521 (version "1.04")
522 (source (origin
523 (method url-fetch)
524 (uri (string-append "mirror://cpan/authors/id/A/AN/ANDYA/"
525 "XML-Descent-" version ".tar.gz"))
526 (sha256
527 (base32
528 "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7"))))
529 (build-system perl-build-system)
530 (native-inputs
531 `(("perl-module-build" ,perl-module-build)))
532 (propagated-inputs
533 `(("perl-test-differences" ,perl-test-differences)
534 ("perl-xml-tokeparser" ,perl-xml-tokeparser)))
9aba9b12 535 (home-page "https://metacpan.org/release/XML-Descent")
d66fa696
MB
536 (synopsis "Recursive descent XML parsing")
537 (description
538 "The conventional models for parsing XML are either @dfn{DOM}
539(a data structure representing the entire document tree is created) or
540@dfn{SAX} (callbacks are issued for each element in the XML).
541
542XML grammar is recursive - so it's nice to be able to write recursive
543parsers for it. @code{XML::Descent} allows such parsers to be created.")
2f3108ad 544 (license license:perl-license)))
d66fa696 545
2a1e82bb
LC
546(define-public perl-xml-parser
547 (package
548 (name "perl-xml-parser")
8b53495d 549 (version "2.46")
2a1e82bb
LC
550 (source (origin
551 (method url-fetch)
552 (uri (string-append
2b8c5f54 553 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
2a1e82bb
LC
554 version ".tar.gz"))
555 (sha256
556 (base32
8b53495d 557 "0pai3ik47q7rgnix9644c673fwydz52gqkxr9kxwq765j4j36cfk"))))
2a1e82bb
LC
558 (build-system perl-build-system)
559 (arguments `(#:make-maker-flags
560 (let ((expat (assoc-ref %build-inputs "expat")))
561 (list (string-append "EXPATLIBPATH=" expat "/lib")
562 (string-append "EXPATINCPATH=" expat "/include")))))
563 (inputs `(("expat" ,expat)))
2f3108ad 564 (license license:perl-license)
2a1e82bb
LC
565 (synopsis "Perl bindings to the Expat XML parsing library")
566 (description
567 "This module provides ways to parse XML documents. It is built on top of
568XML::Parser::Expat, which is a lower level interface to James Clark's expat
569library. Each call to one of the parsing methods creates a new instance of
570XML::Parser::Expat which is then used to parse the document. Expat options
571may be provided when the XML::Parser object is created. These options are
572then passed on to the Expat object on each parse call. They can also be given
573as extra arguments to the parse methods, in which case they override options
574given at XML::Parser creation time.")
9aba9b12 575 (home-page "https://metacpan.org/release/XML-Parser")))
37f9ff63 576
62b28f19
MB
577(define-public perl-xml-tokeparser
578 (package
579 (name "perl-xml-tokeparser")
580 (version "0.05")
581 (source (origin
582 (method url-fetch)
583 (uri (string-append "mirror://cpan/authors/id/P/PO/PODMASTER/"
584 "XML-TokeParser-" version ".tar.gz"))
585 (sha256
586 (base32
587 "1hnpwb3lh6cbgwvjjgqzcp6jm4mp612qn6ili38adc9nhkwv8fc5"))))
588 (build-system perl-build-system)
589 (propagated-inputs `(("perl-xml-parser" ,perl-xml-parser)))
9aba9b12 590 (home-page "https://metacpan.org/release/XML-TokeParser")
62b28f19
MB
591 (synopsis "Simplified interface to XML::Parser")
592 (description
593 "@code{XML::TokeParser} provides a procedural (\"pull mode\") interface
594to @code{XML::Parser} in much the same way that Gisle Aas'
595@code{HTML::TokeParser} provides a procedural interface to @code{HTML::Parser}.
596@code{XML::TokeParser} splits its XML input up into \"tokens\", each
597corresponding to an @code{XML::Parser} event.")
2f3108ad 598 (license license:perl-license)))
62b28f19 599
7339fbe2 600(define-public perl-libxml
1385ba4f 601 (package
7339fbe2 602 (name "perl-libxml")
1385ba4f
AE
603 (version "0.08")
604 (source (origin
605 (method url-fetch)
606 (uri (string-append
607 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
608 version ".tar.gz"))
609 (sha256
610 (base32
611 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
612 (build-system perl-build-system)
7b81406a 613 (propagated-inputs
1385ba4f 614 `(("perl-xml-parser" ,perl-xml-parser)))
2f3108ad 615 (license license:perl-license)
2db5f9b6 616 (synopsis "Perl modules for working with XML")
1385ba4f 617 (description
2db5f9b6
TGR
618 "libxml-perl is a collection of smaller Perl modules, scripts, and
619documents for working with XML in Perl. libxml-perl software works in
620combination with @code{XML::Parser}, PerlSAX, @code{XML::DOM},
621@code{XML::Grove}, and others.")
9aba9b12 622 (home-page "https://metacpan.org/release/libxml-perl")))
1385ba4f 623
3dd6bee1
EB
624(define-public perl-xml-libxml
625 (package
626 (name "perl-xml-libxml")
d71184f8 627 (version "2.0134")
3dd6bee1
EB
628 (source
629 (origin
630 (method url-fetch)
631 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
632 "XML-LibXML-" version ".tar.gz"))
633 (sha256
634 (base32
d71184f8 635 "1ks69xymv6zkj7hvaymjvb78ch81abri7kg4zrwxhdfsqb8a9g7h"))))
3dd6bee1
EB
636 (build-system perl-build-system)
637 (propagated-inputs
638 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
639 ("perl-xml-sax" ,perl-xml-sax)))
640 (inputs
641 `(("libxml2" ,libxml2)))
9aba9b12 642 (home-page "https://metacpan.org/release/XML-LibXML")
3dd6bee1
EB
643 (synopsis "Perl interface to libxml2")
644 (description "This module implements a Perl interface to the libxml2
54c3c140 645library which provides interfaces for parsing and manipulating XML files. This
3dd6bee1
EB
646module allows Perl programmers to make use of the highly capable validating
647XML parser and the high performance DOM implementation.")
2f3108ad 648 (license license:perl-license)))
3dd6bee1 649
f7c4dc2f
RW
650(define-public perl-xml-libxml-simple
651 (package
652 (name "perl-xml-libxml-simple")
d21fb90a 653 (version "0.99")
f7c4dc2f
RW
654 (source (origin
655 (method url-fetch)
656 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
657 "XML-LibXML-Simple-" version ".tar.gz"))
658 (sha256
659 (base32
d21fb90a 660 "0i4ybiqdnvnbfxqslw2y392kvy7i752dl8n99bqiqv5kzk4lbzhl"))))
f7c4dc2f
RW
661 (build-system perl-build-system)
662 (propagated-inputs
663 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
664 ("perl-xml-libxml" ,perl-xml-libxml)))
9aba9b12 665 (home-page "https://metacpan.org/release/XML-LibXML-Simple")
f7c4dc2f
RW
666 (synopsis "XML::LibXML based XML::Simple clone")
667 (description
668 "This package provides the same API as @code{XML::Simple} but is based on
669@code{XML::LibXML}.")
2f3108ad 670 (license license:perl-license)))
f7c4dc2f 671
93863a5e
RW
672(define-public perl-xml-libxslt
673 (package
674 (name "perl-xml-libxslt")
73a3e98f 675 (version "1.96")
93863a5e
RW
676 (source
677 (origin
678 (method url-fetch)
679 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
680 "XML-LibXSLT-" version ".tar.gz"))
681 (sha256
682 (base32
73a3e98f 683 "0wyl8klgr65j8y8fzgwz9jlvfjwvxazna8j3dg9gksd2v973fpia"))))
93863a5e
RW
684 (build-system perl-build-system)
685 (inputs
686 `(("libxslt" ,libxslt)))
687 (propagated-inputs
688 `(("perl-xml-libxml" ,perl-xml-libxml)))
9aba9b12 689 (home-page "https://metacpan.org/release/XML-LibXSLT")
93863a5e
RW
690 (synopsis "Perl bindings to GNOME libxslt library")
691 (description "This Perl module is an interface to the GNOME project's
692libxslt library.")
2f3108ad 693 (license license:perl-license)))
93863a5e 694
b715dbac
EB
695(define-public perl-xml-namespacesupport
696 (package
697 (name "perl-xml-namespacesupport")
88958ee0 698 (version "1.12")
b715dbac
EB
699 (source
700 (origin
701 (method url-fetch)
702 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
703 "XML-NamespaceSupport-" version ".tar.gz"))
704 (sha256
705 (base32
88958ee0 706 "1vz5pbi4lm5fhq2slrs2hlp6bnk29863abgjlcx43l4dky2rbsa7"))))
b715dbac 707 (build-system perl-build-system)
9aba9b12 708 (home-page "https://metacpan.org/release/XML-NamespaceSupport")
b715dbac
EB
709 (synopsis "XML namespace support class")
710 (description "This module offers a simple to process namespaced XML
711names (unames) from within any application that may need them. It also helps
712maintain a prefix to namespace URI map, and provides a number of basic
713checks.")
2f3108ad 714 (license license:perl-license)))
b715dbac 715
a022b23f 716(define-public perl-xml-rss
717 (package
718 (name "perl-xml-rss")
73662141 719 (version "1.61")
a022b23f 720 (source (origin
721 (method url-fetch)
722 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
723 "XML-RSS-" version ".tar.gz"))
724 (sha256
725 (base32
73662141 726 "03f983l2dnkvcw6iyg1s0xmv5wn793d3kvqlshmhm01ibp7ffvzs"))))
a022b23f 727 (build-system perl-build-system)
728 (native-inputs
729 `(("perl-module-build" ,perl-module-build)
730 ("perl-test-manifest" ,perl-test-manifest)
731 ("perl-test-differences" ,perl-test-differences)
732 ("perl-test-pod" ,perl-test-pod)
733 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
734 ;; XXX: The test which uses this modules does not run, even when it is included
735 ;; it is ignored. ("perl-test-trailingspace" ,perl-test-trailingspace)
736 (inputs
737 `(("perl-datetime" ,perl-datetime)
738 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
739 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
740 ("perl-html-parser" ,perl-html-parser)
741 ("perl-xml-parser" ,perl-xml-parser)))
9aba9b12 742 (home-page "https://metacpan.org/release/XML-RSS")
a022b23f 743 (synopsis "Creates and updates RSS files")
744 (description
745 "This module provides a basic framework for creating and maintaining
746RDF Site Summary (RSS) files. This distribution also contains many examples
747that allow you to generate HTML from an RSS, convert between 0.9, 0.91, and
7481.0 version, and more.")
2f3108ad 749 (license license:perl-license)))
a022b23f 750
18b8bbb3
EB
751(define-public perl-xml-sax
752 (package
753 (name "perl-xml-sax")
2dcde3c7 754 (version "1.02")
18b8bbb3
EB
755 (source
756 (origin
757 (method url-fetch)
758 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
759 "XML-SAX-" version ".tar.gz"))
760 (sha256
2dcde3c7 761 (base32 "0am13vnv8qsjafr5ljakwnkhlwpk15sga02z8mxsg9is0j3w61j5"))))
18b8bbb3
EB
762 (build-system perl-build-system)
763 (propagated-inputs
764 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
765 ("perl-xml-sax-base" ,perl-xml-sax-base)))
766 (arguments
767 `(#:phases (modify-phases %standard-phases
768 (add-before
40b084a3 769 'install 'augment-path
18b8bbb3
EB
770 ;; The install target tries to load the newly-installed
771 ;; XML::SAX module, but can't find it, so we need to tell
772 ;; perl where to look.
773 (lambda* (#:key outputs #:allow-other-keys)
774 (setenv "PERL5LIB"
775 (string-append (getenv "PERL5LIB") ":"
776 (assoc-ref outputs "out")
aa6f87a2
MW
777 "/lib/perl5/site_perl"))
778 #t)))))
9aba9b12 779 (home-page "https://metacpan.org/release/XML-SAX")
18b8bbb3
EB
780 (synopsis "Perl API for XML")
781 (description "XML::SAX consists of several framework classes for using and
782building Perl SAX2 XML parsers, filters, and drivers.")
2f3108ad 783 (license license:perl-license)))
18b8bbb3 784
1ed6d5bc
EB
785(define-public perl-xml-sax-base
786 (package
787 (name "perl-xml-sax-base")
fa964e96 788 (version "1.09")
1ed6d5bc
EB
789 (source
790 (origin
791 (method url-fetch)
792 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
793 "XML-SAX-Base-" version ".tar.gz"))
794 (sha256
795 (base32
fa964e96 796 "1l1ai9g1z11ja7mvnfl5mj346r13jyckbg9qlw6c2izglidkbjv6"))))
1ed6d5bc 797 (build-system perl-build-system)
9aba9b12 798 (home-page "https://metacpan.org/release/XML-SAX-Base")
1ed6d5bc
EB
799 (synopsis "Base class for SAX Drivers and Filters")
800 (description "This module has a very simple task - to be a base class for
801PerlSAX drivers and filters. It's default behaviour is to pass the input
802directly to the output unchanged. It can be useful to use this module as a
803base class so you don't have to, for example, implement the characters()
804callback.")
2f3108ad 805 (license license:perl-license)))
1ed6d5bc 806
535dc6cf
AE
807(define-public perl-xml-simple
808 (package
809 (name "perl-xml-simple")
fa3fff43 810 (version "2.25")
535dc6cf
AE
811 (source (origin
812 (method url-fetch)
813 (uri (string-append
814 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
815 version ".tar.gz"))
816 (sha256
817 (base32
fa3fff43 818 "1y6vh328zrh085d40852v4ij2l4g0amxykswxd1nfhd2pspds7sk"))))
535dc6cf 819 (build-system perl-build-system)
27ef7f45 820 (propagated-inputs
e831256f
EF
821 `(("perl-xml-parser" ,perl-xml-parser)
822 ("perl-xml-sax" ,perl-xml-sax)))
2f3108ad 823 (license license:perl-license)
535dc6cf
AE
824 (synopsis "Perl module for easy reading/writing of XML files")
825 (description
826 "The XML::Simple module provides a simple API layer on top of an
827underlying XML parsing module (either XML::Parser or one of the SAX2
828parser modules).")
9aba9b12 829 (home-page "https://metacpan.org/release/XML-Simple")))
535dc6cf 830
a2e520af
AE
831(define-public perl-xml-regexp
832 (package
833 (name "perl-xml-regexp")
834 (version "0.04")
835 (source (origin
836 (method url-fetch)
837 (uri (string-append
838 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
839 version ".tar.gz"))
840 (sha256
841 (base32
842 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
843 (build-system perl-build-system)
844 (inputs
845 `(("perl-xml-parser" ,perl-xml-parser)))
2f3108ad 846 (license license:perl-license)
a2e520af
AE
847 (synopsis "Perl regular expressions for XML tokens")
848 (description
849 "XML::RegExp contains regular expressions for the following XML tokens:
850BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
851EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
9aba9b12 852 (home-page "https://metacpan.org/release/XML-RegExp")))
a2e520af 853
ad871fc6
AE
854(define-public perl-xml-dom
855 (package
856 (name "perl-xml-dom")
4e5465f2 857 (version "1.46")
ad871fc6
AE
858 (source (origin
859 (method url-fetch)
860 (uri (string-append
861 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
862 version ".tar.gz"))
863 (sha256
864 (base32
4e5465f2 865 "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb"))))
ad871fc6 866 (build-system perl-build-system)
f7faff88
AE
867 (propagated-inputs
868 `(("perl-libwww" ,perl-libwww)
ad871fc6 869 ("perl-libxml" ,perl-libxml)
4e5465f2 870 ("perl-xml-parser" ,perl-xml-parser)
ad871fc6 871 ("perl-xml-regexp" ,perl-xml-regexp)))
2f3108ad 872 (license license:perl-license)
ad871fc6
AE
873 (synopsis
874 "Perl module for building DOM Level 1 compliant document structures")
875 (description
876 "This module extends the XML::Parser module by Clark Cooper. The
877XML::Parser module is built on top of XML::Parser::Expat, which is a lower
878level interface to James Clark's expat library. XML::DOM::Parser is derived
879from XML::Parser. It parses XML strings or files and builds a data structure
880that conforms to the API of the Document Object Model.")
9aba9b12 881 (home-page "https://metacpan.org/release/XML-DOM")))
ad871fc6 882
649e1676
RW
883(define-public perl-xml-compile-tester
884 (package
885 (name "perl-xml-compile-tester")
9af5a513 886 (version "0.91")
649e1676
RW
887 (source (origin
888 (method url-fetch)
889 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
890 "XML-Compile-Tester-" version ".tar.gz"))
891 (sha256
892 (base32
9af5a513 893 "1drzwziwi96rfkh48qpw4l225mcbk8ppl2157nj92cslcpwwdk75"))))
649e1676
RW
894 (build-system perl-build-system)
895 (propagated-inputs
896 `(("perl-log-report" ,perl-log-report)
897 ("perl-test-deep" ,perl-test-deep)))
9aba9b12 898 (home-page "https://metacpan.org/release/XML-Compile-Tester")
649e1676
RW
899 (synopsis "XML::Compile related regression testing")
900 (description
901 "The @code{XML::Compile} module suite has extensive regression testing.
902This module provide functions which simplify writing tests for
903@code{XML::Compile} related distributions.")
2f3108ad 904 (license license:perl-license)))
649e1676 905
b494a5f1
RW
906(define-public perl-xml-compile
907 (package
908 (name "perl-xml-compile")
78ca483a 909 (version "1.63")
b494a5f1
RW
910 (source (origin
911 (method url-fetch)
912 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
913 "XML-Compile-" version ".tar.gz"))
914 (sha256
915 (base32
78ca483a 916 "0psr5pwsk2biz2bfkigmx04v2rfhs6ybwcfmcrrg7gvh9bpp222b"))))
b494a5f1
RW
917 (build-system perl-build-system)
918 (propagated-inputs
174988fa
TGR
919 `(("perl-carp" ,perl-carp)
920 ("perl-log-report" ,perl-log-report)
b494a5f1
RW
921 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
922 ("perl-xml-libxml" ,perl-xml-libxml)
174988fa
TGR
923 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
924 ("perl-test-deep" ,perl-test-deep)
925 ("perl-types-serialiser" ,perl-types-serialiser)))
9aba9b12 926 (home-page "https://metacpan.org/release/XML-Compile")
b494a5f1
RW
927 (synopsis "Compilation-based XML processing")
928 (description
929 "@code{XML::Compile} can be used to translate a Perl data-structure into
930XML or XML into a Perl data-structure, both directions under rigid control by
931a schema.")
2f3108ad 932 (license license:perl-license)))
b494a5f1 933
c1d41b5d
RW
934(define-public perl-xml-compile-cache
935 (package
936 (name "perl-xml-compile-cache")
503a0059 937 (version "1.06")
c1d41b5d
RW
938 (source (origin
939 (method url-fetch)
940 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
941 "XML-Compile-Cache-" version ".tar.gz"))
942 (sha256
943 (base32
503a0059 944 "181qf1s7ymgi7saph3cf9p6dbxkxyh1ja23na4dchhi8v5mi66sr"))))
c1d41b5d
RW
945 (build-system perl-build-system)
946 (propagated-inputs
947 `(("perl-log-report" ,perl-log-report)
948 ("perl-xml-compile" ,perl-xml-compile)
949 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
950 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)))
9aba9b12 951 (home-page "https://metacpan.org/release/XML-Compile-Cache")
c1d41b5d
RW
952 (synopsis "Cache compiled XML translators")
953 (description
954 "This package provides methods to cache compiled XML translators.")
2f3108ad 955 (license license:perl-license)))
c1d41b5d 956
baeab9b8
RW
957(define-public perl-xml-compile-soap
958 (package
959 (name "perl-xml-compile-soap")
1d9b041c 960 (version "3.24")
baeab9b8
RW
961 (source (origin
962 (method url-fetch)
963 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
964 "XML-Compile-SOAP-" version ".tar.gz"))
965 (sha256
966 (base32
1d9b041c 967 "0pkcph562l2ij7rlwlvm58v6y062qsbydfpaz2qnph2ixqy0xfd1"))))
baeab9b8
RW
968 (build-system perl-build-system)
969 (propagated-inputs
970 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
971 ("perl-libwww" ,perl-libwww)
972 ("perl-log-report" ,perl-log-report)
973 ("perl-xml-compile" ,perl-xml-compile)
974 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
975 ("perl-xml-compile-tester" ,perl-xml-compile-tester)))
9aba9b12 976 (home-page "https://metacpan.org/release/XML-Compile-SOAP")
baeab9b8
RW
977 (synopsis "Base-class for SOAP implementations")
978 (description
979 "This module provides a class to handle the SOAP protocol. The first
980implementation is @url{SOAP1.1,
981http://www.w3.org/TR/2000/NOTE-SOAP-20000508/}, which is still most often
982used.")
2f3108ad 983 (license license:perl-license)))
baeab9b8 984
6a914948
RW
985(define-public perl-xml-compile-wsdl11
986 (package
987 (name "perl-xml-compile-wsdl11")
4b4a4f5c 988 (version "3.07")
6a914948
RW
989 (source (origin
990 (method url-fetch)
991 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
992 "XML-Compile-WSDL11-" version ".tar.gz"))
993 (sha256
994 (base32
4b4a4f5c 995 "09ayl442hzvn97q4ghn5rz4r82dm9w3l69hixhb29h9xq9ysi7ba"))))
6a914948
RW
996 (build-system perl-build-system)
997 (propagated-inputs
998 `(("perl-log-report" ,perl-log-report)
999 ("perl-xml-compile" ,perl-xml-compile)
1000 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
1001 ("perl-xml-compile-soap" ,perl-xml-compile-soap)))
9aba9b12 1002 (home-page "https://metacpan.org/release/XML-Compile-WSDL11")
6a914948
RW
1003 (synopsis "Create SOAP messages defined by WSDL 1.1")
1004 (description
1005 "This module understands WSDL version 1.1. A WSDL file defines a set of
1006messages to be send and received over SOAP connections. This involves
1007encoding of the message to be send into XML, sending the message to the
1008server, collect the answer, and finally decoding the XML to Perl.")
2f3108ad 1009 (license license:perl-license)))
6a914948 1010
246455c2 1011(define-public perl-xml-feed
1012 (package
1013 (name "perl-xml-feed")
8dfdd746 1014 (version "0.59")
246455c2 1015 (source (origin
1016 (method url-fetch)
1017 (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
1018 "XML-Feed-" version ".tar.gz"))
1019 (sha256
1020 (base32
8dfdd746 1021 "1z1a88bpy64j42bbyl8acbfl3dn9iaz47gx6clkgy5sbn4kr0kgk"))))
246455c2 1022 (build-system perl-build-system)
246455c2 1023 (native-inputs
1024 `(("perl-module-build" ,perl-module-build)
1025 ("perl-uri" ,perl-uri)
1026 ("perl-class-data-inheritable" ,perl-class-data-inheritable)))
40b793fd 1027 (propagated-inputs
246455c2 1028 `(("perl-class-errorhandler" ,perl-class-errorhandler)
1029 ("perl-datetime" ,perl-datetime)
f2a53a4a
PG
1030 ("perl-datetime-format-flexible" ,perl-datetime-format-flexible)
1031 ("perl-datetime-format-iso8601" ,perl-datetime-format-iso8601)
246455c2 1032 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
f2a53a4a 1033 ("perl-datetime-format-natural" ,perl-datetime-format-natural)
246455c2 1034 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
1035 ("perl-feed-find" ,perl-feed-find)
1036 ("perl-html-parser" ,perl-html-parser)
1037 ("perl-libwww-perl" ,perl-libwww)
1038 ("perl-module-pluggable" ,perl-module-pluggable)
1039 ("perl-uri-fetch" ,perl-uri-fetch)
1040 ("perl-xml-atom" ,perl-xml-atom)
1041 ("perl-xml-libxml" ,perl-xml-libxml)
1042 ("perl-xml-rss" ,perl-xml-rss)))
9aba9b12 1043 (home-page "https://metacpan.org/release/XML-Feed")
246455c2 1044 (synopsis "XML Syndication Feed Support")
1045 (description "@code{XML::Feed} is a syndication feed parser for both RSS and
1046Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI.
1047@code{XML::Feed} supports the following syndication feed formats:
1048RSS 0.91, RSS 1.0, RSS 2.0, Atom")
2f3108ad 1049 (license license:perl-license)))
246455c2 1050
0c1bab36 1051(define-public perl-xml-xpath
1052 (package
1053 (name "perl-xml-xpath")
fc82538c 1054 (version "1.44")
0c1bab36 1055 (source (origin
1056 (method url-fetch)
1057 (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
1058 "XML-XPath-" version ".tar.gz"))
1059 (sha256
1060 (base32
fc82538c 1061 "03yxj7w5a43ibbpiqsvb3lswj2b71dydsx4rs2fw0p8n0l3i3j8w"))))
0c1bab36 1062 (build-system perl-build-system)
1063 (native-inputs
1064 `(("perl-path-tiny" ,perl-path-tiny)))
9332d706 1065 (propagated-inputs
0c1bab36 1066 `(("perl-xml-parser" ,perl-xml-parser)))
9aba9b12 1067 (home-page "https://metacpan.org/release/XML-XPath")
0c1bab36 1068 (synopsis "Parse and evaluate XPath statements")
1069 (description
1070 "This module aims to comply exactly to the @url{XPath specification,
1071https://www.w3.org/TR/xpath} and yet allow extensions to be added in
1072the form of functions.")
2f3108ad 1073 (license license:perl-license)))
0c1bab36 1074
6ce212b8
RW
1075(define-public pugixml
1076 (package
1077 (name "pugixml")
c5c69451 1078 (version "1.11")
6ce212b8
RW
1079 (source
1080 (origin
1081 (method url-fetch)
0562a81e
EF
1082 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
1083 version "/pugixml-" version ".tar.gz"))
6ce212b8 1084 (sha256
c5c69451 1085 (base32 "0b5apqiisq8yk51x0cwks4h2m0zd2zgjdy0w80qp9h5rccz3v496"))))
6ce212b8
RW
1086 (build-system cmake-build-system)
1087 (arguments
7fda7b8f 1088 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
bc134c77 1089 #:tests? #f)) ; no tests
7fda7b8f
MB
1090 (native-inputs
1091 `(("pkg-config" ,pkg-config)))
28655227 1092 (home-page "https://pugixml.org")
6ce212b8
RW
1093 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
1094 (description
1095 "pugixml is a C++ XML processing library, which consists of a DOM-like
1096interface with rich traversal/modification capabilities, a fast XML parser
1097which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
1098implementation for complex data-driven tree queries. Full Unicode support is
1099also available, with Unicode interface variants and conversions between
1100different Unicode encodings which happen automatically during
1101parsing/saving.")
1102 (license license:expat)))
1103
c2efe1ae
MB
1104(define-public python-pyxb
1105 (package
1106 (name "python-pyxb")
4ef6cfef 1107 (version "1.2.6")
c2efe1ae
MB
1108 (source (origin
1109 (method url-fetch)
1110 (uri (pypi-uri "PyXB" version))
1111 (sha256
1112 (base32
4ef6cfef 1113 "1d17pyixbfvjyi2lb0cfp0ch8wwdf44mmg3r5pwqhyyqs66z601a"))))
c2efe1ae
MB
1114 (build-system python-build-system)
1115 (home-page "http://pyxb.sourceforge.net/")
1116 (synopsis "Python XML Schema Bindings")
1117 (description
1118 "PyXB (\"pixbee\") is a pure Python package that generates Python source
1119code for classes that correspond to data structures defined by XMLSchema.")
1120 (license (list license:asl2.0 ; Most files.
1121 license:expat ; pyxb/utils/six.py
1122 license:gpl2 ; bundled jquery in doc is dual MIT/GPL2
1123 license:psfl)))) ; pyxb/utils/activestate.py
1124
1125(define-public python2-pyxb
1126 (package-with-python2 python-pyxb))
1127
37f9ff63
AE
1128(define-public xmlto
1129 (package
1130 (name "xmlto")
877a6466 1131 (version "0.0.28")
37f9ff63
AE
1132 (source
1133 (origin
1134 (method url-fetch)
7bc19c92
LF
1135 ;; The old source on fedorahosted.org is offline permanently:
1136 ;; <https://bugs.gnu.org/25989>
1137 (uri (string-append "mirror://debian/pool/main/x/xmlto/"
1138 "xmlto_" version ".orig.tar.bz2"))
1139 (file-name (string-append name "-" version ".tar.bz2"))
37f9ff63
AE
1140 (sha256
1141 (base32
877a6466 1142 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
37f9ff63 1143 (build-system gnu-build-system)
ae0c1202
LC
1144 (arguments
1145 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
1146 '(#:configure-flags (list (string-append "GETOPT="
1147 (assoc-ref %build-inputs
1148 "util-linux")
1149 "/bin/getopt"))))
14755541
MO
1150 (native-inputs
1151 `(("util-linux" ,util-linux)))
37f9ff63 1152 (inputs
ae0c1202
LC
1153 `(("util-linux" ,util-linux) ; for 'getopt'
1154 ("libxml2" ,libxml2) ; for 'xmllint'
1155 ("libxslt" ,libxslt))) ; for 'xsltproc'
37f9ff63
AE
1156 (home-page "http://cyberelk.net/tim/software/xmlto/")
1157 (synopsis "Front-end to an XSL toolchain")
1158 (description
1159 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
1160stylesheet for the conversion you want and applies it using an external
1161XSL-T processor. It also performs any necessary post-processing.")
1162 (license license:gpl2+)))
0899144f
AE
1163
1164(define-public xmlsec
1165 (package
1166 (name "xmlsec")
abe13f19 1167 (version "1.2.31")
0899144f 1168 (source (origin
50f5aa4b
TGR
1169 (method url-fetch)
1170 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
1171 "xmlsec1-" version ".tar.gz"))
1172 (sha256
1173 (base32
abe13f19 1174 "09hbbaz2d9hw645q27apkjs1mdr6vd85x5z3c9hzgr1iri9bq44v"))))
0899144f 1175 (build-system gnu-build-system)
50f5aa4b 1176 (propagated-inputs ; according to xmlsec1.pc
0899144f
AE
1177 `(("libxml2" ,libxml2)
1178 ("libxslt" ,libxslt)))
1179 (inputs
1180 `(("gnutls" ,gnutls)
1181 ("libgcrypt" ,libgcrypt)
1182 ("libltdl" ,libltdl)))
e4aab734
RW
1183 (native-inputs
1184 `(("pkg-config" ,pkg-config)))
a5b570b4 1185 (home-page "https://www.aleksey.com/xmlsec/")
0899144f
AE
1186 (synopsis "XML Security Library")
1187 (description
1188 "The XML Security Library is a C library based on Libxml2. It
1189supports XML security standards such as XML Signature, XML Encryption,
1190Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
1191Libxml2).")
1192 (license (license:x11-style "file://COPYING"
1193 "See 'COPYING' in the distribution."))))
96f8d991 1194
b4c9a317
MB
1195(define-public xmlsec-nss
1196 (package
1197 (inherit xmlsec)
1198 (name "xmlsec-nss")
3825b444
TGR
1199 (native-inputs
1200 ;; For tests.
1201 `(("nss:bin" ,nss "bin") ; for certutil
1202 ,@(package-native-inputs xmlsec)))
b4c9a317
MB
1203 (inputs
1204 `(("nss" ,nss)
1205 ("libltdl" ,libltdl)))
9128ca04
MB
1206 (arguments
1207 ;; NSS no longer supports MD5 since 3.59, don't attempt to use it.
1208 '(#:configure-flags '("--disable-md5")))
b4c9a317
MB
1209 (synopsis "XML Security Library (using NSS instead of GnuTLS)")))
1210
96f8d991
RW
1211(define-public minixml
1212 (package
1213 (name "minixml")
e29432ac 1214 (version "3.2")
96f8d991 1215 (source (origin
ee4e439a 1216 (method url-fetch)
eba9ecd4 1217 (uri (string-append "https://github.com/michaelrsweet/mxml/"
b7cbcee5 1218 "releases/download/v" version
eba9ecd4 1219 "/mxml-" version ".tar.gz"))
96f8d991
RW
1220 (sha256
1221 (base32
e29432ac 1222 "0x698ayv00vrjg0yfm20lakpgl7m02x1fk2n09wygwk4973gd55q"))))
96f8d991
RW
1223 (build-system gnu-build-system)
1224 (arguments
5b59c775
TGR
1225 `(#:configure-flags
1226 (list (string-append "LDFLAGS=-Wl,-rpath="
1227 (assoc-ref %outputs "out") "/lib"))
b7cbcee5 1228 #:tests? #f)) ; tests are run during build
e29432ac 1229 (home-page "https://www.msweet.org/mxml/")
96f8d991
RW
1230 (synopsis "Small XML parsing library")
1231 (description
1232 "Mini-XML is a small C library to read and write XML files and strings in
1233UTF-8 and UTF-16 encoding.")
1234 ;; LGPL 2.0+ with additional exceptions for static linking
1235 (license license:lgpl2.0+)))
33ae9107
DT
1236
1237;; TinyXML is an unmaintained piece of software, so the patches and build
1238;; system massaging have no upstream potential.
1239(define-public tinyxml
1240 (package
1241 (name "tinyxml")
1242 (version "2.6.2")
1243 (source (origin
1244 (method url-fetch)
de67e922
LF
1245 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
1246 version "/tinyxml_"
33ae9107
DT
1247 (string-join (string-split version #\.) "_")
1248 ".tar.gz"))
671249b9 1249 (file-name (string-append name "-" version ".tar.gz"))
33ae9107
DT
1250 (sha256
1251 (base32
1252 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
fc1adab1 1253 (patches (search-patches "tinyxml-use-stl.patch"))))
33ae9107
DT
1254 (build-system gnu-build-system)
1255 ;; This library is missing *a lot* of the steps to make it usable, so we
1256 ;; have to add them here, like every other distro must do.
1257 (arguments
1258 `(#:phases
1259 (modify-phases %standard-phases
1260 (delete 'configure)
1261 (add-after 'build 'build-shared-library
1262 (lambda _
0efb6452
EF
1263 (invoke "g++" "-Wall" "-O2" "-shared" "-fpic"
1264 "tinyxml.cpp" "tinyxmlerror.cpp"
1265 "tinyxmlparser.cpp" "tinystr.cpp"
1266 "-o" "libtinyxml.so")))
33ae9107 1267 (replace 'check
0efb6452 1268 (lambda _ (invoke "./xmltest")))
33ae9107
DT
1269 (replace 'install
1270 (lambda* (#:key outputs #:allow-other-keys)
1271 (let* ((out (assoc-ref outputs "out"))
1272 (include (string-append out "/include"))
1273 (lib (string-append out "/lib"))
1274 (pkgconfig (string-append out "/lib/pkgconfig"))
1275 (doc (string-append out "/share/doc")))
1276 ;; Install libs and headers.
1277 (install-file "libtinyxml.so" lib)
1278 (install-file "tinystr.h" include)
1279 (install-file "tinyxml.h" include)
1280 ;; Generate and install pkg-config file.
1281 (mkdir-p pkgconfig)
1282 ;; Software such as Kodi expect this file to be present, but
1283 ;; it's not provided in the source code.
1284 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
1285 (lambda (port)
1286 (format port "prefix=~a
1287exec_prefix=${prefix}
1288libdir=${exec_prefix}/lib
1289includedir=${prefix}/include
1290
1291Name: TinyXML
1292Description: A simple, small, C++ XML parser
1293Version: ~a
1294Libs: -L${libdir} -ltinyxml
1295Cflags: -I${includedir}
1296"
1297 out ,version)))
1298 ;; Install docs.
1299 (mkdir-p doc)
1300 (copy-recursively "docs" (string-append doc "tinyxml"))
1301 #t))))))
1302 (synopsis "Small XML parser for C++")
1303 (description "TinyXML is a small and simple XML parsing library for the
05077200 1304C++ programming language.")
33ae9107
DT
1305 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
1306 (license license:zlib)))
fe9451c5 1307
931bd7f6
TGR
1308(define-public tinyxml2
1309 (package
1310 (name "tinyxml2")
70d1e971 1311 (version "8.0.0")
931bd7f6
TGR
1312 (source
1313 (origin
4bad4fbd
TGR
1314 (method git-fetch)
1315 (uri (git-reference
b0e7b699 1316 (url "https://github.com/leethomason/tinyxml2")
4bad4fbd
TGR
1317 (commit version)))
1318 (file-name (git-file-name name version))
931bd7f6 1319 (sha256
70d1e971 1320 (base32 "0raa8r2hsagk7gjlqjwax95ib8d47ba79n91r4aws2zg8y6ssv1d"))))
931bd7f6 1321 (build-system cmake-build-system)
931bd7f6
TGR
1322 (synopsis "Small XML parser for C++")
1323 (description "TinyXML2 is a small and simple XML parsing library for the
1324C++ programming language.")
1325 (home-page "http://www.grinninglizard.com/tinyxml2/")
1326 (license license:zlib)))
1327
fe9451c5
RG
1328(define-public xmlstarlet
1329 (package
1330 (name "xmlstarlet")
1331 (version "1.6.1")
1332 (source
1333 (origin
1334 (method url-fetch)
1335 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1336 version "/xmlstarlet-" version ".tar.gz"))
1337 (sha256
1338 (base32
1339 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1340 (build-system gnu-build-system)
22ea0235
MB
1341 (arguments
1342 '(#:phases
1343 (modify-phases %standard-phases
1344 (add-before 'check 'drop-failing-tests
1345 (lambda _
1346 ;; FIXME: Why are these tests failing.
1347 (substitute* "Makefile"
1348 (("^examples/schema1\\\\") "\\")
1349 (("^examples/valid1\\\\") "\\"))
b04198a1
PL
1350 #t))
1351 (add-after 'install 'symlink-xmlstarlet
1352 (lambda* (#:key outputs #:allow-other-keys)
1353 ;; Other distros usually either rename or symlink the `xml' binary
1354 ;; as `xmlstarlet', let's do it as well for compatibility.
1355 (let* ((out (assoc-ref outputs "out"))
1356 (bin (string-append out "/bin")))
1357 (symlink "xml" (string-append bin "/xmlstarlet"))
1358 #t))))))
fe9451c5
RG
1359 (inputs
1360 `(("libxslt" ,libxslt)
1361 ("libxml2" ,libxml2)))
1362 (home-page "http://xmlstar.sourceforge.net/")
1363 (synopsis "Command line XML toolkit")
1364 (description "XMLStarlet is a set of command line utilities which can be
1365used to transform, query, validate, and edit XML documents. XPath is used to
1366match and extract data, and elements can be added, deleted or modified using
1367XSLT and EXSLT.")
1368 (license license:x11)))
19c33040 1369
767d24e8
SR
1370(define-public html-xml-utils
1371 (package
1372 (name "html-xml-utils")
57f5a774 1373 (version "7.9")
767d24e8
SR
1374 (source
1375 (origin
1376 (method url-fetch)
1377 (uri (string-append
1378 "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-"
1379 version ".tar.gz"))
1380 (sha256
57f5a774 1381 (base32 "0gs3xvdbzhk5k12i95p5d4fgkkaldnlv45sch7pnncb0lrpcjsnq"))))
767d24e8
SR
1382 (build-system gnu-build-system)
1383 (home-page "https://www.w3.org/Tools/HTML-XML-utils/")
1384 (synopsis "Command line utilities to manipulate HTML and XML files")
1385 (description "HTML-XML-utils provides a number of simple utilities for
1386manipulating and converting HTML and XML files in various ways. The suite
1387consists of the following tools:
1388
1389@itemize
1390 @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} entities
1391 @item @command{xml2asc} convert from @code{&#nnn;} entities to @code{UTF-8}
1392 @item @command{hxaddid} add IDs to selected elements
1393 @item @command{hxcite} replace bibliographic references by hyperlinks
1394 @item @command{hxcite} mkbib - expand references and create bibliography
1395 @item @command{hxclean} apply heuristics to correct an HTML file
1396 @item @command{hxcopy} copy an HTML file while preserving relative links
1397 @item @command{hxcount} count elements and attributes in HTML or XML files
1398 @item @command{hxextract} extract selected elements
1399 @item @command{hxincl} expand included HTML or XML files
1400 @item @command{hxindex} create an alphabetically sorted index
1401 @item @command{hxmkbib} create bibliography from a template
1402 @item @command{hxmultitoc} create a table of contents for a set of HTML files
1403 @item @command{hxname2id} move some @code{ID=} or @code{NAME=} from A
1404elements to their parents
1405 @item @command{hxnormalize} pretty-print an HTML file
1406 @item @command{hxnsxml} convert output of hxxmlns back to normal XML
1407 @item @command{hxnum} number section headings in an HTML file
1408 @item @command{hxpipe} convert XML to a format easier to parse with Perl or AWK
1409 @item @command{hxprintlinks} number links and add table of URLs at end of an HTML file
1410 @item @command{hxprune} remove marked elements from an HTML file
1411 @item @command{hxref} generate cross-references
1412 @item @command{hxselect} extract elements that match a (CSS) selector
1413 @item @command{hxtoc} insert a table of contents in an HTML file
1414 @item @command{hxuncdata} replace CDATA sections by character entities
1415 @item @command{hxunent} replace HTML predefined character entities to @code{UTF-8}
1416 @item @command{hxunpipe} convert output of pipe back to XML format
1417 @item @command{hxunxmlns} replace \"global names\" by XML Namespace prefixes
1418 @item @command{hxwls} list links in an HTML file
1419 @item @command{hxxmlns} replace XML Namespace prefixes by \"global names\"
1420@end itemize
1421")
1422 (license license:expat)))
1423
19c33040
JN
1424(define-public xlsx2csv
1425 (package
1426 (name "xlsx2csv")
3255fc3b 1427 (version "0.7.4")
3047c7ba
TGR
1428 (source
1429 (origin
1430 (method git-fetch)
1431 (uri (git-reference
b0e7b699 1432 (url "https://github.com/dilshod/xlsx2csv")
3047c7ba
TGR
1433 (commit version)))
1434 (file-name (git-file-name name version))
1435 (sha256
1436 (base32 "168dm6p7w6pvgd87yb9hcxv9y0liv6mxgril202nfva68cp8y939"))))
19c33040
JN
1437 (build-system python-build-system)
1438 (arguments
3255fc3b 1439 `(#:python ,python-2 ; use python-2 for the test script
19c33040
JN
1440 #:phases
1441 (modify-phases %standard-phases
1442 (replace 'check
1443 (lambda _
1444 (substitute* "test/run"
3255fc3b 1445 ;; Run tests with `python' only.
19c33040 1446 (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
aa6f87a2 1447 (invoke "test/run"))))))
19c33040
JN
1448 (home-page "https://github.com/dilshod/xlsx2csv")
1449 (synopsis "XLSX to CSV converter")
1450 (description
1451 "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
1452XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
1453files. It is designed to be fast and to handle large input files.")
1454 (license license:gpl2+)))
d2b51c08 1455
1456(define-public python-defusedxml
1457 (package
1458 (name "python-defusedxml")
4ee948e3 1459 (version "0.6.0")
d2b51c08 1460 (source
1461 (origin
1462 (method url-fetch)
1463 (uri (pypi-uri "defusedxml" version))
1464 (sha256
1465 (base32
4ee948e3 1466 "1xbp8fivl3wlbyg2jrvs4lalaqv1xp9a9f29p75wdx2s2d6h717n"))))
d2b51c08 1467 (build-system python-build-system)
1468 (home-page "https://bitbucket.org/tiran/defusedxml")
1469 (synopsis "XML bomb protection for Python stdlib modules")
1470 (description
1471 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1472 (license license:psfl)))
1473
1474(define-public python2-defusedxml
1475 (package-with-python2 python-defusedxml))
ca8f3f9a 1476
623fb4d1
AP
1477(define-public freexl
1478 (package
1479 (name "freexl")
6dce1251 1480 (version "1.0.6")
623fb4d1
AP
1481 (source (origin
1482 (method url-fetch)
4edc6bbd
TGR
1483 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1484 "freexl-" version ".tar.gz"))
623fb4d1
AP
1485 (sha256
1486 (base32
6dce1251 1487 "08pwj17l0lgp6zms9nmpawdxpvhzrslklbd53s4b430k7mxbbs1x"))))
623fb4d1
AP
1488 (build-system gnu-build-system)
1489 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1490 (synopsis "Read Excel files")
1491 (description
1492 "FreeXL is a C library to extract valid data from within an Excel (.xls)
1493spreadsheet.")
1494 ;; Any of these licenses may be picked.
1495 (license (list license:gpl2+
1496 license:lgpl2.1+
1497 license:mpl1.1))))
d00d6cea
RW
1498
1499(define-public xerces-c
1500 (package
1501 (name "xerces-c")
3e7a4867 1502 (version "3.2.3")
d00d6cea
RW
1503 (source (origin
1504 (method url-fetch)
1505 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1506 "xerces-c-" version ".tar.xz"))
1507 (sha256
1508 (base32
3e7a4867 1509 "0jf1khvlssg31vkxbc25dxjxcxm56xb8nywj1sypj6hxzjlrkz0j"))))
d00d6cea
RW
1510 (build-system gnu-build-system)
1511 (arguments
1512 (let ((system (or (%current-target-system)
1513 (%current-system))))
1514 (if (string-prefix? "x86_64" system)
1515 '()
1516 '(#:configure-flags '("--disable-sse2")))))
1517 (native-inputs
1518 `(("perl" ,perl)))
c61bfa08 1519 (home-page "https://xerces.apache.org/xerces-c/")
d00d6cea
RW
1520 (synopsis "Validating XML parser library for C++")
1521 (description "Xerces-C++ is a validating XML parser written in a portable
1522subset of C++. Xerces-C++ makes it easy to give your application the ability
1523to read and write XML data. A shared library is provided for parsing,
1524generating, manipulating, and validating XML documents using the DOM, SAX, and
1525SAX2 APIs.")
1526 (license license:asl2.0)))
77d7b57c 1527
53657739
EK
1528(define-public xlsxio
1529 (package
1530 (name "xlsxio")
38e5bc92 1531 (version "0.2.29")
53657739
EK
1532 (source
1533 (origin
1534 (method git-fetch)
1535 (uri (git-reference
1536 (url "https://github.com/brechtsanders/xlsxio")
1537 (commit version)))
1538 (file-name (git-file-name name version))
1539 (sha256
38e5bc92 1540 (base32 "0jr6ggzhd8aakdvppcl8scy9j9jafg82zbzr4ih996sz8lrj90fn"))))
53657739
EK
1541 (native-inputs
1542 `(("expat" ,expat)
1543 ("make" ,gnu-make)
1544 ("minizip" ,minizip)
1545 ("which" ,which)))
1546 (build-system gnu-build-system)
1547 (arguments
1548 `(#:phases
1549 (modify-phases %standard-phases
1550 (delete 'configure)
1551 (delete 'check)
1552 (replace 'install
1553 (lambda* (#:key outputs #:allow-other-keys)
1554 (invoke "make" "install"
1555 (string-append
1556 "PREFIX=" (assoc-ref outputs "out"))))))))
1557 (synopsis "C library for reading and writing .xlsx files")
1558 (description "XLSX I/O aims to provide a C library for reading and writing
1559.xlsx files. The .xlsx file format is the native format used by Microsoft(R)
1560Excel(TM) since version 2007.")
1561 (home-page "https://github.com/brechtsanders/xlsxio")
1562 (license license:expat)))
1563
77d7b57c
RW
1564(define-public java-simple-xml
1565 (package
1566 (name "java-simple-xml")
1567 (version "2.7.1")
1568 (source (origin
1569 (method url-fetch)
1570 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
1571 version ".zip"))
1572 (sha256
1573 (base32
3c274149
GB
1574 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))
1575 (patches (search-patches "java-simple-xml-fix-tests.patch"))))
77d7b57c
RW
1576 (build-system ant-build-system)
1577 (arguments
1578 `(#:build-target "build"
1579 #:test-target "test"
1580 #:phases
1581 (modify-phases %standard-phases
1582 (replace 'install (install-jars "jar")))))
1583 (native-inputs
1584 `(("unzip" ,unzip)))
1585 (home-page "http://simple.sourceforge.net/")
1586 (synopsis "XML serialization framework for Java")
1587 (description "Simple is a high performance XML serialization and
1588configuration framework for Java. Its goal is to provide an XML framework
1589that enables rapid development of XML configuration and communication systems.
1590This framework aids the development of XML systems with minimal effort and
1591reduced errors. It offers full object serialization and deserialization,
1592maintaining each reference encountered.")
1593 (license license:asl2.0)))
3b695802
P
1594
1595(define-public perl-xml-xpathengine
1596 (package
1597 (name "perl-xml-xpathengine")
1598 (version "0.14")
1599 (source (origin
1600 (method url-fetch)
1601 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1602 "XML-XPathEngine-" version ".tar.gz"))
1603 (sha256
1604 (base32
1605 "0r72na14bmsxfd16s9nlza155amqww0k8wsa9x2a3sqbpp5ppznj"))))
1606 (build-system perl-build-system)
9aba9b12 1607 (home-page "https://metacpan.org/release/XML-XPathEngine")
3b695802
P
1608 (synopsis "Re-usable XPath engine for DOM-like trees")
1609 (description
1610 "This module provides an XPath engine, that can be re-used by other
1611modules/classes that implement trees.
1612
2847df6b 1613In order to use the XPath engine, nodes in the user module need to mimic DOM
3b695802
P
1614nodes. The degree of similitude between the user tree and a DOM dictates how
1615much of the XPath features can be used. A module implementing all of the DOM
1616should be able to use this module very easily (you might need to add the
1617@code{cmp} method on nodes in order to get ordered result sets).")
1618 (license license:perl-license)))
9e1c3581
P
1619
1620(define-public perl-tree-xpathengine
1621 (package
1622 (name "perl-tree-xpathengine")
1623 (version "0.05")
1624 (source (origin
1625 (method url-fetch)
1626 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1627 "Tree-XPathEngine-" version ".tar.gz"))
1628 (sha256
1629 (base32
1630 "1vbbw8wxm79r3xbra8narw1dqvm34510q67wbmg2zmj6zd1k06r9"))))
1631 (build-system perl-build-system)
9aba9b12 1632 (home-page "https://metacpan.org/release/Tree-XPathEngine")
9e1c3581
P
1633 (synopsis "Re-usable XPath engine")
1634 (description
1635 "This module provides an XPath engine, that can be re-used by other
1636module/classes that implement trees. It is designed to be compatible with
1637@code{Class::XPath}, ie it passes its tests if you replace @code{Class::XPath}
1638by @code{Tree::XPathEngine}.")
1639 (license license:perl-license)))
b7c59195
P
1640
1641(define-public perl-xml-filter-buffertext
1642 (package
1643 (name "perl-xml-filter-buffertext")
1644 (version "1.01")
1645 (source
1646 (origin
1647 (method url-fetch)
1648 (uri (string-append "mirror://cpan/authors/id/R/RB/RBERJON/"
1649 "XML-Filter-BufferText-" version ".tar.gz"))
1650 (sha256
1651 (base32
1652 "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg"))))
1653 (build-system perl-build-system)
1654 (propagated-inputs
1655 `(("perl-xml-sax-base" ,perl-xml-sax-base)))
9aba9b12 1656 (home-page "https://metacpan.org/release/XML-Filter-BufferText")
b7c59195
P
1657 (synopsis "Filter to put all characters() in one event")
1658 (description "This is a very simple filter. One common cause of
1659grief (and programmer error) is that XML parsers aren't required to provide
1660character events in one chunk. They can, but are not forced to, and most
1661don't. This filter does the trivial but oft-repeated task of putting all
1662characters into a single event.")
1663 (license license:perl-license)))
33b592ee
P
1664
1665(define-public perl-xml-sax-writer
1666 (package
1667 (name "perl-xml-sax-writer")
1668 (version "0.57")
1669 (source (origin
1670 (method url-fetch)
1671 (uri (string-append
1672 "mirror://cpan/authors/id/P/PE/PERIGRIN/"
1673 "XML-SAX-Writer-" version ".tar.gz"))
1674 (sha256
1675 (base32
1676 "1w1cd1ybxdvhmnxdlkywi3x5ka3g4md42kyynksjc09vyizd0q9x"))))
1677 (build-system perl-build-system)
1678 (propagated-inputs
1679 `(("perl-libxml" ,perl-libxml)
1680 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
c695fb76 1681 ("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
33b592ee 1682 ("perl-xml-sax-base" ,perl-xml-sax-base)))
9aba9b12 1683 (home-page "https://metacpan.org/release/XML-SAX-Writer")
33b592ee
P
1684 (synopsis "SAX2 XML Writer")
1685 (description
1686 "This is an XML writer that understands SAX2. It is based on
1687@code{XML::Handler::YAWriter}.")
1688 (license license:perl-license)))
9e88b210
P
1689
1690(define-public perl-xml-handler-yawriter
1691 (package
1692 (name "perl-xml-handler-yawriter")
1693 (version "0.23")
1694 (source
1695 (origin
1696 (method url-fetch)
1697 (uri (string-append "mirror://cpan/authors/id/K/KR/KRAEHE/"
1698 "XML-Handler-YAWriter-" version ".tar.gz"))
1699 (sha256
1700 (base32
1701 "11d45a1sz862va9rry3p2m77pwvq3kpsvgwhc5ramh9mbszbnk77"))))
1702 (build-system perl-build-system)
1703 (propagated-inputs
1704 `(("perl-libxml" ,perl-libxml)))
9aba9b12 1705 (home-page "https://metacpan.org/release/XML-Handler-YAWriter")
9e88b210
P
1706 (synopsis "Yet another Perl SAX XML Writer")
1707 (description "YAWriter implements Yet Another @code{XML::Handler::Writer}.
1708It provides a flexible escaping technique and pretty printing.")
1709 (license license:perl-license)))
85f225fb
P
1710
1711(define-public perl-xml-twig
1712 (package
1713 (name "perl-xml-twig")
1714 (version "3.52")
1715 (source (origin
1716 (method url-fetch)
1717 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1718 "XML-Twig-" version ".tar.gz"))
1719 (sha256
1720 (base32
1721 "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy"))))
1722 (build-system perl-build-system)
1723 (inputs
1724 `(("expat" ,expat)))
1725 (propagated-inputs
1726 `(("perl-html-tidy" ,perl-html-tidy)
1727 ("perl-html-tree" ,perl-html-tree)
1728 ("perl-io-captureoutput" ,perl-io-captureoutput)
1729 ("perl-io-string" ,perl-io-string)
1730 ("perl-io-stringy" ,perl-io-stringy)
1731 ("perl-libxml" ,perl-libxml)
1732 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1733 ("perl-xml-handler-yawriter" ,perl-xml-handler-yawriter)
1734 ("perl-xml-parser" ,perl-xml-parser)
1735 ("perl-xml-sax-writer" ,perl-xml-sax-writer)
1736 ("perl-xml-simple" ,perl-xml-simple)
1737 ("perl-xml-xpathengine" ,perl-xml-xpathengine)
c695fb76 1738 ("perl-test-pod" ,perl-test-pod)
85f225fb 1739 ("perl-tree-xpathengine" ,perl-tree-xpathengine)))
9aba9b12 1740 (home-page "https://metacpan.org/release/XML-Twig")
85f225fb
P
1741 (synopsis "Perl module for processing huge XML documents in tree mode")
1742 (description "@code{XML::Twig} is an XML transformation module. Its
1743strong points: can be used to process huge documents while still being in tree
1744mode; not bound by DOM or SAX, so it is very perlish and offers a very
1745comprehensive set of methods; simple to use; DWIMs as much as possible.
1746
1747What it doesn't offer: full SAX support (it can export SAX, but only reads
1748XML), full XPath support (unless you use @code{XML::Twig::XPath}), nor DOM
1749support.")
1750 (license license:perl-license)))
1a17ca26
JL
1751
1752;; TODO: Debian builds several jars out of this: jaxp-1.4.jar,
1753;; xml-apis.jar and xml-apis-1.4.01.jar.
1754(define-public java-jaxp
1755 (package
1756 (name "java-jaxp")
1757 (version "1.4.01")
1758 (source
1759 (origin
1760 (method url-fetch)
1761 (uri (string-append "mirror://apache/xerces/xml-commons/source/"
1762 "xml-commons-external-" version "-src.tar.gz"))
1763 (sha256
1764 (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk"))))
1765 (build-system ant-build-system)
1766 (arguments
1767 `(#:jar-name "jaxp.jar"
1768 #:jdk ,icedtea-8
1769 #:source-dir ".."
1770 #:tests? #f)); no tests
1771 (home-page "http://xerces.apache.org/xml-commons/")
1772 (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)")
1773 (description "Jaxp from the Apache XML Commons project is used by
1774the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs:
1775
1776@itemize
1777@item Document Object Model (DOM)
1778@item Simple API for XML (SAX)
1779@item Java APIs for XML Processing (JAXP)
1780@item Transformation API for XML (TrAX)
1781@item Document Object Model (DOM) Load and Save
1782@item JSR 206 Java API for XML Processing
1783@end itemize")
1784 (license (list license:asl2.0
1785 license:w3c ;; Files under org.w3c
1786 license:public-domain)))) ;; org.xml.sax
9a86ee78
JL
1787
1788(define-public java-apache-xml-commons-resolver
1789 (package
1790 (name "java-apache-xml-commons-resolver")
1791 (version "1.2")
1792 (source
1793 (origin
1794 (method url-fetch)
1795 (uri (string-append "mirror://apache/xerces/xml-commons/"
1796 "xml-commons-resolver-" version ".tar.gz"))
1797 (sha256
1798 (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm"))
1799 (modules '((guix build utils)))
1800 (snippet
1801 '(begin
1802 (for-each delete-file (find-files "." ".*\\.(jar|zip)"))
1803 #t))))
1804 (build-system ant-build-system)
1805 (arguments
1806 `(#:jar-name (string-append "xml-resolver.jar")
1807 #:tests? #f)); no tests
1808 (inputs
1809 `(("java-junit" ,java-junit)))
1810 (home-page "http://xerces.apache.org/xml-commons/")
1811 (synopsis "Catalog-based entity and URI resolution")
1812 (description "The resolver class implements the full semantics of OASIS Technical
1813Resolution 9401:1997 (Amendment 2 to TR 9401) catalogs and the 06 Aug
18142001 Committee Specification of OASIS XML Catalogs.
1815
1816It also includes a framework of classes designed to read catalog files
1817in a number of formats:
1818
1819@itemize
1820@item The plain-text flavor described by TR9401.
1821@item The XCatalog XML format defined by John Cowan
1822@item The XML Catalog format defined by the OASIS Entity Resolution
1823 Technical Committee.
1824@end itemize")
1825 (license license:asl2.0)))
7eae94d8
JL
1826
1827;; Jaxen requires java-dom4j and java-xom that in turn require jaxen.
1828;; This package is a bootstrap version without dependencies on dom4j and xom.
1829(define java-jaxen-bootstrap
1830 (package
1831 (name "java-jaxen-bootstrap")
1832 (version "1.1.6")
1833 (source (origin
1834 (method url-fetch)
1835 ;; No release on github
1836 (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/"
1837 version "/jaxen-" version "-sources.jar"))
1838 (sha256
1839 (base32
1840 "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx"))))
1841 (build-system ant-build-system)
1842 (arguments
1843 `(#:jar-name "jaxen.jar"
1844 #:source-dir "src"
1845 #:tests? #f; no tests
1846 #:phases
1847 (modify-phases %standard-phases
1848 (add-before 'build 'remove-dom4j
1849 (lambda _
1850 (delete-file-recursively "src/org/jaxen/dom4j")
1851 (delete-file-recursively "src/org/jaxen/xom")
1852 #t)))))
1853 (inputs
1854 `(("java-jdom" ,java-jdom)))
1855 (home-page "https://github.com/jaxen-xpath/jaxen")
1856 (synopsis "XPath library")
1857 (description "Jaxen is an XPath library written in Java. It is adaptable
1858to many different object models, including DOM, XOM, dom4j, and JDOM. It is
1859also possible to write adapters that treat non-XML trees such as compiled
1860Java byte code or Java beans as XML, thus enabling you to query these trees
1861with XPath too.")
1862 (license license:bsd-3)))
5552080d 1863
be0524f4
JL
1864(define-public java-jaxen
1865 (package
1866 (inherit java-jaxen-bootstrap)
1867 (name "java-jaxen")
1868 (inputs
1869 `(("java-jdom" ,java-jdom)
1870 ("java-xom" ,java-xom)
1871 ("java-dom4j" ,java-dom4j)))))
1872
5552080d
JL
1873(define-public java-xom
1874 (package
1875 (name "java-xom")
1876 (version "127")
1877 (source (origin
eed5e162
TGR
1878 (method git-fetch)
1879 (uri (git-reference
b0e7b699 1880 (url "https://github.com/elharo/xom")
eed5e162
TGR
1881 (commit (string-append "XOM_" version))))
1882 (file-name (git-file-name name version))
5552080d
JL
1883 (sha256
1884 (base32
eed5e162 1885 "1jh6y03g5zzdhsb5jm6ms1xnamr460qmn96y3w6aw0ikfwqlg0bq"))
5552080d
JL
1886 (modules '((guix build utils)))
1887 (snippet
1888 '(begin
1889 (for-each delete-file
1890 (find-files "." "\\.jar$"))
1891 #t))))
1892 (build-system ant-build-system)
1893 (arguments
1894 `(#:jar-name "xom.jar"
1895 #:jdk ,icedtea-8
eed5e162 1896 #:tests? #f ; no tests
5552080d
JL
1897 #:phases
1898 (modify-phases %standard-phases
eed5e162
TGR
1899 (add-after 'unpack 'make-git-checkout-writable
1900 (lambda _
1901 (for-each make-file-writable (find-files "."))
1902 #t))
5552080d
JL
1903 (add-before 'configure 'fix-tagsoup-dep
1904 (lambda _
1905 ;; FIXME: Where is tagsoup source?
1906 (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java")
1907 #t)))))
1908 (inputs
1909 `(("java-jdom" ,java-jdom)
1910 ("java-junit" ,java-junit)
1911 ("java-classpathx-servletapi" ,java-classpathx-servletapi)
1912 ("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
1913 ("java-xerces" ,java-xerces)))
1914 (home-page "https://xom.nu/")
1915 (synopsis "XML Object Model")
1916 (description "XOM is a new XML Object Model for processing XML with Java
1917that strives for correctness and simplicity.")
1918 ;; 2.1 only
1919 (license license:lgpl2.1)))
96f31935
JL
1920
1921(define-public java-xsdlib
1922 (package
1923 (name "java-xsdlib")
1924 (version "2013.2")
1925 (source (origin
1926 (method url-fetch)
c3d56df5 1927 (uri (string-append "https://repo1.maven.org/maven2/com/sun/msv/"
96f31935
JL
1928 "datatype/xsd/xsdlib/" version "/xsdlib-"
1929 version "-sources.jar"))
1930 (sha256
1931 (base32
1932 "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim"))))
1933 (build-system ant-build-system)
1934 (arguments
1935 `(#:tests? #f; no tests
1936 #:jar-name "xsdlib.jar"
1937 #:jdk ,icedtea-8))
1938 (inputs
1939 `(("java-xerces" ,java-xerces)))
c3d56df5
BH
1940 (home-page (string-append "https://web.archive.org/web/20161127144537/"
1941 "https://msv.java.net//"))
96f31935
JL
1942 (synopsis "Sun Multi-Schema Validator")
1943 (description "Xsdlib contains an implementation of sun.com.msv, an XML
1944validator.")
1945 (license license:bsd-2)))
82d7d4e1
JL
1946
1947(define-public java-xpp3
1948 (package
1949 (name "java-xpp3")
1950 (version "1.1.4")
1951 (source (origin
1952 (method url-fetch)
1953 (uri (string-append "http://www.extreme.indiana.edu/dist/"
1954 "java-repository/xpp3/distributions/xpp3-"
1955 version "_src.tgz"))
1956 (sha256
1957 (base32
1958 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
1959 (modules '((guix build utils)))
1960 (snippet
1961 '(begin ;; Delete bundled jar archives.
1962 (for-each delete-file (find-files "." ".*\\.jar"))
1963 #t))))
1964 (build-system ant-build-system)
1965 (arguments
1966 `(#:tests? #f; no tests
1967 #:build-target "jar"
1968 #:phases
1969 (modify-phases %standard-phases
1970 (replace 'install (install-jars "build")))))
1971 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
1972 (synopsis "Streaming pull XML parser")
1973 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
1974parser and should be used when there is a need to process quickly and
1975efficiently all input elements (for example in SOAP processors). This
1976package is a stable XmlPull parsing engine that is based on ideas from XPP
1977and in particular XPP2 but completely revised and rewritten to take the best
1978advantage of JIT JVMs.")
1979 (license (license:non-copyleft "file://LICENSE.txt"))))
9421f682
JL
1980
1981(define-public java-xmlpull2
1982 (package
1983 (name "java-xmlpull2")
1984 (version "2.1.10")
1985 (source (origin
1986 (method url-fetch)
1987 (uri (string-append "http://www.extreme.indiana.edu/xgws/xsoap/"
1988 "PullParser/PullParser" version ".tgz"))
1989 (sha256
1990 (base32
1991 "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md"))
1992 (modules '((guix build utils)))
1993 (snippet
1994 '(begin ;; Delete bundled jar archives.
1995 (for-each delete-file (find-files "." ".*\\.jar"))
1996 #t))))
1997 (build-system ant-build-system)
1998 (arguments
1999 `(#:tests? #f; no tests
2000 #:build-target "impl"
2001 #:phases
2002 (modify-phases %standard-phases
2003 (replace 'install (install-jars "build/lib")))))
2004 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
2005 (synopsis "Streaming pull XML parser")
2006 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
2007parser and should be used when there is a need to process quickly and
2008efficiently all input elements (for example in SOAP processors). This
2009package is in maintenance mode.")
2010 (license (license:non-copyleft "file:///LICENSE.txt"))))
605c23df
JL
2011
2012(define-public java-dom4j
2013 (package
2014 (name "java-dom4j")
f1afdaf4 2015 (version "2.1.1")
605c23df 2016 (source (origin
9d670526
TGR
2017 (method git-fetch)
2018 (uri (git-reference
b0e7b699 2019 (url "https://github.com/dom4j/dom4j")
9d670526
TGR
2020 (commit (string-append "version-" version))))
2021 (file-name (git-file-name name version))
605c23df
JL
2022 (sha256
2023 (base32
f1afdaf4 2024 "0q907srj9v4hwicpcrn4slyld5npf2jv7hzchsgrg29q2xmbwkdl"))
605c23df
JL
2025 (modules '((guix build utils)))
2026 (snippet
2027 '(begin ;; Delete bundled jar archives.
2028 (for-each delete-file (find-files "." ".*\\.jar"))
2029 #t))))
2030 (build-system ant-build-system)
2031 (arguments
2032 `(#:jar-name "dom4j.jar"
2033 #:jdk ,icedtea-8
2034 #:source-dir "src/main/java"
2035 ;; FIXME: Requires xalan, but xalan depends on java-cup which has a
2036 ;; dependency on itself through jflex.
2037 #:tests? #f
2038 #:phases
2039 (modify-phases %standard-phases
2040 (add-before 'build 'copy-jaxen-sources
2041 ;; java-jaxen-bootstrap is not enough. These files have a circular
2042 ;; dependency and there is no subset of dom4j that would allow
2043 ;; breaking the circle.
2044 (lambda* (#:key inputs #:allow-other-keys)
2045 (mkdir-p "jaxen-sources")
2046 (with-directory-excursion "jaxen-sources"
2047 (system* "jar" "xf" (assoc-ref inputs "java-jaxen-sources")))
2048 (mkdir-p "src/main/java/org/jaxen/dom4j")
2049 (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java"
2050 "src/main/java/org/jaxen/dom4j/DocumentNavigator.java")
2051 (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java"
2052 "src/main/java/org/jaxen/dom4j/Dom4jXPath.java")
2053 #t))
2054 (add-before 'build 'fix-old-xpp2
2055 (lambda _
2056 ;; This package normally depends on xpp2 2.0, but version 2.1.10
2057 ;; is the only version whose source code is published.
2058 (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java"
2059 (("public void resetStartTag")
2060 "public boolean removeAttributeByRawName(String name) {\n
2061 return false;\n
2062}\n
2063public boolean removeAttributeByName(String name, String name2) {\n
2064 return false;\n
2065}\n\npublic void resetStartTag")
2066 (("Atttribute") "Attribute"))
2067 #t)))))
2068 (inputs
2069 `(("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
2070 ("java-jaxen-sources" ,(package-source java-jaxen-bootstrap))
2071 ("java-xmlpull2" ,java-xmlpull2)
2072 ("java-xpp3" ,java-xpp3)
2073 ("java-xsdlib" ,java-xsdlib)))
2074 (native-inputs
2075 `(("java-testng" ,java-testng)
2076 ("java-xerces" ,java-xerces)))
2077 (home-page "https://dom4j.github.io/")
2078 (synopsis "Flexible XML framework for Java")
2079 (description "Dom4j is a flexible XML framework for Java. DOM4J works
2080with DOM, SAX, XPath, and XSLT. It can parse large XML documents with very
2081low memory footprint.")
2082 ;; some BSD-like 5-clause license
2083 (license (license:non-copyleft "file://LICENSE"))))
3058d8ec
JL
2084
2085(define-public java-kxml2
2086 (package
2087 (name "java-kxml2")
2088 (version "2.4.2")
2089 (source (origin
00fc9389
TGR
2090 (method git-fetch)
2091 (uri (git-reference
b0e7b699 2092 (url "https://github.com/stefanhaustein/kxml2")
00fc9389
TGR
2093 (commit (string-append "v" version))))
2094 (file-name (git-file-name name version))
3058d8ec
JL
2095 (sha256
2096 (base32
00fc9389 2097 "0g6d8c9r9sh3x04sf4wdpgwvhkqvk11k3kq9skx91i60h4vn01hg"))))
3058d8ec
JL
2098 (build-system ant-build-system)
2099 (arguments
2100 `(#:jar-name "kxml2.jar"
2101 #:source-dir "src/main/java"
2102 #:test-include (list "TestWb.java")
2103 ;; Test failure: it was expected to get an XML entity but got the
2104 ;; equivalent Unicode character instead.
2105 #:tests? #f
2106 #:phases
2107 (modify-phases %standard-phases
00fc9389
TGR
2108 (add-after 'unpack 'make-git-checkout-writable
2109 (lambda _
2110 (for-each make-file-writable (find-files "."))
2111 #t))
3058d8ec
JL
2112 (add-before 'build 'copy-resources
2113 (lambda _
aa6f87a2
MW
2114 (copy-recursively "src/main/resources" "build/classes")
2115 #t)))))
3058d8ec
JL
2116 (inputs
2117 `(("java-xpp3" ,java-xpp3)))
2118 (native-inputs
2119 `(("java-junit" ,java-junit)))
2120 (home-page "http://kxml.org")
2121 (synopsis "XML pull parser")
2122 (description "kXML is a small XML pull parser, specially designed for
2123constrained environments such as Applets, Personal Java or devices compliant
2124with the Mobile Information Device Profile (MIDP).")
2125 (license license:expat)))
4c7759f0
JL
2126
2127(define-public java-stax
2128 (package
2129 (name "java-stax")
2130 (version "1.2.0")
2131 (source (origin
2132 (method url-fetch)
2133 (uri (string-append "https://repo1.maven.org/maven2/stax/stax/"
2134 version "/stax-" version "-sources.jar"))
2135 (sha256
2136 (base32
2137 "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z"))))
2138 (build-system ant-build-system)
2139 (arguments
2140 `(#:jar-name "stax.jar"
2141 #:tests? #f; no tests
2142 #:phases
2143 (modify-phases %standard-phases
2144 (add-before 'configure 'fix-utf8
2145 (lambda _
2146 ;; This file is ISO-8859-1 but java expects UTF-8.
2147 ;; Remove special characters in comments.
2148 (with-fluids ((%default-port-encoding "ISO-8859-1"))
2149 (substitute* "src/com/wutka/dtd/Scanner.java"
2150 (("//.*") "\n")))
2151 #t)))))
2152 (home-page "https://repo1.maven.org/maven2/stax/stax/")
2153 (synopsis "Streaming API for XML")
2154 (description "This package provides the reference implementation of the
2155@dfn{Streaming API for XML} (StAX). It is used for streaming XML data to
2156and from a Java application. It provides a standard pull parser interface.")
2157 (license license:asl2.0)))
b8798817
JL
2158
2159(define-public java-jettison
2160 (package
2161 (name "java-jettison")
2162 (version "1.3.7")
2163 (source (origin
a4b96726
TGR
2164 (method git-fetch)
2165 (uri (git-reference
b0e7b699 2166 (url "https://github.com/codehaus/jettison")
a4b96726
TGR
2167 (commit (string-append "jettison-" version))))
2168 (file-name (git-file-name name version))
b8798817
JL
2169 (sha256
2170 (base32
a4b96726 2171 "15sydmi5chdh4126qc7v8bsrp7fp4ldaya8a05iby4pq2324q0qw"))))
b8798817
JL
2172 (build-system ant-build-system)
2173 (arguments
2174 `(#:jar-name "jettison.jar"
2175 #:source-dir "src/main/java"
2176 #:test-exclude (list "**/Abstract*.java"
2177 ;; Abstract classes
2178 "**/DOMTest.java"
2179 "**/BadgerFishDOMTest.java"
2180 "**/MappedDOMTest.java")))
2181 (native-inputs
2182 `(("java-junit" ,java-junit)))
2183 (home-page "https://github.com/codehaus/jettison")
2184 (synopsis "StAX implementation for JSON")
2185 (description "Jettison is a Java library for converting XML to JSON and
2186vice-versa with the help of the @dfn{Streaming API for XML} (StAX). It
2187implements @code{XMLStreamWriter} and @code{XMLStreamReader} and supports
2188@code{Mapped} and @code{BadgerFish} conventions.")
2189 (license license:asl2.0)))
a5ec8a5c
JL
2190
2191(define-public java-jdom2
2192 (package
2193 (name "java-jdom")
2194 (version "2.0.6")
2195 (source (origin
951bdf5a
TGR
2196 (method git-fetch)
2197 (uri (git-reference
b0e7b699 2198 (url "https://github.com/hunterhacker/jdom")
951bdf5a
TGR
2199 (commit (string-append "JDOM-" version))))
2200 (file-name (git-file-name name version))
a5ec8a5c
JL
2201 (sha256
2202 (base32
951bdf5a 2203 "14vv1kxrsdvwi4cz3rx6r48w5y6fvk9cymil8qhvxwp56xxrgxiq"))))
a5ec8a5c
JL
2204 (build-system ant-build-system)
2205 (arguments
2206 `(#:build-target "package"
951bdf5a 2207 #:tests? #f ; tests are run as part of the build process
a5ec8a5c
JL
2208 #:phases
2209 (modify-phases %standard-phases
2210 (replace 'install
2211 (install-jars "build")))))
2212 (home-page "http://jdom.org/")
2213 (synopsis "Access, manipulate, and output XML data")
2214 (description "Jdom is a Java-based solution for accessing, manipulating, and
2215outputting XML data from Java code.")
2216 (license license:bsd-4)))
5ee7b02f
JL
2217
2218(define-public java-xstream
2219 (package
2220 (name "java-xstream")
fdf7095e 2221 (version "1.4.15")
b05bc3c4
TGR
2222 (source
2223 (origin
2224 (method git-fetch)
2225 (uri (git-reference
b0e7b699 2226 (url "https://github.com/x-stream/xstream")
b05bc3c4
TGR
2227 (commit (string-append
2228 "XSTREAM_"
2229 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
2230 version)))))
2231 (file-name (git-file-name name version))
2232 (sha256
fdf7095e 2233 (base32 "1178qryrjwjp44439pi5dxzd32896r5zs429z1qhlc09951r7mi9"))))
5ee7b02f
JL
2234 (build-system ant-build-system)
2235 (arguments
2236 `(#:jar-name "xstream.jar"
b05bc3c4 2237 ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system.
5ee7b02f
JL
2238 #:tests? #f
2239 #:jdk ,icedtea-8
2240 #:source-dir "xstream/src/java"))
2241 (inputs
2242 `(("java-jdom" ,java-jdom)
2243 ("java-jdom2" ,java-jdom2)
2244 ("java-cglib" ,java-cglib)
2245 ("java-joda-time" ,java-joda-time)
2246 ("java-jettison" ,java-jettison)
2247 ("java-xom" ,java-xom)
2248 ("java-xpp3" ,java-xpp3)
2249 ("java-dom4j" ,java-dom4j)
2250 ("java-stax2-api" ,java-stax2-api)
2251 ("java-woodstox-core" ,java-woodstox-core)
2252 ("java-kxml2" ,java-kxml2)
2253 ("java-stax" ,java-stax)))
2254 (home-page "https://x-stream.github.io")
2255 (synopsis "XML serialization library")
2256 (description "XStream is a simple library to serialize Java objects to XML
2257and back again.")
2258 (license license:bsd-3)))
5c1cf7f3 2259
2cce23bf
PN
2260(define-public xmlrpc-c
2261 (package
2262 (name "xmlrpc-c")
2263 (version "1.43.08")
2264 (source (origin
2265 (method url-fetch)
2266 (uri (string-append "mirror://sourceforge/xmlrpc-c/Xmlrpc-c%20Super%20Stable/"
2267 version "/xmlrpc-c-" version ".tgz"))
2268 (sha256
2269 (base32
2270 "18zwbj6i2hpcn5riiyp8i6rml0sfv60dd7phw1x8g4r4lj2bbxf9"))))
2271 (build-system gnu-build-system)
2272 (inputs
2273 `(("curl" ,curl)))
2274 (native-inputs
2275 `(;; For tools, if ever needed.
2276 ("perl" ,perl)))
2277 (arguments
2278 `(#:make-flags ; Add $libdir to the RUNPATH of all the executables.
2279 (list (string-append "LDFLAGS_PERSONAL=-Wl,-rpath=" %output "/lib"))
2280 #:phases
2281 (modify-phases %standard-phases
2282 (add-after 'unpack 'fix-/bin/sh-in-tests
2283 (lambda _
2284 (substitute* "GNUmakefile"
2285 (("#! /bin/sh") (which "sh")))
2286 #t)))))
2287 (home-page "http://xmlrpc-c.sourceforge.net/")
2288 (synopsis "Lightweight RPC library based on XML and HTTP")
2289 (description
2290 "XML-RPC is a quick-and-easy way to make procedure calls over the Internet.
2291It converts the procedure call into an XML document, sends it to a remote
2292server using HTTP, and gets back the response as XML. This library provides a
2293modular implementation of XML-RPC for C and C++.")
2294 (license (list license:psfl license:expat))))
79a0eabd 2295
a34eafce
MC
2296(define-public opensp
2297 (package
2298 (name "opensp")
2299 (version "1.5.2")
2300 (source (origin
2301 (method url-fetch)
2302 (uri (string-append "mirror://sourceforge/openjade/opensp/"
2303 version "/OpenSP-" version ".tar.gz"))
2304 (sha256
2305 (base32
2306 "1khpasr6l0a8nfz6kcf3s81vgdab8fm2dj291n5r2s53k228kx2p"))))
de99dc48 2307 (outputs '("out" "doc"))
a34eafce
MC
2308 (build-system gnu-build-system)
2309 (native-inputs
a34eafce
MC
2310 `(("docbook-xml" ,docbook-xml-4.1.2)
2311 ("docbook-xsl" ,docbook-xsl)
de99dc48
MC
2312 ("libxml2" ,libxml2) ;for XML_CATALOG_DIR
2313 ("xmlto" ,xmlto)
2314 ;; Dependencies to regenerate the 'configure' script.
2315 ("autoconf" ,autoconf)
2316 ("automake" ,automake)
2317 ("gettext" ,gettext-minimal)
2318 ("libtool" ,libtool)))
a34eafce 2319 (arguments
de99dc48
MC
2320 `( ;; Note: we cannot use '--enable-full-doc-build' as this would require
2321 ;; Openjade, which in turn requires this package.
2322
2323 ;; Skip the tests that are known to fail (see:
2324 ;; https://sourceforge.net/p/openjade/mailman/message/6182316/)
2325 #:make-flags '("TESTS_THAT_FAIL=")
a34eafce
MC
2326 #:phases
2327 (modify-phases %standard-phases
2328 (add-after 'unpack 'patch-docbook-paths
2329 (lambda* (#:key inputs #:allow-other-keys)
2330 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
2331 "/xml/dtd/docbook"))
2332 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
2333 "/xml/xsl/docbook-xsl-"
2334 ,(package-version docbook-xsl))))
2335 (substitute* (find-files "docsrc" "\\.xml$")
2336 (("/usr/share/sgml/docbook/xml-dtd-4.1.2") xmldoc)
2337 (("http://.*/docbookx\\.dtd")
2338 (string-append xmldoc "/docbookx.dtd")))
de99dc48
MC
2339 #t)))
2340 (add-after 'patch-docbook-paths 'delete-configure
2341 ;; The configure script in the release was made with an older
2342 ;; Autoconf and lacks support for the `--docdir' option.
2343 (lambda _
2344 (delete-file "configure")
2345 #t))
2346 (add-after 'delete-configure 'honor-docdir
2347 ;; docdir is not honored due to being hardcoded in the various
2348 ;; Makefile.am (see: https://sourceforge.net/p/openjade/bugs/147/).
2349 (lambda _
2350 (substitute* '("Makefile.am" "doc/Makefile.am" "docsrc/Makefile.am")
2351 (("^docdir = .*") "docdir = @docdir@\n"))
2352 #t))
2353 (add-after 'delete-configure 'fix-tests-makefile.am
2354 ;; Remove the trailing $(SHELL) from the TESTS_ENVIRONMENT variable
2355 ;; definition. Otherwise, when targets are built using
2356 ;; "$(am__check_pre) $(LOG_DRIVER) [...]", there would be two
2357 ;; $(SHELL) expansion which fails the build.
2358 (lambda _
2359 (substitute* "tests/Makefile.am"
2360 (("^\tOSGMLNORM=`echo osgmlnorm\\|sed '\\$\\(transform\\)'`\\\\")
2361 "\tOSGMLNORM=`echo osgmlnorm|sed '$(transform)'`")
2362 (("^\t\\$\\(SHELL\\)\n") ""))
2363 #t)))))
2364 ;; $SGML_CATALOG_FILES lists 'catalog' or 'CATALOG' or '*.cat' files found
2365 ;; under the 'sgml' sub-directory of any given package.
2366 (native-search-paths (list (search-path-specification
2367 (variable "SGML_CATALOG_FILES")
2368 (separator ":")
2369 (files '("sgml"))
2370 (file-pattern "^catalog$|^CATALOG$|^.*\\.cat$")
2371 (file-type 'regular))))
a34eafce
MC
2372 (home-page "http://openjade.sourceforge.net/")
2373 (synopsis "Suite of SGML/XML processing tools")
2374 (description "OpenSP is an object-oriented toolkit for SGML parsing and
de99dc48
MC
2375entity management. It is a fork of James Clark's SP suite. The tools it
2376contains can be used to parse, validate, and normalize SGML and XML files.
2377The central program included in this package is @code{onsgmls}, which replaces
2378@code{sgmls}, @code{ospam}, @code{ospent}, @code{osgmlnorm}, and @code{osx}.")
a34eafce
MC
2379 (license
2380 ;; expat license with added clause regarding advertising
2381 (license:non-copyleft
2382 "file://COPYING"
2383 "See COPYING in the distribution."))))
2384
8fda8b7d
MB
2385(define-public python-elementpath
2386 (package
2387 (name "python-elementpath")
e272783b 2388 (version "1.4.0")
8fda8b7d
MB
2389 (source
2390 (origin
2391 (method url-fetch)
2392 (uri (pypi-uri "elementpath" version))
2393 (sha256
2394 (base32
e272783b 2395 "15h7d41v48q31hzjay7qzixdv531hnga3h35hksk7x52pgqcrkz7"))))
8fda8b7d
MB
2396 (build-system python-build-system)
2397 (home-page
2398 "https://github.com/sissaschool/elementpath")
2399 (synopsis
2400 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
2401 (description
2402 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
2403for Python's ElementTree XML data structures, both for the standard
2404ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
2405
2406For lxml.etree this package can be useful for providing XPath 2.0 selectors,
2407because lxml.etree already has it's own implementation of XPath 1.0.")
2408 (license license:expat)))
2409
55e1475c
MB
2410(define-public python-lxml
2411 (package
2412 (name "python-lxml")
2413 (version "4.4.2")
2414 (source
2415 (origin
2416 (method url-fetch)
2417 (uri (pypi-uri "lxml" version))
2418 (sha256
2419 (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg"))))
2420 (build-system python-build-system)
2421 (arguments
2422 `(#:phases (modify-phases %standard-phases
2423 (replace 'check
2424 (lambda _
2425 (invoke "make" "test"))))))
2426 (inputs
2427 `(("libxml2" ,libxml2)
2428 ("libxslt" ,libxslt)))
2429 (home-page "https://lxml.de/")
2430 (synopsis "Python XML processing library")
2431 (description
2432 "The lxml XML toolkit is a Pythonic binding for the C libraries
2433libxml2 and libxslt.")
2434 (license license:bsd-3))) ; and a few more, see LICENSES.txt
2435
2436(define-public python2-lxml
2437 (package-with-python2 python-lxml))
2438
c950a2a5
MB
2439(define-public python-xmlschema
2440 (package
2441 (name "python-xmlschema")
447f9acf 2442 (version "1.1.2")
c950a2a5 2443 (source (origin
f8a94609
MB
2444 ;; Unit tests are not distributed with the PyPI archive.
2445 (method git-fetch)
2446 (uri (git-reference
2447 (url "https://github.com/sissaschool/xmlschema")
2448 (commit (string-append "v" version))))
2449 (file-name (git-file-name name version))
c950a2a5
MB
2450 (sha256
2451 (base32
447f9acf 2452 "03bz5mp45y4shmlc1gxq1h69vjx60z1acg9cy4kq7fczgx8qg9jw"))))
c950a2a5
MB
2453 (build-system python-build-system)
2454 (arguments
2455 '(#:phases
2456 (modify-phases %standard-phases
2457 (replace 'check
2458 (lambda* (#:key (tests? #t) #:allow-other-keys)
2459 (if tests?
2460 (begin
2461 (setenv "PYTHONPATH"
2462 (string-append "./build/lib:"
2463 (getenv "PYTHONPATH")))
f8a94609 2464 (invoke "python" "-m" "unittest" "-v"))
c950a2a5
MB
2465 (format #t "test suite not run~%"))
2466 #t)))))
2467 (native-inputs
2468 `(("python-lxml" ,python-lxml))) ;for tests
2469 (propagated-inputs
2470 `(("python-elementpath" ,python-elementpath)))
2471 (home-page "https://github.com/sissaschool/xmlschema")
2472 (synopsis "XML Schema validator and data conversion library")
2473 (description
2474 "The @code{xmlschema} library is an implementation of
2475@url{https://www.w3.org/2001/XMLSchema, XML Schema} for Python. It has
2476full support for the XSD 1.0 and 1.1 standards, an XPath-based API for
2477finding schema's elements and attributes; and can encode and decode
2478XML data to JSON and other formats.")
2479 (license license:expat)))
2480
79a0eabd
OP
2481(define-public python-xmltodict
2482 (package
2483 (name "python-xmltodict")
f3e073b4 2484 (version "0.12.0")
79a0eabd 2485 (source
db1adb42
BG
2486 (origin
2487 (method url-fetch)
2488 (uri (pypi-uri "xmltodict" version))
2489 (sha256
2490 (base32
2491 "08cadlb9vsb4pmzc99lz3a2lx6qcfazyvgk10pcqijvyxlwcdn2h"))))
79a0eabd
OP
2492 (build-system python-build-system)
2493 (native-inputs
2494 `(("python-coverage" ,python-coverage)
2495 ("python-nose" ,python-nose)))
2496 (home-page "https://github.com/martinblech/xmltodict")
2497 (synopsis "Work with XML like you are working with JSON")
2498 (description "This package provides a Python library to convert XML to
2499@code{OrderedDict}.")
2500 (license license:expat)))