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