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