gnu: Add paperview.
[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")
bceadaf4 98 (version "1.4.0")
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
bceadaf4 105 (base32 "1cy4hbk8qbxn4c6pwvlsvr1rp8vhfach9rwfg4c50qa94nlckaw0"))))
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)
246455c2 821 (native-inputs
822 `(("perl-module-build" ,perl-module-build)
823 ("perl-uri" ,perl-uri)
824 ("perl-class-data-inheritable" ,perl-class-data-inheritable)))
40b793fd 825 (propagated-inputs
246455c2 826 `(("perl-class-errorhandler" ,perl-class-errorhandler)
827 ("perl-datetime" ,perl-datetime)
f2a53a4a
PG
828 ("perl-datetime-format-flexible" ,perl-datetime-format-flexible)
829 ("perl-datetime-format-iso8601" ,perl-datetime-format-iso8601)
246455c2 830 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
f2a53a4a 831 ("perl-datetime-format-natural" ,perl-datetime-format-natural)
246455c2 832 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
833 ("perl-feed-find" ,perl-feed-find)
834 ("perl-html-parser" ,perl-html-parser)
835 ("perl-libwww-perl" ,perl-libwww)
836 ("perl-module-pluggable" ,perl-module-pluggable)
837 ("perl-uri-fetch" ,perl-uri-fetch)
838 ("perl-xml-atom" ,perl-xml-atom)
839 ("perl-xml-libxml" ,perl-xml-libxml)
840 ("perl-xml-rss" ,perl-xml-rss)))
9aba9b12 841 (home-page "https://metacpan.org/release/XML-Feed")
246455c2 842 (synopsis "XML Syndication Feed Support")
843 (description "@code{XML::Feed} is a syndication feed parser for both RSS and
844Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI.
845@code{XML::Feed} supports the following syndication feed formats:
846RSS 0.91, RSS 1.0, RSS 2.0, Atom")
2f3108ad 847 (license license:perl-license)))
246455c2 848
0c1bab36 849(define-public perl-xml-xpath
850 (package
851 (name "perl-xml-xpath")
fc82538c 852 (version "1.44")
0c1bab36 853 (source (origin
854 (method url-fetch)
855 (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
856 "XML-XPath-" version ".tar.gz"))
857 (sha256
858 (base32
fc82538c 859 "03yxj7w5a43ibbpiqsvb3lswj2b71dydsx4rs2fw0p8n0l3i3j8w"))))
0c1bab36 860 (build-system perl-build-system)
861 (native-inputs
862 `(("perl-path-tiny" ,perl-path-tiny)))
9332d706 863 (propagated-inputs
0c1bab36 864 `(("perl-xml-parser" ,perl-xml-parser)))
9aba9b12 865 (home-page "https://metacpan.org/release/XML-XPath")
0c1bab36 866 (synopsis "Parse and evaluate XPath statements")
867 (description
868 "This module aims to comply exactly to the @url{XPath specification,
869https://www.w3.org/TR/xpath} and yet allow extensions to be added in
870the form of functions.")
2f3108ad 871 (license license:perl-license)))
0c1bab36 872
6ce212b8
RW
873(define-public pugixml
874 (package
875 (name "pugixml")
bc134c77 876 (version "1.10")
6ce212b8
RW
877 (source
878 (origin
879 (method url-fetch)
0562a81e
EF
880 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
881 version "/pugixml-" version ".tar.gz"))
6ce212b8 882 (sha256
bc134c77 883 (base32 "02l7nllhydggf7s64d2x84kckbmwag4lsn28sc82953hnkxrkwsm"))))
6ce212b8
RW
884 (build-system cmake-build-system)
885 (arguments
7fda7b8f 886 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
bc134c77 887 #:tests? #f)) ; no tests
7fda7b8f
MB
888 (native-inputs
889 `(("pkg-config" ,pkg-config)))
28655227 890 (home-page "https://pugixml.org")
6ce212b8
RW
891 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
892 (description
893 "pugixml is a C++ XML processing library, which consists of a DOM-like
894interface with rich traversal/modification capabilities, a fast XML parser
895which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
896implementation for complex data-driven tree queries. Full Unicode support is
897also available, with Unicode interface variants and conversions between
898different Unicode encodings which happen automatically during
899parsing/saving.")
900 (license license:expat)))
901
c2efe1ae
MB
902(define-public python-pyxb
903 (package
904 (name "python-pyxb")
4ef6cfef 905 (version "1.2.6")
c2efe1ae
MB
906 (source (origin
907 (method url-fetch)
908 (uri (pypi-uri "PyXB" version))
909 (sha256
910 (base32
4ef6cfef 911 "1d17pyixbfvjyi2lb0cfp0ch8wwdf44mmg3r5pwqhyyqs66z601a"))))
c2efe1ae
MB
912 (build-system python-build-system)
913 (home-page "http://pyxb.sourceforge.net/")
914 (synopsis "Python XML Schema Bindings")
915 (description
916 "PyXB (\"pixbee\") is a pure Python package that generates Python source
917code for classes that correspond to data structures defined by XMLSchema.")
918 (license (list license:asl2.0 ; Most files.
919 license:expat ; pyxb/utils/six.py
920 license:gpl2 ; bundled jquery in doc is dual MIT/GPL2
921 license:psfl)))) ; pyxb/utils/activestate.py
922
923(define-public python2-pyxb
924 (package-with-python2 python-pyxb))
925
37f9ff63
AE
926(define-public xmlto
927 (package
928 (name "xmlto")
877a6466 929 (version "0.0.28")
37f9ff63
AE
930 (source
931 (origin
932 (method url-fetch)
7bc19c92
LF
933 ;; The old source on fedorahosted.org is offline permanently:
934 ;; <https://bugs.gnu.org/25989>
935 (uri (string-append "mirror://debian/pool/main/x/xmlto/"
936 "xmlto_" version ".orig.tar.bz2"))
937 (file-name (string-append name "-" version ".tar.bz2"))
37f9ff63
AE
938 (sha256
939 (base32
877a6466 940 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
37f9ff63 941 (build-system gnu-build-system)
ae0c1202
LC
942 (arguments
943 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
944 '(#:configure-flags (list (string-append "GETOPT="
945 (assoc-ref %build-inputs
946 "util-linux")
947 "/bin/getopt"))))
14755541
MO
948 (native-inputs
949 `(("util-linux" ,util-linux)))
37f9ff63 950 (inputs
ae0c1202
LC
951 `(("util-linux" ,util-linux) ; for 'getopt'
952 ("libxml2" ,libxml2) ; for 'xmllint'
953 ("libxslt" ,libxslt))) ; for 'xsltproc'
37f9ff63
AE
954 (home-page "http://cyberelk.net/tim/software/xmlto/")
955 (synopsis "Front-end to an XSL toolchain")
956 (description
957 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
958stylesheet for the conversion you want and applies it using an external
959XSL-T processor. It also performs any necessary post-processing.")
960 (license license:gpl2+)))
0899144f
AE
961
962(define-public xmlsec
963 (package
964 (name "xmlsec")
f9fee9d3 965 (version "1.2.30")
0899144f 966 (source (origin
50f5aa4b
TGR
967 (method url-fetch)
968 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
969 "xmlsec1-" version ".tar.gz"))
970 (sha256
971 (base32
f9fee9d3 972 "1j5bf7ni45jghyrbf7a14wx2pvfara557zyry7g7h8840c5kd11d"))))
0899144f 973 (build-system gnu-build-system)
50f5aa4b 974 (propagated-inputs ; according to xmlsec1.pc
0899144f
AE
975 `(("libxml2" ,libxml2)
976 ("libxslt" ,libxslt)))
977 (inputs
978 `(("gnutls" ,gnutls)
979 ("libgcrypt" ,libgcrypt)
980 ("libltdl" ,libltdl)))
e4aab734
RW
981 (native-inputs
982 `(("pkg-config" ,pkg-config)))
a5b570b4 983 (home-page "https://www.aleksey.com/xmlsec/")
0899144f
AE
984 (synopsis "XML Security Library")
985 (description
986 "The XML Security Library is a C library based on Libxml2. It
987supports XML security standards such as XML Signature, XML Encryption,
988Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
989Libxml2).")
990 (license (license:x11-style "file://COPYING"
991 "See 'COPYING' in the distribution."))))
96f8d991 992
b4c9a317
MB
993(define-public xmlsec-nss
994 (package
995 (inherit xmlsec)
996 (name "xmlsec-nss")
3825b444
TGR
997 (native-inputs
998 ;; For tests.
999 `(("nss:bin" ,nss "bin") ; for certutil
1000 ,@(package-native-inputs xmlsec)))
b4c9a317
MB
1001 (inputs
1002 `(("nss" ,nss)
1003 ("libltdl" ,libltdl)))
1004 (synopsis "XML Security Library (using NSS instead of GnuTLS)")))
1005
96f8d991
RW
1006(define-public minixml
1007 (package
1008 (name "minixml")
5b59c775 1009 (version "2.12")
96f8d991 1010 (source (origin
ee4e439a 1011 (method url-fetch)
eba9ecd4 1012 (uri (string-append "https://github.com/michaelrsweet/mxml/"
b7cbcee5 1013 "releases/download/v" version
eba9ecd4 1014 "/mxml-" version ".tar.gz"))
96f8d991
RW
1015 (sha256
1016 (base32
ee4e439a 1017 "0kq3wiycb40dcyswvajrqb1n5ffm5xcnsfxxaml92vhpl6x57yvb"))))
96f8d991
RW
1018 (build-system gnu-build-system)
1019 (arguments
5b59c775
TGR
1020 `(#:configure-flags
1021 (list (string-append "LDFLAGS=-Wl,-rpath="
1022 (assoc-ref %outputs "out") "/lib"))
b7cbcee5 1023 #:tests? #f)) ; tests are run during build
eba9ecd4 1024 (home-page "https://michaelrsweet.github.io/mxml")
96f8d991
RW
1025 (synopsis "Small XML parsing library")
1026 (description
1027 "Mini-XML is a small C library to read and write XML files and strings in
1028UTF-8 and UTF-16 encoding.")
1029 ;; LGPL 2.0+ with additional exceptions for static linking
1030 (license license:lgpl2.0+)))
33ae9107
DT
1031
1032;; TinyXML is an unmaintained piece of software, so the patches and build
1033;; system massaging have no upstream potential.
1034(define-public tinyxml
1035 (package
1036 (name "tinyxml")
1037 (version "2.6.2")
1038 (source (origin
1039 (method url-fetch)
de67e922
LF
1040 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
1041 version "/tinyxml_"
33ae9107
DT
1042 (string-join (string-split version #\.) "_")
1043 ".tar.gz"))
671249b9 1044 (file-name (string-append name "-" version ".tar.gz"))
33ae9107
DT
1045 (sha256
1046 (base32
1047 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
fc1adab1 1048 (patches (search-patches "tinyxml-use-stl.patch"))))
33ae9107
DT
1049 (build-system gnu-build-system)
1050 ;; This library is missing *a lot* of the steps to make it usable, so we
1051 ;; have to add them here, like every other distro must do.
1052 (arguments
1053 `(#:phases
1054 (modify-phases %standard-phases
1055 (delete 'configure)
1056 (add-after 'build 'build-shared-library
1057 (lambda _
0efb6452
EF
1058 (invoke "g++" "-Wall" "-O2" "-shared" "-fpic"
1059 "tinyxml.cpp" "tinyxmlerror.cpp"
1060 "tinyxmlparser.cpp" "tinystr.cpp"
1061 "-o" "libtinyxml.so")))
33ae9107 1062 (replace 'check
0efb6452 1063 (lambda _ (invoke "./xmltest")))
33ae9107
DT
1064 (replace 'install
1065 (lambda* (#:key outputs #:allow-other-keys)
1066 (let* ((out (assoc-ref outputs "out"))
1067 (include (string-append out "/include"))
1068 (lib (string-append out "/lib"))
1069 (pkgconfig (string-append out "/lib/pkgconfig"))
1070 (doc (string-append out "/share/doc")))
1071 ;; Install libs and headers.
1072 (install-file "libtinyxml.so" lib)
1073 (install-file "tinystr.h" include)
1074 (install-file "tinyxml.h" include)
1075 ;; Generate and install pkg-config file.
1076 (mkdir-p pkgconfig)
1077 ;; Software such as Kodi expect this file to be present, but
1078 ;; it's not provided in the source code.
1079 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
1080 (lambda (port)
1081 (format port "prefix=~a
1082exec_prefix=${prefix}
1083libdir=${exec_prefix}/lib
1084includedir=${prefix}/include
1085
1086Name: TinyXML
1087Description: A simple, small, C++ XML parser
1088Version: ~a
1089Libs: -L${libdir} -ltinyxml
1090Cflags: -I${includedir}
1091"
1092 out ,version)))
1093 ;; Install docs.
1094 (mkdir-p doc)
1095 (copy-recursively "docs" (string-append doc "tinyxml"))
1096 #t))))))
1097 (synopsis "Small XML parser for C++")
1098 (description "TinyXML is a small and simple XML parsing library for the
05077200 1099C++ programming language.")
33ae9107
DT
1100 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
1101 (license license:zlib)))
fe9451c5 1102
931bd7f6
TGR
1103(define-public tinyxml2
1104 (package
1105 (name "tinyxml2")
70d1e971 1106 (version "8.0.0")
931bd7f6
TGR
1107 (source
1108 (origin
4bad4fbd
TGR
1109 (method git-fetch)
1110 (uri (git-reference
b0e7b699 1111 (url "https://github.com/leethomason/tinyxml2")
4bad4fbd
TGR
1112 (commit version)))
1113 (file-name (git-file-name name version))
931bd7f6 1114 (sha256
70d1e971 1115 (base32 "0raa8r2hsagk7gjlqjwax95ib8d47ba79n91r4aws2zg8y6ssv1d"))))
931bd7f6 1116 (build-system cmake-build-system)
931bd7f6
TGR
1117 (synopsis "Small XML parser for C++")
1118 (description "TinyXML2 is a small and simple XML parsing library for the
1119C++ programming language.")
1120 (home-page "http://www.grinninglizard.com/tinyxml2/")
1121 (license license:zlib)))
1122
fe9451c5
RG
1123(define-public xmlstarlet
1124 (package
1125 (name "xmlstarlet")
1126 (version "1.6.1")
1127 (source
1128 (origin
1129 (method url-fetch)
1130 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1131 version "/xmlstarlet-" version ".tar.gz"))
1132 (sha256
1133 (base32
1134 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1135 (build-system gnu-build-system)
22ea0235
MB
1136 (arguments
1137 '(#:phases
1138 (modify-phases %standard-phases
1139 (add-before 'check 'drop-failing-tests
1140 (lambda _
1141 ;; FIXME: Why are these tests failing.
1142 (substitute* "Makefile"
1143 (("^examples/schema1\\\\") "\\")
1144 (("^examples/valid1\\\\") "\\"))
1145 #t)))))
fe9451c5
RG
1146 (inputs
1147 `(("libxslt" ,libxslt)
1148 ("libxml2" ,libxml2)))
1149 (home-page "http://xmlstar.sourceforge.net/")
1150 (synopsis "Command line XML toolkit")
1151 (description "XMLStarlet is a set of command line utilities which can be
1152used to transform, query, validate, and edit XML documents. XPath is used to
1153match and extract data, and elements can be added, deleted or modified using
1154XSLT and EXSLT.")
1155 (license license:x11)))
19c33040 1156
767d24e8
SR
1157(define-public html-xml-utils
1158 (package
1159 (name "html-xml-utils")
bafafa80 1160 (version "7.8")
767d24e8
SR
1161 (source
1162 (origin
1163 (method url-fetch)
1164 (uri (string-append
1165 "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-"
1166 version ".tar.gz"))
1167 (sha256
bafafa80 1168 (base32 "0p8df3c6mw879vdi8l63kbdqylkf1is10b067mh9kipgfy91rd4s"))))
767d24e8
SR
1169 (build-system gnu-build-system)
1170 (home-page "https://www.w3.org/Tools/HTML-XML-utils/")
1171 (synopsis "Command line utilities to manipulate HTML and XML files")
1172 (description "HTML-XML-utils provides a number of simple utilities for
1173manipulating and converting HTML and XML files in various ways. The suite
1174consists of the following tools:
1175
1176@itemize
1177 @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} entities
1178 @item @command{xml2asc} convert from @code{&#nnn;} entities to @code{UTF-8}
1179 @item @command{hxaddid} add IDs to selected elements
1180 @item @command{hxcite} replace bibliographic references by hyperlinks
1181 @item @command{hxcite} mkbib - expand references and create bibliography
1182 @item @command{hxclean} apply heuristics to correct an HTML file
1183 @item @command{hxcopy} copy an HTML file while preserving relative links
1184 @item @command{hxcount} count elements and attributes in HTML or XML files
1185 @item @command{hxextract} extract selected elements
1186 @item @command{hxincl} expand included HTML or XML files
1187 @item @command{hxindex} create an alphabetically sorted index
1188 @item @command{hxmkbib} create bibliography from a template
1189 @item @command{hxmultitoc} create a table of contents for a set of HTML files
1190 @item @command{hxname2id} move some @code{ID=} or @code{NAME=} from A
1191elements to their parents
1192 @item @command{hxnormalize} pretty-print an HTML file
1193 @item @command{hxnsxml} convert output of hxxmlns back to normal XML
1194 @item @command{hxnum} number section headings in an HTML file
1195 @item @command{hxpipe} convert XML to a format easier to parse with Perl or AWK
1196 @item @command{hxprintlinks} number links and add table of URLs at end of an HTML file
1197 @item @command{hxprune} remove marked elements from an HTML file
1198 @item @command{hxref} generate cross-references
1199 @item @command{hxselect} extract elements that match a (CSS) selector
1200 @item @command{hxtoc} insert a table of contents in an HTML file
1201 @item @command{hxuncdata} replace CDATA sections by character entities
1202 @item @command{hxunent} replace HTML predefined character entities to @code{UTF-8}
1203 @item @command{hxunpipe} convert output of pipe back to XML format
1204 @item @command{hxunxmlns} replace \"global names\" by XML Namespace prefixes
1205 @item @command{hxwls} list links in an HTML file
1206 @item @command{hxxmlns} replace XML Namespace prefixes by \"global names\"
1207@end itemize
1208")
1209 (license license:expat)))
1210
19c33040
JN
1211(define-public xlsx2csv
1212 (package
1213 (name "xlsx2csv")
3255fc3b 1214 (version "0.7.4")
3047c7ba
TGR
1215 (source
1216 (origin
1217 (method git-fetch)
1218 (uri (git-reference
b0e7b699 1219 (url "https://github.com/dilshod/xlsx2csv")
3047c7ba
TGR
1220 (commit version)))
1221 (file-name (git-file-name name version))
1222 (sha256
1223 (base32 "168dm6p7w6pvgd87yb9hcxv9y0liv6mxgril202nfva68cp8y939"))))
19c33040
JN
1224 (build-system python-build-system)
1225 (arguments
3255fc3b 1226 `(#:python ,python-2 ; use python-2 for the test script
19c33040
JN
1227 #:phases
1228 (modify-phases %standard-phases
1229 (replace 'check
1230 (lambda _
1231 (substitute* "test/run"
3255fc3b 1232 ;; Run tests with `python' only.
19c33040 1233 (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
aa6f87a2 1234 (invoke "test/run"))))))
19c33040
JN
1235 (home-page "https://github.com/dilshod/xlsx2csv")
1236 (synopsis "XLSX to CSV converter")
1237 (description
1238 "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
1239XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
1240files. It is designed to be fast and to handle large input files.")
1241 (license license:gpl2+)))
d2b51c08 1242
1243(define-public python-defusedxml
1244 (package
1245 (name "python-defusedxml")
4ee948e3 1246 (version "0.6.0")
d2b51c08 1247 (source
1248 (origin
1249 (method url-fetch)
1250 (uri (pypi-uri "defusedxml" version))
1251 (sha256
1252 (base32
4ee948e3 1253 "1xbp8fivl3wlbyg2jrvs4lalaqv1xp9a9f29p75wdx2s2d6h717n"))))
d2b51c08 1254 (build-system python-build-system)
1255 (home-page "https://bitbucket.org/tiran/defusedxml")
1256 (synopsis "XML bomb protection for Python stdlib modules")
1257 (description
1258 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1259 (license license:psfl)))
1260
1261(define-public python2-defusedxml
1262 (package-with-python2 python-defusedxml))
ca8f3f9a 1263
623fb4d1
AP
1264(define-public freexl
1265 (package
1266 (name "freexl")
5275f69e 1267 (version "1.0.5")
623fb4d1
AP
1268 (source (origin
1269 (method url-fetch)
1270 (uri (string-append "http://www.gaia-gis.it/gaia-sins/"
1271 name "-" version ".tar.gz"))
1272 (sha256
1273 (base32
5275f69e 1274 "03bmwq6hngmzwpqpb7c2amqlspz4q69iv96nlf0f5c0qs98b3j9x"))))
623fb4d1
AP
1275 (build-system gnu-build-system)
1276 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1277 (synopsis "Read Excel files")
1278 (description
1279 "FreeXL is a C library to extract valid data from within an Excel (.xls)
1280spreadsheet.")
1281 ;; Any of these licenses may be picked.
1282 (license (list license:gpl2+
1283 license:lgpl2.1+
1284 license:mpl1.1))))
d00d6cea
RW
1285
1286(define-public xerces-c
1287 (package
1288 (name "xerces-c")
3e7a4867 1289 (version "3.2.3")
d00d6cea
RW
1290 (source (origin
1291 (method url-fetch)
1292 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1293 "xerces-c-" version ".tar.xz"))
1294 (sha256
1295 (base32
3e7a4867 1296 "0jf1khvlssg31vkxbc25dxjxcxm56xb8nywj1sypj6hxzjlrkz0j"))))
d00d6cea
RW
1297 (build-system gnu-build-system)
1298 (arguments
1299 (let ((system (or (%current-target-system)
1300 (%current-system))))
1301 (if (string-prefix? "x86_64" system)
1302 '()
1303 '(#:configure-flags '("--disable-sse2")))))
1304 (native-inputs
1305 `(("perl" ,perl)))
c61bfa08 1306 (home-page "https://xerces.apache.org/xerces-c/")
d00d6cea
RW
1307 (synopsis "Validating XML parser library for C++")
1308 (description "Xerces-C++ is a validating XML parser written in a portable
1309subset of C++. Xerces-C++ makes it easy to give your application the ability
1310to read and write XML data. A shared library is provided for parsing,
1311generating, manipulating, and validating XML documents using the DOM, SAX, and
1312SAX2 APIs.")
1313 (license license:asl2.0)))
77d7b57c
RW
1314
1315(define-public java-simple-xml
1316 (package
1317 (name "java-simple-xml")
1318 (version "2.7.1")
1319 (source (origin
1320 (method url-fetch)
1321 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
1322 version ".zip"))
1323 (sha256
1324 (base32
3c274149
GB
1325 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))
1326 (patches (search-patches "java-simple-xml-fix-tests.patch"))))
77d7b57c
RW
1327 (build-system ant-build-system)
1328 (arguments
1329 `(#:build-target "build"
1330 #:test-target "test"
1331 #:phases
1332 (modify-phases %standard-phases
1333 (replace 'install (install-jars "jar")))))
1334 (native-inputs
1335 `(("unzip" ,unzip)))
1336 (home-page "http://simple.sourceforge.net/")
1337 (synopsis "XML serialization framework for Java")
1338 (description "Simple is a high performance XML serialization and
1339configuration framework for Java. Its goal is to provide an XML framework
1340that enables rapid development of XML configuration and communication systems.
1341This framework aids the development of XML systems with minimal effort and
1342reduced errors. It offers full object serialization and deserialization,
1343maintaining each reference encountered.")
1344 (license license:asl2.0)))
3b695802
P
1345
1346(define-public perl-xml-xpathengine
1347 (package
1348 (name "perl-xml-xpathengine")
1349 (version "0.14")
1350 (source (origin
1351 (method url-fetch)
1352 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1353 "XML-XPathEngine-" version ".tar.gz"))
1354 (sha256
1355 (base32
1356 "0r72na14bmsxfd16s9nlza155amqww0k8wsa9x2a3sqbpp5ppznj"))))
1357 (build-system perl-build-system)
9aba9b12 1358 (home-page "https://metacpan.org/release/XML-XPathEngine")
3b695802
P
1359 (synopsis "Re-usable XPath engine for DOM-like trees")
1360 (description
1361 "This module provides an XPath engine, that can be re-used by other
1362modules/classes that implement trees.
1363
2847df6b 1364In order to use the XPath engine, nodes in the user module need to mimic DOM
3b695802
P
1365nodes. The degree of similitude between the user tree and a DOM dictates how
1366much of the XPath features can be used. A module implementing all of the DOM
1367should be able to use this module very easily (you might need to add the
1368@code{cmp} method on nodes in order to get ordered result sets).")
1369 (license license:perl-license)))
9e1c3581
P
1370
1371(define-public perl-tree-xpathengine
1372 (package
1373 (name "perl-tree-xpathengine")
1374 (version "0.05")
1375 (source (origin
1376 (method url-fetch)
1377 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1378 "Tree-XPathEngine-" version ".tar.gz"))
1379 (sha256
1380 (base32
1381 "1vbbw8wxm79r3xbra8narw1dqvm34510q67wbmg2zmj6zd1k06r9"))))
1382 (build-system perl-build-system)
9aba9b12 1383 (home-page "https://metacpan.org/release/Tree-XPathEngine")
9e1c3581
P
1384 (synopsis "Re-usable XPath engine")
1385 (description
1386 "This module provides an XPath engine, that can be re-used by other
1387module/classes that implement trees. It is designed to be compatible with
1388@code{Class::XPath}, ie it passes its tests if you replace @code{Class::XPath}
1389by @code{Tree::XPathEngine}.")
1390 (license license:perl-license)))
b7c59195
P
1391
1392(define-public perl-xml-filter-buffertext
1393 (package
1394 (name "perl-xml-filter-buffertext")
1395 (version "1.01")
1396 (source
1397 (origin
1398 (method url-fetch)
1399 (uri (string-append "mirror://cpan/authors/id/R/RB/RBERJON/"
1400 "XML-Filter-BufferText-" version ".tar.gz"))
1401 (sha256
1402 (base32
1403 "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg"))))
1404 (build-system perl-build-system)
1405 (propagated-inputs
1406 `(("perl-xml-sax-base" ,perl-xml-sax-base)))
9aba9b12 1407 (home-page "https://metacpan.org/release/XML-Filter-BufferText")
b7c59195
P
1408 (synopsis "Filter to put all characters() in one event")
1409 (description "This is a very simple filter. One common cause of
1410grief (and programmer error) is that XML parsers aren't required to provide
1411character events in one chunk. They can, but are not forced to, and most
1412don't. This filter does the trivial but oft-repeated task of putting all
1413characters into a single event.")
1414 (license license:perl-license)))
33b592ee
P
1415
1416(define-public perl-xml-sax-writer
1417 (package
1418 (name "perl-xml-sax-writer")
1419 (version "0.57")
1420 (source (origin
1421 (method url-fetch)
1422 (uri (string-append
1423 "mirror://cpan/authors/id/P/PE/PERIGRIN/"
1424 "XML-SAX-Writer-" version ".tar.gz"))
1425 (sha256
1426 (base32
1427 "1w1cd1ybxdvhmnxdlkywi3x5ka3g4md42kyynksjc09vyizd0q9x"))))
1428 (build-system perl-build-system)
1429 (propagated-inputs
1430 `(("perl-libxml" ,perl-libxml)
1431 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
c695fb76 1432 ("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
33b592ee 1433 ("perl-xml-sax-base" ,perl-xml-sax-base)))
9aba9b12 1434 (home-page "https://metacpan.org/release/XML-SAX-Writer")
33b592ee
P
1435 (synopsis "SAX2 XML Writer")
1436 (description
1437 "This is an XML writer that understands SAX2. It is based on
1438@code{XML::Handler::YAWriter}.")
1439 (license license:perl-license)))
9e88b210
P
1440
1441(define-public perl-xml-handler-yawriter
1442 (package
1443 (name "perl-xml-handler-yawriter")
1444 (version "0.23")
1445 (source
1446 (origin
1447 (method url-fetch)
1448 (uri (string-append "mirror://cpan/authors/id/K/KR/KRAEHE/"
1449 "XML-Handler-YAWriter-" version ".tar.gz"))
1450 (sha256
1451 (base32
1452 "11d45a1sz862va9rry3p2m77pwvq3kpsvgwhc5ramh9mbszbnk77"))))
1453 (build-system perl-build-system)
1454 (propagated-inputs
1455 `(("perl-libxml" ,perl-libxml)))
9aba9b12 1456 (home-page "https://metacpan.org/release/XML-Handler-YAWriter")
9e88b210
P
1457 (synopsis "Yet another Perl SAX XML Writer")
1458 (description "YAWriter implements Yet Another @code{XML::Handler::Writer}.
1459It provides a flexible escaping technique and pretty printing.")
1460 (license license:perl-license)))
85f225fb
P
1461
1462(define-public perl-xml-twig
1463 (package
1464 (name "perl-xml-twig")
1465 (version "3.52")
1466 (source (origin
1467 (method url-fetch)
1468 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1469 "XML-Twig-" version ".tar.gz"))
1470 (sha256
1471 (base32
1472 "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy"))))
1473 (build-system perl-build-system)
1474 (inputs
1475 `(("expat" ,expat)))
1476 (propagated-inputs
1477 `(("perl-html-tidy" ,perl-html-tidy)
1478 ("perl-html-tree" ,perl-html-tree)
1479 ("perl-io-captureoutput" ,perl-io-captureoutput)
1480 ("perl-io-string" ,perl-io-string)
1481 ("perl-io-stringy" ,perl-io-stringy)
1482 ("perl-libxml" ,perl-libxml)
1483 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1484 ("perl-xml-handler-yawriter" ,perl-xml-handler-yawriter)
1485 ("perl-xml-parser" ,perl-xml-parser)
1486 ("perl-xml-sax-writer" ,perl-xml-sax-writer)
1487 ("perl-xml-simple" ,perl-xml-simple)
1488 ("perl-xml-xpathengine" ,perl-xml-xpathengine)
c695fb76 1489 ("perl-test-pod" ,perl-test-pod)
85f225fb 1490 ("perl-tree-xpathengine" ,perl-tree-xpathengine)))
9aba9b12 1491 (home-page "https://metacpan.org/release/XML-Twig")
85f225fb
P
1492 (synopsis "Perl module for processing huge XML documents in tree mode")
1493 (description "@code{XML::Twig} is an XML transformation module. Its
1494strong points: can be used to process huge documents while still being in tree
1495mode; not bound by DOM or SAX, so it is very perlish and offers a very
1496comprehensive set of methods; simple to use; DWIMs as much as possible.
1497
1498What it doesn't offer: full SAX support (it can export SAX, but only reads
1499XML), full XPath support (unless you use @code{XML::Twig::XPath}), nor DOM
1500support.")
1501 (license license:perl-license)))
1a17ca26
JL
1502
1503;; TODO: Debian builds several jars out of this: jaxp-1.4.jar,
1504;; xml-apis.jar and xml-apis-1.4.01.jar.
1505(define-public java-jaxp
1506 (package
1507 (name "java-jaxp")
1508 (version "1.4.01")
1509 (source
1510 (origin
1511 (method url-fetch)
1512 (uri (string-append "mirror://apache/xerces/xml-commons/source/"
1513 "xml-commons-external-" version "-src.tar.gz"))
1514 (sha256
1515 (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk"))))
1516 (build-system ant-build-system)
1517 (arguments
1518 `(#:jar-name "jaxp.jar"
1519 #:jdk ,icedtea-8
1520 #:source-dir ".."
1521 #:tests? #f)); no tests
1522 (home-page "http://xerces.apache.org/xml-commons/")
1523 (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)")
1524 (description "Jaxp from the Apache XML Commons project is used by
1525the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs:
1526
1527@itemize
1528@item Document Object Model (DOM)
1529@item Simple API for XML (SAX)
1530@item Java APIs for XML Processing (JAXP)
1531@item Transformation API for XML (TrAX)
1532@item Document Object Model (DOM) Load and Save
1533@item JSR 206 Java API for XML Processing
1534@end itemize")
1535 (license (list license:asl2.0
1536 license:w3c ;; Files under org.w3c
1537 license:public-domain)))) ;; org.xml.sax
9a86ee78
JL
1538
1539(define-public java-apache-xml-commons-resolver
1540 (package
1541 (name "java-apache-xml-commons-resolver")
1542 (version "1.2")
1543 (source
1544 (origin
1545 (method url-fetch)
1546 (uri (string-append "mirror://apache/xerces/xml-commons/"
1547 "xml-commons-resolver-" version ".tar.gz"))
1548 (sha256
1549 (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm"))
1550 (modules '((guix build utils)))
1551 (snippet
1552 '(begin
1553 (for-each delete-file (find-files "." ".*\\.(jar|zip)"))
1554 #t))))
1555 (build-system ant-build-system)
1556 (arguments
1557 `(#:jar-name (string-append "xml-resolver.jar")
1558 #:tests? #f)); no tests
1559 (inputs
1560 `(("java-junit" ,java-junit)))
1561 (home-page "http://xerces.apache.org/xml-commons/")
1562 (synopsis "Catalog-based entity and URI resolution")
1563 (description "The resolver class implements the full semantics of OASIS Technical
1564Resolution 9401:1997 (Amendment 2 to TR 9401) catalogs and the 06 Aug
15652001 Committee Specification of OASIS XML Catalogs.
1566
1567It also includes a framework of classes designed to read catalog files
1568in a number of formats:
1569
1570@itemize
1571@item The plain-text flavor described by TR9401.
1572@item The XCatalog XML format defined by John Cowan
1573@item The XML Catalog format defined by the OASIS Entity Resolution
1574 Technical Committee.
1575@end itemize")
1576 (license license:asl2.0)))
7eae94d8
JL
1577
1578;; Jaxen requires java-dom4j and java-xom that in turn require jaxen.
1579;; This package is a bootstrap version without dependencies on dom4j and xom.
1580(define java-jaxen-bootstrap
1581 (package
1582 (name "java-jaxen-bootstrap")
1583 (version "1.1.6")
1584 (source (origin
1585 (method url-fetch)
1586 ;; No release on github
1587 (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/"
1588 version "/jaxen-" version "-sources.jar"))
1589 (sha256
1590 (base32
1591 "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx"))))
1592 (build-system ant-build-system)
1593 (arguments
1594 `(#:jar-name "jaxen.jar"
1595 #:source-dir "src"
1596 #:tests? #f; no tests
1597 #:phases
1598 (modify-phases %standard-phases
1599 (add-before 'build 'remove-dom4j
1600 (lambda _
1601 (delete-file-recursively "src/org/jaxen/dom4j")
1602 (delete-file-recursively "src/org/jaxen/xom")
1603 #t)))))
1604 (inputs
1605 `(("java-jdom" ,java-jdom)))
1606 (home-page "https://github.com/jaxen-xpath/jaxen")
1607 (synopsis "XPath library")
1608 (description "Jaxen is an XPath library written in Java. It is adaptable
1609to many different object models, including DOM, XOM, dom4j, and JDOM. It is
1610also possible to write adapters that treat non-XML trees such as compiled
1611Java byte code or Java beans as XML, thus enabling you to query these trees
1612with XPath too.")
1613 (license license:bsd-3)))
5552080d 1614
be0524f4
JL
1615(define-public java-jaxen
1616 (package
1617 (inherit java-jaxen-bootstrap)
1618 (name "java-jaxen")
1619 (inputs
1620 `(("java-jdom" ,java-jdom)
1621 ("java-xom" ,java-xom)
1622 ("java-dom4j" ,java-dom4j)))))
1623
5552080d
JL
1624(define-public java-xom
1625 (package
1626 (name "java-xom")
1627 (version "127")
1628 (source (origin
eed5e162
TGR
1629 (method git-fetch)
1630 (uri (git-reference
b0e7b699 1631 (url "https://github.com/elharo/xom")
eed5e162
TGR
1632 (commit (string-append "XOM_" version))))
1633 (file-name (git-file-name name version))
5552080d
JL
1634 (sha256
1635 (base32
eed5e162 1636 "1jh6y03g5zzdhsb5jm6ms1xnamr460qmn96y3w6aw0ikfwqlg0bq"))
5552080d
JL
1637 (modules '((guix build utils)))
1638 (snippet
1639 '(begin
1640 (for-each delete-file
1641 (find-files "." "\\.jar$"))
1642 #t))))
1643 (build-system ant-build-system)
1644 (arguments
1645 `(#:jar-name "xom.jar"
1646 #:jdk ,icedtea-8
eed5e162 1647 #:tests? #f ; no tests
5552080d
JL
1648 #:phases
1649 (modify-phases %standard-phases
eed5e162
TGR
1650 (add-after 'unpack 'make-git-checkout-writable
1651 (lambda _
1652 (for-each make-file-writable (find-files "."))
1653 #t))
5552080d
JL
1654 (add-before 'configure 'fix-tagsoup-dep
1655 (lambda _
1656 ;; FIXME: Where is tagsoup source?
1657 (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java")
1658 #t)))))
1659 (inputs
1660 `(("java-jdom" ,java-jdom)
1661 ("java-junit" ,java-junit)
1662 ("java-classpathx-servletapi" ,java-classpathx-servletapi)
1663 ("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
1664 ("java-xerces" ,java-xerces)))
1665 (home-page "https://xom.nu/")
1666 (synopsis "XML Object Model")
1667 (description "XOM is a new XML Object Model for processing XML with Java
1668that strives for correctness and simplicity.")
1669 ;; 2.1 only
1670 (license license:lgpl2.1)))
96f31935
JL
1671
1672(define-public java-xsdlib
1673 (package
1674 (name "java-xsdlib")
1675 (version "2013.2")
1676 (source (origin
1677 (method url-fetch)
c3d56df5 1678 (uri (string-append "https://repo1.maven.org/maven2/com/sun/msv/"
96f31935
JL
1679 "datatype/xsd/xsdlib/" version "/xsdlib-"
1680 version "-sources.jar"))
1681 (sha256
1682 (base32
1683 "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim"))))
1684 (build-system ant-build-system)
1685 (arguments
1686 `(#:tests? #f; no tests
1687 #:jar-name "xsdlib.jar"
1688 #:jdk ,icedtea-8))
1689 (inputs
1690 `(("java-xerces" ,java-xerces)))
c3d56df5
BH
1691 (home-page (string-append "https://web.archive.org/web/20161127144537/"
1692 "https://msv.java.net//"))
96f31935
JL
1693 (synopsis "Sun Multi-Schema Validator")
1694 (description "Xsdlib contains an implementation of sun.com.msv, an XML
1695validator.")
1696 (license license:bsd-2)))
82d7d4e1
JL
1697
1698(define-public java-xpp3
1699 (package
1700 (name "java-xpp3")
1701 (version "1.1.4")
1702 (source (origin
1703 (method url-fetch)
1704 (uri (string-append "http://www.extreme.indiana.edu/dist/"
1705 "java-repository/xpp3/distributions/xpp3-"
1706 version "_src.tgz"))
1707 (sha256
1708 (base32
1709 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
1710 (modules '((guix build utils)))
1711 (snippet
1712 '(begin ;; Delete bundled jar archives.
1713 (for-each delete-file (find-files "." ".*\\.jar"))
1714 #t))))
1715 (build-system ant-build-system)
1716 (arguments
1717 `(#:tests? #f; no tests
1718 #:build-target "jar"
1719 #:phases
1720 (modify-phases %standard-phases
1721 (replace 'install (install-jars "build")))))
1722 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
1723 (synopsis "Streaming pull XML parser")
1724 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
1725parser and should be used when there is a need to process quickly and
1726efficiently all input elements (for example in SOAP processors). This
1727package is a stable XmlPull parsing engine that is based on ideas from XPP
1728and in particular XPP2 but completely revised and rewritten to take the best
1729advantage of JIT JVMs.")
1730 (license (license:non-copyleft "file://LICENSE.txt"))))
9421f682
JL
1731
1732(define-public java-xmlpull2
1733 (package
1734 (name "java-xmlpull2")
1735 (version "2.1.10")
1736 (source (origin
1737 (method url-fetch)
1738 (uri (string-append "http://www.extreme.indiana.edu/xgws/xsoap/"
1739 "PullParser/PullParser" version ".tgz"))
1740 (sha256
1741 (base32
1742 "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md"))
1743 (modules '((guix build utils)))
1744 (snippet
1745 '(begin ;; Delete bundled jar archives.
1746 (for-each delete-file (find-files "." ".*\\.jar"))
1747 #t))))
1748 (build-system ant-build-system)
1749 (arguments
1750 `(#:tests? #f; no tests
1751 #:build-target "impl"
1752 #:phases
1753 (modify-phases %standard-phases
1754 (replace 'install (install-jars "build/lib")))))
1755 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
1756 (synopsis "Streaming pull XML parser")
1757 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
1758parser and should be used when there is a need to process quickly and
1759efficiently all input elements (for example in SOAP processors). This
1760package is in maintenance mode.")
1761 (license (license:non-copyleft "file:///LICENSE.txt"))))
605c23df
JL
1762
1763(define-public java-dom4j
1764 (package
1765 (name "java-dom4j")
f1afdaf4 1766 (version "2.1.1")
605c23df 1767 (source (origin
9d670526
TGR
1768 (method git-fetch)
1769 (uri (git-reference
b0e7b699 1770 (url "https://github.com/dom4j/dom4j")
9d670526
TGR
1771 (commit (string-append "version-" version))))
1772 (file-name (git-file-name name version))
605c23df
JL
1773 (sha256
1774 (base32
f1afdaf4 1775 "0q907srj9v4hwicpcrn4slyld5npf2jv7hzchsgrg29q2xmbwkdl"))
605c23df
JL
1776 (modules '((guix build utils)))
1777 (snippet
1778 '(begin ;; Delete bundled jar archives.
1779 (for-each delete-file (find-files "." ".*\\.jar"))
1780 #t))))
1781 (build-system ant-build-system)
1782 (arguments
1783 `(#:jar-name "dom4j.jar"
1784 #:jdk ,icedtea-8
1785 #:source-dir "src/main/java"
1786 ;; FIXME: Requires xalan, but xalan depends on java-cup which has a
1787 ;; dependency on itself through jflex.
1788 #:tests? #f
1789 #:phases
1790 (modify-phases %standard-phases
1791 (add-before 'build 'copy-jaxen-sources
1792 ;; java-jaxen-bootstrap is not enough. These files have a circular
1793 ;; dependency and there is no subset of dom4j that would allow
1794 ;; breaking the circle.
1795 (lambda* (#:key inputs #:allow-other-keys)
1796 (mkdir-p "jaxen-sources")
1797 (with-directory-excursion "jaxen-sources"
1798 (system* "jar" "xf" (assoc-ref inputs "java-jaxen-sources")))
1799 (mkdir-p "src/main/java/org/jaxen/dom4j")
1800 (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java"
1801 "src/main/java/org/jaxen/dom4j/DocumentNavigator.java")
1802 (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java"
1803 "src/main/java/org/jaxen/dom4j/Dom4jXPath.java")
1804 #t))
1805 (add-before 'build 'fix-old-xpp2
1806 (lambda _
1807 ;; This package normally depends on xpp2 2.0, but version 2.1.10
1808 ;; is the only version whose source code is published.
1809 (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java"
1810 (("public void resetStartTag")
1811 "public boolean removeAttributeByRawName(String name) {\n
1812 return false;\n
1813}\n
1814public boolean removeAttributeByName(String name, String name2) {\n
1815 return false;\n
1816}\n\npublic void resetStartTag")
1817 (("Atttribute") "Attribute"))
1818 #t)))))
1819 (inputs
1820 `(("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
1821 ("java-jaxen-sources" ,(package-source java-jaxen-bootstrap))
1822 ("java-xmlpull2" ,java-xmlpull2)
1823 ("java-xpp3" ,java-xpp3)
1824 ("java-xsdlib" ,java-xsdlib)))
1825 (native-inputs
1826 `(("java-testng" ,java-testng)
1827 ("java-xerces" ,java-xerces)))
1828 (home-page "https://dom4j.github.io/")
1829 (synopsis "Flexible XML framework for Java")
1830 (description "Dom4j is a flexible XML framework for Java. DOM4J works
1831with DOM, SAX, XPath, and XSLT. It can parse large XML documents with very
1832low memory footprint.")
1833 ;; some BSD-like 5-clause license
1834 (license (license:non-copyleft "file://LICENSE"))))
3058d8ec
JL
1835
1836(define-public java-kxml2
1837 (package
1838 (name "java-kxml2")
1839 (version "2.4.2")
1840 (source (origin
00fc9389
TGR
1841 (method git-fetch)
1842 (uri (git-reference
b0e7b699 1843 (url "https://github.com/stefanhaustein/kxml2")
00fc9389
TGR
1844 (commit (string-append "v" version))))
1845 (file-name (git-file-name name version))
3058d8ec
JL
1846 (sha256
1847 (base32
00fc9389 1848 "0g6d8c9r9sh3x04sf4wdpgwvhkqvk11k3kq9skx91i60h4vn01hg"))))
3058d8ec
JL
1849 (build-system ant-build-system)
1850 (arguments
1851 `(#:jar-name "kxml2.jar"
1852 #:source-dir "src/main/java"
1853 #:test-include (list "TestWb.java")
1854 ;; Test failure: it was expected to get an XML entity but got the
1855 ;; equivalent Unicode character instead.
1856 #:tests? #f
1857 #:phases
1858 (modify-phases %standard-phases
00fc9389
TGR
1859 (add-after 'unpack 'make-git-checkout-writable
1860 (lambda _
1861 (for-each make-file-writable (find-files "."))
1862 #t))
3058d8ec
JL
1863 (add-before 'build 'copy-resources
1864 (lambda _
aa6f87a2
MW
1865 (copy-recursively "src/main/resources" "build/classes")
1866 #t)))))
3058d8ec
JL
1867 (inputs
1868 `(("java-xpp3" ,java-xpp3)))
1869 (native-inputs
1870 `(("java-junit" ,java-junit)))
1871 (home-page "http://kxml.org")
1872 (synopsis "XML pull parser")
1873 (description "kXML is a small XML pull parser, specially designed for
1874constrained environments such as Applets, Personal Java or devices compliant
1875with the Mobile Information Device Profile (MIDP).")
1876 (license license:expat)))
4c7759f0
JL
1877
1878(define-public java-stax
1879 (package
1880 (name "java-stax")
1881 (version "1.2.0")
1882 (source (origin
1883 (method url-fetch)
1884 (uri (string-append "https://repo1.maven.org/maven2/stax/stax/"
1885 version "/stax-" version "-sources.jar"))
1886 (sha256
1887 (base32
1888 "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z"))))
1889 (build-system ant-build-system)
1890 (arguments
1891 `(#:jar-name "stax.jar"
1892 #:tests? #f; no tests
1893 #:phases
1894 (modify-phases %standard-phases
1895 (add-before 'configure 'fix-utf8
1896 (lambda _
1897 ;; This file is ISO-8859-1 but java expects UTF-8.
1898 ;; Remove special characters in comments.
1899 (with-fluids ((%default-port-encoding "ISO-8859-1"))
1900 (substitute* "src/com/wutka/dtd/Scanner.java"
1901 (("//.*") "\n")))
1902 #t)))))
1903 (home-page "https://repo1.maven.org/maven2/stax/stax/")
1904 (synopsis "Streaming API for XML")
1905 (description "This package provides the reference implementation of the
1906@dfn{Streaming API for XML} (StAX). It is used for streaming XML data to
1907and from a Java application. It provides a standard pull parser interface.")
1908 (license license:asl2.0)))
b8798817
JL
1909
1910(define-public java-jettison
1911 (package
1912 (name "java-jettison")
1913 (version "1.3.7")
1914 (source (origin
a4b96726
TGR
1915 (method git-fetch)
1916 (uri (git-reference
b0e7b699 1917 (url "https://github.com/codehaus/jettison")
a4b96726
TGR
1918 (commit (string-append "jettison-" version))))
1919 (file-name (git-file-name name version))
b8798817
JL
1920 (sha256
1921 (base32
a4b96726 1922 "15sydmi5chdh4126qc7v8bsrp7fp4ldaya8a05iby4pq2324q0qw"))))
b8798817
JL
1923 (build-system ant-build-system)
1924 (arguments
1925 `(#:jar-name "jettison.jar"
1926 #:source-dir "src/main/java"
1927 #:test-exclude (list "**/Abstract*.java"
1928 ;; Abstract classes
1929 "**/DOMTest.java"
1930 "**/BadgerFishDOMTest.java"
1931 "**/MappedDOMTest.java")))
1932 (native-inputs
1933 `(("java-junit" ,java-junit)))
1934 (home-page "https://github.com/codehaus/jettison")
1935 (synopsis "StAX implementation for JSON")
1936 (description "Jettison is a Java library for converting XML to JSON and
1937vice-versa with the help of the @dfn{Streaming API for XML} (StAX). It
1938implements @code{XMLStreamWriter} and @code{XMLStreamReader} and supports
1939@code{Mapped} and @code{BadgerFish} conventions.")
1940 (license license:asl2.0)))
a5ec8a5c
JL
1941
1942(define-public java-jdom2
1943 (package
1944 (name "java-jdom")
1945 (version "2.0.6")
1946 (source (origin
951bdf5a
TGR
1947 (method git-fetch)
1948 (uri (git-reference
b0e7b699 1949 (url "https://github.com/hunterhacker/jdom")
951bdf5a
TGR
1950 (commit (string-append "JDOM-" version))))
1951 (file-name (git-file-name name version))
a5ec8a5c
JL
1952 (sha256
1953 (base32
951bdf5a 1954 "14vv1kxrsdvwi4cz3rx6r48w5y6fvk9cymil8qhvxwp56xxrgxiq"))))
a5ec8a5c
JL
1955 (build-system ant-build-system)
1956 (arguments
1957 `(#:build-target "package"
951bdf5a 1958 #:tests? #f ; tests are run as part of the build process
a5ec8a5c
JL
1959 #:phases
1960 (modify-phases %standard-phases
1961 (replace 'install
1962 (install-jars "build")))))
1963 (home-page "http://jdom.org/")
1964 (synopsis "Access, manipulate, and output XML data")
1965 (description "Jdom is a Java-based solution for accessing, manipulating, and
1966outputting XML data from Java code.")
1967 (license license:bsd-4)))
5ee7b02f
JL
1968
1969(define-public java-xstream
1970 (package
1971 (name "java-xstream")
1972 (version "1.4.10")
b05bc3c4
TGR
1973 (source
1974 (origin
1975 (method git-fetch)
1976 (uri (git-reference
b0e7b699 1977 (url "https://github.com/x-stream/xstream")
b05bc3c4
TGR
1978 (commit (string-append
1979 "XSTREAM_"
1980 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
1981 version)))))
1982 (file-name (git-file-name name version))
1983 (sha256
1984 (base32 "12m2bw8bapdc1w0pni9wl5hh2y8jfdgcvxd464jl9917dsp3ai2n"))))
5ee7b02f
JL
1985 (build-system ant-build-system)
1986 (arguments
1987 `(#:jar-name "xstream.jar"
b05bc3c4 1988 ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system.
5ee7b02f
JL
1989 #:tests? #f
1990 #:jdk ,icedtea-8
1991 #:source-dir "xstream/src/java"))
1992 (inputs
1993 `(("java-jdom" ,java-jdom)
1994 ("java-jdom2" ,java-jdom2)
1995 ("java-cglib" ,java-cglib)
1996 ("java-joda-time" ,java-joda-time)
1997 ("java-jettison" ,java-jettison)
1998 ("java-xom" ,java-xom)
1999 ("java-xpp3" ,java-xpp3)
2000 ("java-dom4j" ,java-dom4j)
2001 ("java-stax2-api" ,java-stax2-api)
2002 ("java-woodstox-core" ,java-woodstox-core)
2003 ("java-kxml2" ,java-kxml2)
2004 ("java-stax" ,java-stax)))
2005 (home-page "https://x-stream.github.io")
2006 (synopsis "XML serialization library")
2007 (description "XStream is a simple library to serialize Java objects to XML
2008and back again.")
2009 (license license:bsd-3)))
5c1cf7f3 2010
2cce23bf
PN
2011(define-public xmlrpc-c
2012 (package
2013 (name "xmlrpc-c")
2014 (version "1.43.08")
2015 (source (origin
2016 (method url-fetch)
2017 (uri (string-append "mirror://sourceforge/xmlrpc-c/Xmlrpc-c%20Super%20Stable/"
2018 version "/xmlrpc-c-" version ".tgz"))
2019 (sha256
2020 (base32
2021 "18zwbj6i2hpcn5riiyp8i6rml0sfv60dd7phw1x8g4r4lj2bbxf9"))))
2022 (build-system gnu-build-system)
2023 (inputs
2024 `(("curl" ,curl)))
2025 (native-inputs
2026 `(;; For tools, if ever needed.
2027 ("perl" ,perl)))
2028 (arguments
2029 `(#:make-flags ; Add $libdir to the RUNPATH of all the executables.
2030 (list (string-append "LDFLAGS_PERSONAL=-Wl,-rpath=" %output "/lib"))
2031 #:phases
2032 (modify-phases %standard-phases
2033 (add-after 'unpack 'fix-/bin/sh-in-tests
2034 (lambda _
2035 (substitute* "GNUmakefile"
2036 (("#! /bin/sh") (which "sh")))
2037 #t)))))
2038 (home-page "http://xmlrpc-c.sourceforge.net/")
2039 (synopsis "Lightweight RPC library based on XML and HTTP")
2040 (description
2041 "XML-RPC is a quick-and-easy way to make procedure calls over the Internet.
2042It converts the procedure call into an XML document, sends it to a remote
2043server using HTTP, and gets back the response as XML. This library provides a
2044modular implementation of XML-RPC for C and C++.")
2045 (license (list license:psfl license:expat))))
79a0eabd 2046
8fda8b7d
MB
2047(define-public python-elementpath
2048 (package
2049 (name "python-elementpath")
e272783b 2050 (version "1.4.0")
8fda8b7d
MB
2051 (source
2052 (origin
2053 (method url-fetch)
2054 (uri (pypi-uri "elementpath" version))
2055 (sha256
2056 (base32
e272783b 2057 "15h7d41v48q31hzjay7qzixdv531hnga3h35hksk7x52pgqcrkz7"))))
8fda8b7d
MB
2058 (build-system python-build-system)
2059 (home-page
2060 "https://github.com/sissaschool/elementpath")
2061 (synopsis
2062 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
2063 (description
2064 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
2065for Python's ElementTree XML data structures, both for the standard
2066ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
2067
2068For lxml.etree this package can be useful for providing XPath 2.0 selectors,
2069because lxml.etree already has it's own implementation of XPath 1.0.")
2070 (license license:expat)))
2071
55e1475c
MB
2072(define-public python-lxml
2073 (package
2074 (name "python-lxml")
2075 (version "4.4.2")
2076 (source
2077 (origin
2078 (method url-fetch)
2079 (uri (pypi-uri "lxml" version))
2080 (sha256
2081 (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg"))))
2082 (build-system python-build-system)
2083 (arguments
2084 `(#:phases (modify-phases %standard-phases
2085 (replace 'check
2086 (lambda _
2087 (invoke "make" "test"))))))
2088 (inputs
2089 `(("libxml2" ,libxml2)
2090 ("libxslt" ,libxslt)))
2091 (home-page "https://lxml.de/")
2092 (synopsis "Python XML processing library")
2093 (description
2094 "The lxml XML toolkit is a Pythonic binding for the C libraries
2095libxml2 and libxslt.")
2096 (license license:bsd-3))) ; and a few more, see LICENSES.txt
2097
2098(define-public python2-lxml
2099 (package-with-python2 python-lxml))
2100
c950a2a5
MB
2101(define-public python-xmlschema
2102 (package
2103 (name "python-xmlschema")
447f9acf 2104 (version "1.1.2")
c950a2a5 2105 (source (origin
f8a94609
MB
2106 ;; Unit tests are not distributed with the PyPI archive.
2107 (method git-fetch)
2108 (uri (git-reference
2109 (url "https://github.com/sissaschool/xmlschema")
2110 (commit (string-append "v" version))))
2111 (file-name (git-file-name name version))
c950a2a5
MB
2112 (sha256
2113 (base32
447f9acf 2114 "03bz5mp45y4shmlc1gxq1h69vjx60z1acg9cy4kq7fczgx8qg9jw"))))
c950a2a5
MB
2115 (build-system python-build-system)
2116 (arguments
2117 '(#:phases
2118 (modify-phases %standard-phases
2119 (replace 'check
2120 (lambda* (#:key (tests? #t) #:allow-other-keys)
2121 (if tests?
2122 (begin
2123 (setenv "PYTHONPATH"
2124 (string-append "./build/lib:"
2125 (getenv "PYTHONPATH")))
f8a94609 2126 (invoke "python" "-m" "unittest" "-v"))
c950a2a5
MB
2127 (format #t "test suite not run~%"))
2128 #t)))))
2129 (native-inputs
2130 `(("python-lxml" ,python-lxml))) ;for tests
2131 (propagated-inputs
2132 `(("python-elementpath" ,python-elementpath)))
2133 (home-page "https://github.com/sissaschool/xmlschema")
2134 (synopsis "XML Schema validator and data conversion library")
2135 (description
2136 "The @code{xmlschema} library is an implementation of
2137@url{https://www.w3.org/2001/XMLSchema, XML Schema} for Python. It has
2138full support for the XSD 1.0 and 1.1 standards, an XPath-based API for
2139finding schema's elements and attributes; and can encode and decode
2140XML data to JSON and other formats.")
2141 (license license:expat)))
2142
79a0eabd
OP
2143(define-public python-xmltodict
2144 (package
2145 (name "python-xmltodict")
f3e073b4 2146 (version "0.12.0")
79a0eabd 2147 (source
db1adb42
BG
2148 (origin
2149 (method url-fetch)
2150 (uri (pypi-uri "xmltodict" version))
2151 (sha256
2152 (base32
2153 "08cadlb9vsb4pmzc99lz3a2lx6qcfazyvgk10pcqijvyxlwcdn2h"))))
79a0eabd
OP
2154 (build-system python-build-system)
2155 (native-inputs
2156 `(("python-coverage" ,python-coverage)
2157 ("python-nose" ,python-nose)))
2158 (home-page "https://github.com/martinblech/xmltodict")
2159 (synopsis "Work with XML like you are working with JSON")
2160 (description "This package provides a Python library to convert XML to
2161@code{OrderedDict}.")
2162 (license license:expat)))