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