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