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