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