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