gnu: perl-xml-compile-tester: Update to 0.91.
[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>
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>
4a78fd46 14;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
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")
b5de208e 472 (version "1.60")
a022b23f 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
b5de208e 479 "0xw6aaqka3vqwbv152sbh6fbi8j306q1gvg7v83br8miif3mjcsb"))))
a022b23f 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")
fa3fff43 563 (version "2.25")
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
fa3fff43 571 "1y6vh328zrh085d40852v4ij2l4g0amxykswxd1nfhd2pspds7sk"))))
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")
9af5a513 639 (version "0.91")
649e1676
RW
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
9af5a513 646 "1drzwziwi96rfkh48qpw4l225mcbk8ppl2157nj92cslcpwwdk75"))))
649e1676
RW
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")
503a0059 687 (version "1.06")
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
503a0059 694 "181qf1s7ymgi7saph3cf9p6dbxkxyh1ja23na4dchhi8v5mi66sr"))))
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")
1d9b041c 710 (version "3.24")
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
1d9b041c 717 "0pkcph562l2ij7rlwlvm58v6y062qsbydfpaz2qnph2ixqy0xfd1"))))
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")
727ffbd5 827 (version "1.9")
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
727ffbd5 835 "19nv3zhik3djp4blc4vrjwrl8dfhzmal8b21sq7y907nhddx6mni"))))
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
28655227 841 (home-page "https://pugixml.org")
6ce212b8
RW
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"))
671249b9 996 (file-name (string-append name "-" version ".tar.gz"))
33ae9107
DT
997 (sha256
998 (base32
999 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
fc1adab1 1000 (patches (search-patches "tinyxml-use-stl.patch"))))
33ae9107
DT
1001 (build-system gnu-build-system)
1002 ;; This library is missing *a lot* of the steps to make it usable, so we
1003 ;; have to add them here, like every other distro must do.
1004 (arguments
1005 `(#:phases
1006 (modify-phases %standard-phases
1007 (delete 'configure)
1008 (add-after 'build 'build-shared-library
1009 (lambda _
0efb6452
EF
1010 (invoke "g++" "-Wall" "-O2" "-shared" "-fpic"
1011 "tinyxml.cpp" "tinyxmlerror.cpp"
1012 "tinyxmlparser.cpp" "tinystr.cpp"
1013 "-o" "libtinyxml.so")))
33ae9107 1014 (replace 'check
0efb6452 1015 (lambda _ (invoke "./xmltest")))
33ae9107
DT
1016 (replace 'install
1017 (lambda* (#:key outputs #:allow-other-keys)
1018 (let* ((out (assoc-ref outputs "out"))
1019 (include (string-append out "/include"))
1020 (lib (string-append out "/lib"))
1021 (pkgconfig (string-append out "/lib/pkgconfig"))
1022 (doc (string-append out "/share/doc")))
1023 ;; Install libs and headers.
1024 (install-file "libtinyxml.so" lib)
1025 (install-file "tinystr.h" include)
1026 (install-file "tinyxml.h" include)
1027 ;; Generate and install pkg-config file.
1028 (mkdir-p pkgconfig)
1029 ;; Software such as Kodi expect this file to be present, but
1030 ;; it's not provided in the source code.
1031 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
1032 (lambda (port)
1033 (format port "prefix=~a
1034exec_prefix=${prefix}
1035libdir=${exec_prefix}/lib
1036includedir=${prefix}/include
1037
1038Name: TinyXML
1039Description: A simple, small, C++ XML parser
1040Version: ~a
1041Libs: -L${libdir} -ltinyxml
1042Cflags: -I${includedir}
1043"
1044 out ,version)))
1045 ;; Install docs.
1046 (mkdir-p doc)
1047 (copy-recursively "docs" (string-append doc "tinyxml"))
1048 #t))))))
1049 (synopsis "Small XML parser for C++")
1050 (description "TinyXML is a small and simple XML parsing library for the
05077200 1051C++ programming language.")
33ae9107
DT
1052 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
1053 (license license:zlib)))
fe9451c5 1054
931bd7f6
TGR
1055(define-public tinyxml2
1056 (package
1057 (name "tinyxml2")
1058 (version "4.0.1")
1059 (source
1060 (origin
1061 (method url-fetch)
1062 (uri (string-append "https://github.com/leethomason/tinyxml2/archive/"
1063 version ".tar.gz"))
29a39054 1064 (file-name (string-append name "-" version ".tar.gz"))
931bd7f6 1065 (sha256
29a39054
EF
1066 (base32
1067 "083z4r4khcndxi9k840lcr48sqxvar4gpsnf749xfdn1bkr8xcql"))))
931bd7f6
TGR
1068 (build-system cmake-build-system)
1069 (arguments
1070 `(#:tests? #f)) ; no tests
1071 (synopsis "Small XML parser for C++")
1072 (description "TinyXML2 is a small and simple XML parsing library for the
1073C++ programming language.")
1074 (home-page "http://www.grinninglizard.com/tinyxml2/")
1075 (license license:zlib)))
1076
fe9451c5
RG
1077(define-public xmlstarlet
1078 (package
1079 (name "xmlstarlet")
1080 (version "1.6.1")
1081 (source
1082 (origin
1083 (method url-fetch)
1084 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1085 version "/xmlstarlet-" version ".tar.gz"))
1086 (sha256
1087 (base32
1088 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1089 (build-system gnu-build-system)
22ea0235
MB
1090 (arguments
1091 '(#:phases
1092 (modify-phases %standard-phases
1093 (add-before 'check 'drop-failing-tests
1094 (lambda _
1095 ;; FIXME: Why are these tests failing.
1096 (substitute* "Makefile"
1097 (("^examples/schema1\\\\") "\\")
1098 (("^examples/valid1\\\\") "\\"))
1099 #t)))))
fe9451c5
RG
1100 (inputs
1101 `(("libxslt" ,libxslt)
1102 ("libxml2" ,libxml2)))
1103 (home-page "http://xmlstar.sourceforge.net/")
1104 (synopsis "Command line XML toolkit")
1105 (description "XMLStarlet is a set of command line utilities which can be
1106used to transform, query, validate, and edit XML documents. XPath is used to
1107match and extract data, and elements can be added, deleted or modified using
1108XSLT and EXSLT.")
1109 (license license:x11)))
19c33040 1110
767d24e8
SR
1111(define-public html-xml-utils
1112 (package
1113 (name "html-xml-utils")
4321aeb6 1114 (version "7.6")
767d24e8
SR
1115 (source
1116 (origin
1117 (method url-fetch)
1118 (uri (string-append
1119 "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-"
1120 version ".tar.gz"))
1121 (sha256
1122 (base32
4321aeb6 1123 "0l97ps089byy62838wf2jwvvc465iw29z9r5kwmwcq7f3bn11y3m"))))
767d24e8
SR
1124 (build-system gnu-build-system)
1125 (home-page "https://www.w3.org/Tools/HTML-XML-utils/")
1126 (synopsis "Command line utilities to manipulate HTML and XML files")
1127 (description "HTML-XML-utils provides a number of simple utilities for
1128manipulating and converting HTML and XML files in various ways. The suite
1129consists of the following tools:
1130
1131@itemize
1132 @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} entities
1133 @item @command{xml2asc} convert from @code{&#nnn;} entities to @code{UTF-8}
1134 @item @command{hxaddid} add IDs to selected elements
1135 @item @command{hxcite} replace bibliographic references by hyperlinks
1136 @item @command{hxcite} mkbib - expand references and create bibliography
1137 @item @command{hxclean} apply heuristics to correct an HTML file
1138 @item @command{hxcopy} copy an HTML file while preserving relative links
1139 @item @command{hxcount} count elements and attributes in HTML or XML files
1140 @item @command{hxextract} extract selected elements
1141 @item @command{hxincl} expand included HTML or XML files
1142 @item @command{hxindex} create an alphabetically sorted index
1143 @item @command{hxmkbib} create bibliography from a template
1144 @item @command{hxmultitoc} create a table of contents for a set of HTML files
1145 @item @command{hxname2id} move some @code{ID=} or @code{NAME=} from A
1146elements to their parents
1147 @item @command{hxnormalize} pretty-print an HTML file
1148 @item @command{hxnsxml} convert output of hxxmlns back to normal XML
1149 @item @command{hxnum} number section headings in an HTML file
1150 @item @command{hxpipe} convert XML to a format easier to parse with Perl or AWK
1151 @item @command{hxprintlinks} number links and add table of URLs at end of an HTML file
1152 @item @command{hxprune} remove marked elements from an HTML file
1153 @item @command{hxref} generate cross-references
1154 @item @command{hxselect} extract elements that match a (CSS) selector
1155 @item @command{hxtoc} insert a table of contents in an HTML file
1156 @item @command{hxuncdata} replace CDATA sections by character entities
1157 @item @command{hxunent} replace HTML predefined character entities to @code{UTF-8}
1158 @item @command{hxunpipe} convert output of pipe back to XML format
1159 @item @command{hxunxmlns} replace \"global names\" by XML Namespace prefixes
1160 @item @command{hxwls} list links in an HTML file
1161 @item @command{hxxmlns} replace XML Namespace prefixes by \"global names\"
1162@end itemize
1163")
1164 (license license:expat)))
1165
19c33040
JN
1166(define-public xlsx2csv
1167 (package
1168 (name "xlsx2csv")
1169 (version "0.7.2")
1170 (source (origin
1171 (method url-fetch)
1172 (uri (string-append
1173 "https://github.com/dilshod/"
1174 name "/archive/release/" version ".tar.gz"))
1175 (file-name (string-append name "-" version ".tar.gz"))
1176 (sha256
1177 (base32
1178 "1gpn6kaa7l1ai8c9zx2j3acf04bvxq79pni8jjfjrk01smjbyyql"))))
1179 (build-system python-build-system)
1180 (arguments
1181 `(#:python ,python-2 ; Use python-2 for the test script.
1182 #:phases
1183 (modify-phases %standard-phases
1184 (replace 'check
1185 (lambda _
1186 (substitute* "test/run"
1187 ;; Run tests with `python' only
1188 (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
1189 (zero? (system* "test/run")))))))
1190 (home-page "https://github.com/dilshod/xlsx2csv")
1191 (synopsis "XLSX to CSV converter")
1192 (description
1193 "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
1194XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
1195files. It is designed to be fast and to handle large input files.")
1196 (license license:gpl2+)))
d2b51c08 1197
1198(define-public python-defusedxml
1199 (package
1200 (name "python-defusedxml")
ca6197dd 1201 (version "0.5.0")
d2b51c08 1202 (source
1203 (origin
1204 (method url-fetch)
1205 (uri (pypi-uri "defusedxml" version))
1206 (sha256
1207 (base32
ca6197dd 1208 "1x54n0h8hl92vvwyymx883fbqpqjwn2mc8fb383bcg3z9zwz5mr4"))))
d2b51c08 1209 (build-system python-build-system)
1210 (home-page "https://bitbucket.org/tiran/defusedxml")
1211 (synopsis "XML bomb protection for Python stdlib modules")
1212 (description
1213 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1214 (license license:psfl)))
1215
1216(define-public python2-defusedxml
1217 (package-with-python2 python-defusedxml))
ca8f3f9a
AP
1218
1219(define-public libxls
1220 (package
1221 (name "libxls")
1222 (version "1.4.0")
1223 (source (origin
1224 (method url-fetch)
1225 (uri (string-append "https://sourceforge.net/projects/"
1226 name "/files/" name "-"
1227 version ".zip"))
1228 (sha256
1229 (base32
1230 "1g8ds7wbhsa4hdcn77xc2c0l3vvz5bx2hx9ng9c9n7aii92ymfnk"))))
1231 (build-system gnu-build-system)
1232 (arguments
1233 `(#:phases
1234 (modify-phases %standard-phases
1235 ;; Bootstrapping is required in order to fix the test driver script.
1236 (add-after 'unpack 'bootstrap
1237 (lambda _
1238 (zero? (system* "bash" "bootstrap")))))))
1239 (native-inputs
1240 `(("unzip" ,unzip)
1241 ("autoconf" ,autoconf)
1242 ("automake" ,automake)
1243 ("libtool" ,libtool)))
1244 (home-page "http://libxls.sourceforge.net/")
1245 (synopsis "Read Excel files")
1246 (description
1247 "libxls is a C library which can read Excel (xls) files since Excel 97 (the BIFF8 format).
1248libxls cannot write Excel files.")
1249 (license license:bsd-2)))
623fb4d1
AP
1250
1251(define-public freexl
1252 (package
1253 (name "freexl")
5275f69e 1254 (version "1.0.5")
623fb4d1
AP
1255 (source (origin
1256 (method url-fetch)
1257 (uri (string-append "http://www.gaia-gis.it/gaia-sins/"
1258 name "-" version ".tar.gz"))
1259 (sha256
1260 (base32
5275f69e 1261 "03bmwq6hngmzwpqpb7c2amqlspz4q69iv96nlf0f5c0qs98b3j9x"))))
623fb4d1
AP
1262 (build-system gnu-build-system)
1263 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1264 (synopsis "Read Excel files")
1265 (description
1266 "FreeXL is a C library to extract valid data from within an Excel (.xls)
1267spreadsheet.")
1268 ;; Any of these licenses may be picked.
1269 (license (list license:gpl2+
1270 license:lgpl2.1+
1271 license:mpl1.1))))
d00d6cea
RW
1272
1273(define-public xerces-c
1274 (package
1275 (name "xerces-c")
1276 (version "3.1.4")
1277 (source (origin
1278 (method url-fetch)
1279 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1280 "xerces-c-" version ".tar.xz"))
1281 (sha256
1282 (base32
1283 "0hb29c0smqlpxj0zdm09s983z5jx37szlliccnvgh0qq91wwqwwr"))))
1284 (build-system gnu-build-system)
1285 (arguments
1286 (let ((system (or (%current-target-system)
1287 (%current-system))))
1288 (if (string-prefix? "x86_64" system)
1289 '()
1290 '(#:configure-flags '("--disable-sse2")))))
1291 (native-inputs
1292 `(("perl" ,perl)))
1293 (home-page "http://xerces.apache.org/xerces-c/")
1294 (synopsis "Validating XML parser library for C++")
1295 (description "Xerces-C++ is a validating XML parser written in a portable
1296subset of C++. Xerces-C++ makes it easy to give your application the ability
1297to read and write XML data. A shared library is provided for parsing,
1298generating, manipulating, and validating XML documents using the DOM, SAX, and
1299SAX2 APIs.")
1300 (license license:asl2.0)))
77d7b57c
RW
1301
1302(define-public java-simple-xml
1303 (package
1304 (name "java-simple-xml")
1305 (version "2.7.1")
1306 (source (origin
1307 (method url-fetch)
1308 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
1309 version ".zip"))
1310 (sha256
1311 (base32
3c274149
GB
1312 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))
1313 (patches (search-patches "java-simple-xml-fix-tests.patch"))))
77d7b57c
RW
1314 (build-system ant-build-system)
1315 (arguments
1316 `(#:build-target "build"
1317 #:test-target "test"
1318 #:phases
1319 (modify-phases %standard-phases
1320 (replace 'install (install-jars "jar")))))
1321 (native-inputs
1322 `(("unzip" ,unzip)))
1323 (home-page "http://simple.sourceforge.net/")
1324 (synopsis "XML serialization framework for Java")
1325 (description "Simple is a high performance XML serialization and
1326configuration framework for Java. Its goal is to provide an XML framework
1327that enables rapid development of XML configuration and communication systems.
1328This framework aids the development of XML systems with minimal effort and
1329reduced errors. It offers full object serialization and deserialization,
1330maintaining each reference encountered.")
1331 (license license:asl2.0)))
3b695802
P
1332
1333(define-public perl-xml-xpathengine
1334 (package
1335 (name "perl-xml-xpathengine")
1336 (version "0.14")
1337 (source (origin
1338 (method url-fetch)
1339 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1340 "XML-XPathEngine-" version ".tar.gz"))
1341 (sha256
1342 (base32
1343 "0r72na14bmsxfd16s9nlza155amqww0k8wsa9x2a3sqbpp5ppznj"))))
1344 (build-system perl-build-system)
1345 (home-page "http://search.cpan.org/dist/XML-XPathEngine/")
1346 (synopsis "Re-usable XPath engine for DOM-like trees")
1347 (description
1348 "This module provides an XPath engine, that can be re-used by other
1349modules/classes that implement trees.
1350
1351In order to use the XPath engine, nodes in the user module need to mimick DOM
1352nodes. The degree of similitude between the user tree and a DOM dictates how
1353much of the XPath features can be used. A module implementing all of the DOM
1354should be able to use this module very easily (you might need to add the
1355@code{cmp} method on nodes in order to get ordered result sets).")
1356 (license license:perl-license)))
9e1c3581
P
1357
1358(define-public perl-tree-xpathengine
1359 (package
1360 (name "perl-tree-xpathengine")
1361 (version "0.05")
1362 (source (origin
1363 (method url-fetch)
1364 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1365 "Tree-XPathEngine-" version ".tar.gz"))
1366 (sha256
1367 (base32
1368 "1vbbw8wxm79r3xbra8narw1dqvm34510q67wbmg2zmj6zd1k06r9"))))
1369 (build-system perl-build-system)
1370 (home-page "http://search.cpan.org/dist/Tree-XPathEngine/")
1371 (synopsis "Re-usable XPath engine")
1372 (description
1373 "This module provides an XPath engine, that can be re-used by other
1374module/classes that implement trees. It is designed to be compatible with
1375@code{Class::XPath}, ie it passes its tests if you replace @code{Class::XPath}
1376by @code{Tree::XPathEngine}.")
1377 (license license:perl-license)))
b7c59195
P
1378
1379(define-public perl-xml-filter-buffertext
1380 (package
1381 (name "perl-xml-filter-buffertext")
1382 (version "1.01")
1383 (source
1384 (origin
1385 (method url-fetch)
1386 (uri (string-append "mirror://cpan/authors/id/R/RB/RBERJON/"
1387 "XML-Filter-BufferText-" version ".tar.gz"))
1388 (sha256
1389 (base32
1390 "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg"))))
1391 (build-system perl-build-system)
1392 (propagated-inputs
1393 `(("perl-xml-sax-base" ,perl-xml-sax-base)))
1394 (home-page "http://search.cpan.org/dist/XML-Filter-BufferText/")
1395 (synopsis "Filter to put all characters() in one event")
1396 (description "This is a very simple filter. One common cause of
1397grief (and programmer error) is that XML parsers aren't required to provide
1398character events in one chunk. They can, but are not forced to, and most
1399don't. This filter does the trivial but oft-repeated task of putting all
1400characters into a single event.")
1401 (license license:perl-license)))
33b592ee
P
1402
1403(define-public perl-xml-sax-writer
1404 (package
1405 (name "perl-xml-sax-writer")
1406 (version "0.57")
1407 (source (origin
1408 (method url-fetch)
1409 (uri (string-append
1410 "mirror://cpan/authors/id/P/PE/PERIGRIN/"
1411 "XML-SAX-Writer-" version ".tar.gz"))
1412 (sha256
1413 (base32
1414 "1w1cd1ybxdvhmnxdlkywi3x5ka3g4md42kyynksjc09vyizd0q9x"))))
1415 (build-system perl-build-system)
1416 (propagated-inputs
1417 `(("perl-libxml" ,perl-libxml)
1418 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
c695fb76 1419 ("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
33b592ee
P
1420 ("perl-xml-sax-base" ,perl-xml-sax-base)))
1421 (home-page "http://search.cpan.org/dist/XML-SAX-Writer/")
1422 (synopsis "SAX2 XML Writer")
1423 (description
1424 "This is an XML writer that understands SAX2. It is based on
1425@code{XML::Handler::YAWriter}.")
1426 (license license:perl-license)))
9e88b210
P
1427
1428(define-public perl-xml-handler-yawriter
1429 (package
1430 (name "perl-xml-handler-yawriter")
1431 (version "0.23")
1432 (source
1433 (origin
1434 (method url-fetch)
1435 (uri (string-append "mirror://cpan/authors/id/K/KR/KRAEHE/"
1436 "XML-Handler-YAWriter-" version ".tar.gz"))
1437 (sha256
1438 (base32
1439 "11d45a1sz862va9rry3p2m77pwvq3kpsvgwhc5ramh9mbszbnk77"))))
1440 (build-system perl-build-system)
1441 (propagated-inputs
1442 `(("perl-libxml" ,perl-libxml)))
1443 (home-page "http://search.cpan.org/dist/XML-Handler-YAWriter/")
1444 (synopsis "Yet another Perl SAX XML Writer")
1445 (description "YAWriter implements Yet Another @code{XML::Handler::Writer}.
1446It provides a flexible escaping technique and pretty printing.")
1447 (license license:perl-license)))
85f225fb
P
1448
1449(define-public perl-xml-twig
1450 (package
1451 (name "perl-xml-twig")
1452 (version "3.52")
1453 (source (origin
1454 (method url-fetch)
1455 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1456 "XML-Twig-" version ".tar.gz"))
1457 (sha256
1458 (base32
1459 "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy"))))
1460 (build-system perl-build-system)
1461 (inputs
1462 `(("expat" ,expat)))
1463 (propagated-inputs
1464 `(("perl-html-tidy" ,perl-html-tidy)
1465 ("perl-html-tree" ,perl-html-tree)
1466 ("perl-io-captureoutput" ,perl-io-captureoutput)
1467 ("perl-io-string" ,perl-io-string)
1468 ("perl-io-stringy" ,perl-io-stringy)
1469 ("perl-libxml" ,perl-libxml)
1470 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1471 ("perl-xml-handler-yawriter" ,perl-xml-handler-yawriter)
1472 ("perl-xml-parser" ,perl-xml-parser)
1473 ("perl-xml-sax-writer" ,perl-xml-sax-writer)
1474 ("perl-xml-simple" ,perl-xml-simple)
1475 ("perl-xml-xpathengine" ,perl-xml-xpathengine)
c695fb76 1476 ("perl-test-pod" ,perl-test-pod)
85f225fb
P
1477 ("perl-tree-xpathengine" ,perl-tree-xpathengine)))
1478 (home-page "http://search.cpan.org/dist/XML-Twig/")
1479 (synopsis "Perl module for processing huge XML documents in tree mode")
1480 (description "@code{XML::Twig} is an XML transformation module. Its
1481strong points: can be used to process huge documents while still being in tree
1482mode; not bound by DOM or SAX, so it is very perlish and offers a very
1483comprehensive set of methods; simple to use; DWIMs as much as possible.
1484
1485What it doesn't offer: full SAX support (it can export SAX, but only reads
1486XML), full XPath support (unless you use @code{XML::Twig::XPath}), nor DOM
1487support.")
1488 (license license:perl-license)))
1a17ca26
JL
1489
1490;; TODO: Debian builds several jars out of this: jaxp-1.4.jar,
1491;; xml-apis.jar and xml-apis-1.4.01.jar.
1492(define-public java-jaxp
1493 (package
1494 (name "java-jaxp")
1495 (version "1.4.01")
1496 (source
1497 (origin
1498 (method url-fetch)
1499 (uri (string-append "mirror://apache/xerces/xml-commons/source/"
1500 "xml-commons-external-" version "-src.tar.gz"))
1501 (sha256
1502 (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk"))))
1503 (build-system ant-build-system)
1504 (arguments
1505 `(#:jar-name "jaxp.jar"
1506 #:jdk ,icedtea-8
1507 #:source-dir ".."
1508 #:tests? #f)); no tests
1509 (home-page "http://xerces.apache.org/xml-commons/")
1510 (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)")
1511 (description "Jaxp from the Apache XML Commons project is used by
1512the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs:
1513
1514@itemize
1515@item Document Object Model (DOM)
1516@item Simple API for XML (SAX)
1517@item Java APIs for XML Processing (JAXP)
1518@item Transformation API for XML (TrAX)
1519@item Document Object Model (DOM) Load and Save
1520@item JSR 206 Java API for XML Processing
1521@end itemize")
1522 (license (list license:asl2.0
1523 license:w3c ;; Files under org.w3c
1524 license:public-domain)))) ;; org.xml.sax
9a86ee78
JL
1525
1526(define-public java-apache-xml-commons-resolver
1527 (package
1528 (name "java-apache-xml-commons-resolver")
1529 (version "1.2")
1530 (source
1531 (origin
1532 (method url-fetch)
1533 (uri (string-append "mirror://apache/xerces/xml-commons/"
1534 "xml-commons-resolver-" version ".tar.gz"))
1535 (sha256
1536 (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm"))
1537 (modules '((guix build utils)))
1538 (snippet
1539 '(begin
1540 (for-each delete-file (find-files "." ".*\\.(jar|zip)"))
1541 #t))))
1542 (build-system ant-build-system)
1543 (arguments
1544 `(#:jar-name (string-append "xml-resolver.jar")
1545 #:tests? #f)); no tests
1546 (inputs
1547 `(("java-junit" ,java-junit)))
1548 (home-page "http://xerces.apache.org/xml-commons/")
1549 (synopsis "Catalog-based entity and URI resolution")
1550 (description "The resolver class implements the full semantics of OASIS Technical
1551Resolution 9401:1997 (Amendment 2 to TR 9401) catalogs and the 06 Aug
15522001 Committee Specification of OASIS XML Catalogs.
1553
1554It also includes a framework of classes designed to read catalog files
1555in a number of formats:
1556
1557@itemize
1558@item The plain-text flavor described by TR9401.
1559@item The XCatalog XML format defined by John Cowan
1560@item The XML Catalog format defined by the OASIS Entity Resolution
1561 Technical Committee.
1562@end itemize")
1563 (license license:asl2.0)))
7eae94d8
JL
1564
1565;; Jaxen requires java-dom4j and java-xom that in turn require jaxen.
1566;; This package is a bootstrap version without dependencies on dom4j and xom.
1567(define java-jaxen-bootstrap
1568 (package
1569 (name "java-jaxen-bootstrap")
1570 (version "1.1.6")
1571 (source (origin
1572 (method url-fetch)
1573 ;; No release on github
1574 (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/"
1575 version "/jaxen-" version "-sources.jar"))
1576 (sha256
1577 (base32
1578 "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx"))))
1579 (build-system ant-build-system)
1580 (arguments
1581 `(#:jar-name "jaxen.jar"
1582 #:source-dir "src"
1583 #:tests? #f; no tests
1584 #:phases
1585 (modify-phases %standard-phases
1586 (add-before 'build 'remove-dom4j
1587 (lambda _
1588 (delete-file-recursively "src/org/jaxen/dom4j")
1589 (delete-file-recursively "src/org/jaxen/xom")
1590 #t)))))
1591 (inputs
1592 `(("java-jdom" ,java-jdom)))
1593 (home-page "https://github.com/jaxen-xpath/jaxen")
1594 (synopsis "XPath library")
1595 (description "Jaxen is an XPath library written in Java. It is adaptable
1596to many different object models, including DOM, XOM, dom4j, and JDOM. It is
1597also possible to write adapters that treat non-XML trees such as compiled
1598Java byte code or Java beans as XML, thus enabling you to query these trees
1599with XPath too.")
1600 (license license:bsd-3)))
5552080d 1601
be0524f4
JL
1602(define-public java-jaxen
1603 (package
1604 (inherit java-jaxen-bootstrap)
1605 (name "java-jaxen")
1606 (inputs
1607 `(("java-jdom" ,java-jdom)
1608 ("java-xom" ,java-xom)
1609 ("java-dom4j" ,java-dom4j)))))
1610
5552080d
JL
1611(define-public java-xom
1612 (package
1613 (name "java-xom")
1614 (version "127")
1615 (source (origin
1616 (method url-fetch)
1617 (uri (string-append "https://github.com/elharo/xom/archive/XOM_"
1618 version ".tar.gz"))
1619 (sha256
1620 (base32
1621 "04m69db1irqja12a9rfxrac8cbn9psqa1k136wh4ls4pxfsdr5wg"))
1622 (modules '((guix build utils)))
1623 (snippet
1624 '(begin
1625 (for-each delete-file
1626 (find-files "." "\\.jar$"))
1627 #t))))
1628 (build-system ant-build-system)
1629 (arguments
1630 `(#:jar-name "xom.jar"
1631 #:jdk ,icedtea-8
1632 #:tests? #f; no tests
1633 #:phases
1634 (modify-phases %standard-phases
1635 (add-before 'configure 'fix-tagsoup-dep
1636 (lambda _
1637 ;; FIXME: Where is tagsoup source?
1638 (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java")
1639 #t)))))
1640 (inputs
1641 `(("java-jdom" ,java-jdom)
1642 ("java-junit" ,java-junit)
1643 ("java-classpathx-servletapi" ,java-classpathx-servletapi)
1644 ("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
1645 ("java-xerces" ,java-xerces)))
1646 (home-page "https://xom.nu/")
1647 (synopsis "XML Object Model")
1648 (description "XOM is a new XML Object Model for processing XML with Java
1649that strives for correctness and simplicity.")
1650 ;; 2.1 only
1651 (license license:lgpl2.1)))
96f31935
JL
1652
1653(define-public java-xsdlib
1654 (package
1655 (name "java-xsdlib")
1656 (version "2013.2")
1657 (source (origin
1658 (method url-fetch)
1659 (uri (string-append "http://central.maven.org/maven2/com/sun/msv/"
1660 "datatype/xsd/xsdlib/" version "/xsdlib-"
1661 version "-sources.jar"))
1662 (sha256
1663 (base32
1664 "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim"))))
1665 (build-system ant-build-system)
1666 (arguments
1667 `(#:tests? #f; no tests
1668 #:jar-name "xsdlib.jar"
1669 #:jdk ,icedtea-8))
1670 (inputs
1671 `(("java-xerces" ,java-xerces)))
1672 (home-page "http://central.maven.org/maven2/com/sun/msv/datatype/xsd/xsdlib/")
1673 (synopsis "Sun Multi-Schema Validator")
1674 (description "Xsdlib contains an implementation of sun.com.msv, an XML
1675validator.")
1676 (license license:bsd-2)))
82d7d4e1
JL
1677
1678(define-public java-xpp3
1679 (package
1680 (name "java-xpp3")
1681 (version "1.1.4")
1682 (source (origin
1683 (method url-fetch)
1684 (uri (string-append "http://www.extreme.indiana.edu/dist/"
1685 "java-repository/xpp3/distributions/xpp3-"
1686 version "_src.tgz"))
1687 (sha256
1688 (base32
1689 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
1690 (modules '((guix build utils)))
1691 (snippet
1692 '(begin ;; Delete bundled jar archives.
1693 (for-each delete-file (find-files "." ".*\\.jar"))
1694 #t))))
1695 (build-system ant-build-system)
1696 (arguments
1697 `(#:tests? #f; no tests
1698 #:build-target "jar"
1699 #:phases
1700 (modify-phases %standard-phases
1701 (replace 'install (install-jars "build")))))
1702 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
1703 (synopsis "Streaming pull XML parser")
1704 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
1705parser and should be used when there is a need to process quickly and
1706efficiently all input elements (for example in SOAP processors). This
1707package is a stable XmlPull parsing engine that is based on ideas from XPP
1708and in particular XPP2 but completely revised and rewritten to take the best
1709advantage of JIT JVMs.")
1710 (license (license:non-copyleft "file://LICENSE.txt"))))
9421f682
JL
1711
1712(define-public java-xmlpull2
1713 (package
1714 (name "java-xmlpull2")
1715 (version "2.1.10")
1716 (source (origin
1717 (method url-fetch)
1718 (uri (string-append "http://www.extreme.indiana.edu/xgws/xsoap/"
1719 "PullParser/PullParser" version ".tgz"))
1720 (sha256
1721 (base32
1722 "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md"))
1723 (modules '((guix build utils)))
1724 (snippet
1725 '(begin ;; Delete bundled jar archives.
1726 (for-each delete-file (find-files "." ".*\\.jar"))
1727 #t))))
1728 (build-system ant-build-system)
1729 (arguments
1730 `(#:tests? #f; no tests
1731 #:build-target "impl"
1732 #:phases
1733 (modify-phases %standard-phases
1734 (replace 'install (install-jars "build/lib")))))
1735 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
1736 (synopsis "Streaming pull XML parser")
1737 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
1738parser and should be used when there is a need to process quickly and
1739efficiently all input elements (for example in SOAP processors). This
1740package is in maintenance mode.")
1741 (license (license:non-copyleft "file:///LICENSE.txt"))))
605c23df
JL
1742
1743(define-public java-dom4j
1744 (package
1745 (name "java-dom4j")
1746 (version "2.1.0")
1747 (source (origin
1748 (method url-fetch)
1749 (uri (string-append "https://github.com/dom4j/dom4j/archive/"
1750 "version-" version ".tar.gz"))
1751 (file-name (string-append name "-" version ".tar.gz"))
1752 (sha256
1753 (base32
1754 "101drpnw6agmcvsi1jrfi0kn97r7liazrh5jbrip9vx26axn2fx9"))
1755 (modules '((guix build utils)))
1756 (snippet
1757 '(begin ;; Delete bundled jar archives.
1758 (for-each delete-file (find-files "." ".*\\.jar"))
1759 #t))))
1760 (build-system ant-build-system)
1761 (arguments
1762 `(#:jar-name "dom4j.jar"
1763 #:jdk ,icedtea-8
1764 #:source-dir "src/main/java"
1765 ;; FIXME: Requires xalan, but xalan depends on java-cup which has a
1766 ;; dependency on itself through jflex.
1767 #:tests? #f
1768 #:phases
1769 (modify-phases %standard-phases
1770 (add-before 'build 'copy-jaxen-sources
1771 ;; java-jaxen-bootstrap is not enough. These files have a circular
1772 ;; dependency and there is no subset of dom4j that would allow
1773 ;; breaking the circle.
1774 (lambda* (#:key inputs #:allow-other-keys)
1775 (mkdir-p "jaxen-sources")
1776 (with-directory-excursion "jaxen-sources"
1777 (system* "jar" "xf" (assoc-ref inputs "java-jaxen-sources")))
1778 (mkdir-p "src/main/java/org/jaxen/dom4j")
1779 (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java"
1780 "src/main/java/org/jaxen/dom4j/DocumentNavigator.java")
1781 (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java"
1782 "src/main/java/org/jaxen/dom4j/Dom4jXPath.java")
1783 #t))
1784 (add-before 'build 'fix-old-xpp2
1785 (lambda _
1786 ;; This package normally depends on xpp2 2.0, but version 2.1.10
1787 ;; is the only version whose source code is published.
1788 (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java"
1789 (("public void resetStartTag")
1790 "public boolean removeAttributeByRawName(String name) {\n
1791 return false;\n
1792}\n
1793public boolean removeAttributeByName(String name, String name2) {\n
1794 return false;\n
1795}\n\npublic void resetStartTag")
1796 (("Atttribute") "Attribute"))
1797 #t)))))
1798 (inputs
1799 `(("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
1800 ("java-jaxen-sources" ,(package-source java-jaxen-bootstrap))
1801 ("java-xmlpull2" ,java-xmlpull2)
1802 ("java-xpp3" ,java-xpp3)
1803 ("java-xsdlib" ,java-xsdlib)))
1804 (native-inputs
1805 `(("java-testng" ,java-testng)
1806 ("java-xerces" ,java-xerces)))
1807 (home-page "https://dom4j.github.io/")
1808 (synopsis "Flexible XML framework for Java")
1809 (description "Dom4j is a flexible XML framework for Java. DOM4J works
1810with DOM, SAX, XPath, and XSLT. It can parse large XML documents with very
1811low memory footprint.")
1812 ;; some BSD-like 5-clause license
1813 (license (license:non-copyleft "file://LICENSE"))))
3058d8ec
JL
1814
1815(define-public java-kxml2
1816 (package
1817 (name "java-kxml2")
1818 (version "2.4.2")
1819 (source (origin
1820 (method url-fetch)
1821 (uri (string-append "https://github.com/stefanhaustein/kxml2/archive/v"
1822 version ".tar.gz"))
1823 (file-name (string-append name "-" version ".tar.gz"))
1824 (sha256
1825 (base32
1826 "17kh04qf3vll1xx6sv06xlazw2hxa8qdmzyday9r6z2191jlj74w"))))
1827 (build-system ant-build-system)
1828 (arguments
1829 `(#:jar-name "kxml2.jar"
1830 #:source-dir "src/main/java"
1831 #:test-include (list "TestWb.java")
1832 ;; Test failure: it was expected to get an XML entity but got the
1833 ;; equivalent Unicode character instead.
1834 #:tests? #f
1835 #:phases
1836 (modify-phases %standard-phases
1837 (add-before 'build 'copy-resources
1838 (lambda _
1839 (copy-recursively "src/main/resources" "build/classes"))))))
1840 (inputs
1841 `(("java-xpp3" ,java-xpp3)))
1842 (native-inputs
1843 `(("java-junit" ,java-junit)))
1844 (home-page "http://kxml.org")
1845 (synopsis "XML pull parser")
1846 (description "kXML is a small XML pull parser, specially designed for
1847constrained environments such as Applets, Personal Java or devices compliant
1848with the Mobile Information Device Profile (MIDP).")
1849 (license license:expat)))
4c7759f0
JL
1850
1851(define-public java-stax
1852 (package
1853 (name "java-stax")
1854 (version "1.2.0")
1855 (source (origin
1856 (method url-fetch)
1857 (uri (string-append "https://repo1.maven.org/maven2/stax/stax/"
1858 version "/stax-" version "-sources.jar"))
1859 (sha256
1860 (base32
1861 "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z"))))
1862 (build-system ant-build-system)
1863 (arguments
1864 `(#:jar-name "stax.jar"
1865 #:tests? #f; no tests
1866 #:phases
1867 (modify-phases %standard-phases
1868 (add-before 'configure 'fix-utf8
1869 (lambda _
1870 ;; This file is ISO-8859-1 but java expects UTF-8.
1871 ;; Remove special characters in comments.
1872 (with-fluids ((%default-port-encoding "ISO-8859-1"))
1873 (substitute* "src/com/wutka/dtd/Scanner.java"
1874 (("//.*") "\n")))
1875 #t)))))
1876 (home-page "https://repo1.maven.org/maven2/stax/stax/")
1877 (synopsis "Streaming API for XML")
1878 (description "This package provides the reference implementation of the
1879@dfn{Streaming API for XML} (StAX). It is used for streaming XML data to
1880and from a Java application. It provides a standard pull parser interface.")
1881 (license license:asl2.0)))
b8798817
JL
1882
1883(define-public java-jettison
1884 (package
1885 (name "java-jettison")
1886 (version "1.3.7")
1887 (source (origin
1888 (method url-fetch)
1889 (uri (string-append "https://github.com/codehaus/jettison/archive/"
1890 "jettison-" version ".tar.gz"))
1891 (sha256
1892 (base32
1893 "0rdhfyxywvga5wiwasc04iqnxyixn3rd8wj01c9ymhvwc3h6dpqg"))))
1894 (build-system ant-build-system)
1895 (arguments
1896 `(#:jar-name "jettison.jar"
1897 #:source-dir "src/main/java"
1898 #:test-exclude (list "**/Abstract*.java"
1899 ;; Abstract classes
1900 "**/DOMTest.java"
1901 "**/BadgerFishDOMTest.java"
1902 "**/MappedDOMTest.java")))
1903 (native-inputs
1904 `(("java-junit" ,java-junit)))
1905 (home-page "https://github.com/codehaus/jettison")
1906 (synopsis "StAX implementation for JSON")
1907 (description "Jettison is a Java library for converting XML to JSON and
1908vice-versa with the help of the @dfn{Streaming API for XML} (StAX). It
1909implements @code{XMLStreamWriter} and @code{XMLStreamReader} and supports
1910@code{Mapped} and @code{BadgerFish} conventions.")
1911 (license license:asl2.0)))
a5ec8a5c
JL
1912
1913(define-public java-jdom2
1914 (package
1915 (name "java-jdom")
1916 (version "2.0.6")
1917 (source (origin
1918 (method url-fetch)
1919 (uri (string-append "https://github.com/hunterhacker/jdom/archive/JDOM-"
1920 version ".tar.gz"))
1921 (sha256
1922 (base32
1923 "0p8n7inqq2a25wk9ljinl3ixlx1x2la9qaman8ngd75xxjb02yc1"))))
1924 (build-system ant-build-system)
1925 (arguments
1926 `(#:build-target "package"
1927 #:tests? #f; tests are run as part of the build process
1928 #:phases
1929 (modify-phases %standard-phases
1930 (replace 'install
1931 (install-jars "build")))))
1932 (home-page "http://jdom.org/")
1933 (synopsis "Access, manipulate, and output XML data")
1934 (description "Jdom is a Java-based solution for accessing, manipulating, and
1935outputting XML data from Java code.")
1936 (license license:bsd-4)))
5ee7b02f
JL
1937
1938(define-public java-xstream
1939 (package
1940 (name "java-xstream")
1941 (version "1.4.10")
1942 (source (origin
1943 (method url-fetch)
1944 (uri (string-append
1945 "https://github.com/x-stream/xstream/archive/XSTREAM_"
1946 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
1947 ".tar.gz"))
1948 (file-name (string-append name "-" version ".tar.gz"))
1949 (sha256
1950 (base32
1951 "10zbkam05wirxipvgrjimdwsyqrwl4a0n7lhvxbsssqpv727469g"))))
1952 (build-system ant-build-system)
1953 (arguments
1954 `(#:jar-name "xstream.jar"
1955 ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system
1956 #:tests? #f
1957 #:jdk ,icedtea-8
1958 #:source-dir "xstream/src/java"))
1959 (inputs
1960 `(("java-jdom" ,java-jdom)
1961 ("java-jdom2" ,java-jdom2)
1962 ("java-cglib" ,java-cglib)
1963 ("java-joda-time" ,java-joda-time)
1964 ("java-jettison" ,java-jettison)
1965 ("java-xom" ,java-xom)
1966 ("java-xpp3" ,java-xpp3)
1967 ("java-dom4j" ,java-dom4j)
1968 ("java-stax2-api" ,java-stax2-api)
1969 ("java-woodstox-core" ,java-woodstox-core)
1970 ("java-kxml2" ,java-kxml2)
1971 ("java-stax" ,java-stax)))
1972 (home-page "https://x-stream.github.io")
1973 (synopsis "XML serialization library")
1974 (description "XStream is a simple library to serialize Java objects to XML
1975and back again.")
1976 (license license:bsd-3)))
5c1cf7f3
RW
1977
1978(define-public ghc-hxt-charproperties
1979 (package
1980 (name "ghc-hxt-charproperties")
1981 (version "9.2.0.1")
1982 (source
1983 (origin
1984 (method url-fetch)
1985 (uri (string-append "https://hackage.haskell.org/package/"
1986 "hxt-charproperties/hxt-charproperties-"
1987 version ".tar.gz"))
1988 (sha256
1989 (base32
1990 "1mml8wglvagqq891rchgli6r8rnkwrqhgsxfl6kb5403pzb18rp4"))))
1991 (build-system haskell-build-system)
1992 (home-page "https://github.com/UweSchmidt/hxt")
1993 (synopsis "Character properties and classes for XML and Unicode")
1994 (description
1995 "The modules provided by this package contain predicates for Unicode
1996blocks and char properties and character predicates defined by XML. The
1997supported Unicode version is 7.0.0")
1998 (license license:expat)))
1999
e85de108
RW
2000(define-public ghc-hxt-unicode
2001 (package
2002 (name "ghc-hxt-unicode")
2003 (version "9.0.2.4")
2004 (source
2005 (origin
2006 (method url-fetch)
2007 (uri (string-append
2008 "https://hackage.haskell.org/package/hxt-unicode/hxt-unicode-"
2009 version
2010 ".tar.gz"))
2011 (sha256
2012 (base32
2013 "0rj48cy8z4fl3zpg5bpa458kqr83adav6jnqv4i71dclpprj6n3v"))))
2014 (build-system haskell-build-system)
2015 (inputs
2016 `(("ghc-hxt-charproperties" ,ghc-hxt-charproperties)))
2017 (home-page
2018 "http://www.fh-wedel.de/~si/HXmlToolbox/index.html https://github.com/UweSchmidt/hxt")
2019 (synopsis
2020 "Unicode en-/decoding functions for utf8, iso-latin-* and other encodings")
2021 (description
2022 "This package provides Unicode encoding and decoding functions for
2023encodings used in the Haskell XML Toolbox. ISO Latin 1-16, utf8, utf16, ASCII
2024are supported. Decoding is done with lazy functions, errors may be detected or
2025ignored.")
2026 (license license:expat)))
2027
6f8deed6
RW
2028(define-public ghc-hxt-regex-xmlschema
2029 (package
2030 (name "ghc-hxt-regex-xmlschema")
2031 (version "9.2.0.3")
2032 (source
2033 (origin
2034 (method url-fetch)
2035 (uri (string-append "https://hackage.haskell.org/package/"
2036 "hxt-regex-xmlschema/hxt-regex-xmlschema-"
2037 version ".tar.gz"))
2038 (sha256
2039 (base32
2040 "1c4jr0439f5yc05h7iz53fa47g6l2wrvqp6gvwf01mlqajk3nx7l"))))
2041 (build-system haskell-build-system)
2042 (inputs
2043 `(("ghc-hxt-charproperties" ,ghc-hxt-charproperties)
2044 ("ghc-parsec" ,ghc-parsec)
2045 ("ghc-text" ,ghc-text)
2046 ("ghc-hunit" ,ghc-hunit)))
2047 (home-page "http://www.haskell.org/haskellwiki/Regular_expressions_for_XML_Schema")
2048 (synopsis "Regular expression library for W3C XML Schema regular expressions")
2049 (description
2050 "This library supports full W3C XML Schema regular expressions inclusive
2051all Unicode character sets and blocks. It is implemented by the technique of
2052derivations of regular expressions.")
2053 (license license:expat)))
2054
31511899
RW
2055(define-public ghc-hxt
2056 (package
2057 (name "ghc-hxt")
2058 (version "9.3.1.16")
2059 (source
2060 (origin
2061 (method url-fetch)
2062 (uri (string-append
2063 "https://hackage.haskell.org/package/hxt/hxt-"
2064 version
2065 ".tar.gz"))
2066 (sha256
2067 (base32
2068 "1qq3ykgn355rx242xjcbqqksgvwr6k2fdj5phw4iv28qqxff6m8d"))))
2069 (build-system haskell-build-system)
2070 (inputs
2071 `(("ghc-parsec" ,ghc-parsec)
2072 ("ghc-mtl" ,ghc-mtl)
2073 ("ghc-hxt-charproperties" ,ghc-hxt-charproperties)
2074 ("ghc-hxt-unicode" ,ghc-hxt-unicode)
2075 ("ghc-hxt-regex-xmlschema" ,ghc-hxt-regex-xmlschema)
2076 ("ghc-network-uri" ,ghc-network-uri)))
2077 (home-page "https://github.com/UweSchmidt/hxt")
2078 (synopsis "Collection of tools for processing XML with Haskell")
2079 (description
2080 "The Haskell XML Toolbox bases on the ideas of HaXml and HXML, but
2081introduces a more general approach for processing XML with Haskell.")
2082 (license license:expat)))