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