gnu: html-xml-utils: Update to 7.5.
[jackhill/guix/guix.git] / gnu / packages / xml.scm
CommitLineData
d0414883 1;;; GNU Guix --- Functional package management for GNU
493e9a5a 2;;; Copyright © 2013, 2014, 2015, 2016 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>
d00d6cea 6;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
96fd87c9 7;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
e831256f 8;;; Copyright © 2015, 2016 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>
d66fa696 16;;; Copyright © 2016, 2017 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)
f0444eaf 43 #:use-module (gnu packages perl)
5ccde207 44 #:use-module (gnu packages perl-check)
f0444eaf 45 #:use-module (gnu packages python)
a7fd7b68 46 #:use-module (gnu packages tls)
ad871fc6 47 #:use-module (gnu packages web)
b5b73a82 48 #:use-module ((guix licenses) #:prefix license:)
d0414883
LC
49 #:use-module (guix packages)
50 #:use-module (guix download)
77d7b57c 51 #:use-module (guix build-system ant)
6ce212b8 52 #:use-module (guix build-system cmake)
2a1e82bb 53 #:use-module (guix build-system gnu)
37f9ff63 54 #:use-module (guix build-system perl)
7ce32242 55 #:use-module (guix build-system python)
e4aab734
RW
56 #:use-module (gnu packages linux)
57 #:use-module (gnu packages pkg-config))
d0414883
LC
58
59(define-public expat
60 (package
61 (name "expat")
05e26d1e 62 (version "2.2.1")
63bbf38f 63 (replacement expat-2.2.4)
d0414883
LC
64 (source (origin
65 (method url-fetch)
66 (uri (string-append "mirror://sourceforge/expat/expat/"
51514e69 67 version "/expat-" version ".tar.bz2"))
d0414883
LC
68 (sha256
69 (base32
05e26d1e 70 "11c8jy1wvllvlk7xdc5cm8hdhg0hvs8j0aqy6s702an8wkdcls0q"))))
d0414883
LC
71 (build-system gnu-build-system)
72 (home-page "http://www.libexpat.org/")
9e771e3b 73 (synopsis "Stream-oriented XML parser library written in C")
d0414883
LC
74 (description
75 "Expat is an XML parser library written in C. It is a
76stream-oriented parser in which an application registers handlers for
77things the parser might find in the XML document (like start tags).")
78 (license license:expat)))
f0444eaf 79
63bbf38f 80(define expat-2.2.4 ; Fix CVE-{2016-9063,2017-9233,2017-11742} & other issues.
96fd87c9
MW
81 (package
82 (inherit expat)
63bbf38f 83 (version "2.2.4")
96fd87c9
MW
84 (source (origin
85 (method url-fetch)
86 (uri (string-append "mirror://sourceforge/expat/expat/"
87 version "/expat-" version ".tar.bz2"))
88 (sha256
89 (base32
63bbf38f 90 "17h1fb9zvqvf0sr78j211bngc6jpql5wzar8fg9b52jzjvdqbb83"))))))
96fd87c9 91
5bc2d579
GG
92(define-public libebml
93 (package
94 (name "libebml")
a040db6d 95 (version "1.3.5")
5bc2d579
GG
96 (source
97 (origin
98 (method url-fetch)
99 (uri (string-append "https://dl.matroska.org/downloads/"
a040db6d 100 name "/" name "-" version ".tar.xz"))
5bc2d579
GG
101 (sha256
102 (base32
a040db6d 103 "005a0ipqnfbsq47zrc61zszi439jw32q5xd6dc1jyb3lc0zl266q"))))
5bc2d579 104 (build-system gnu-build-system)
a040db6d 105 (home-page "https://matroska-org.github.io/libebml/")
cb778117
TGR
106 (synopsis "C++ library to parse EBML files")
107 (description "libebml is a C++ library to read and write @dfn{EBML}
108(Extensible Binary Meta Language) files. EBML was designed to be a simplified
109binary extension of XML for the purpose of storing and manipulating data in a
5bc2d579
GG
110hierarchical form with variable field lengths.")
111 (license license:lgpl2.1)))
112
f0444eaf
AE
113(define-public libxml2
114 (package
115 (name "libxml2")
3c9e0ddc 116 (version "2.9.4")
76fed2b3 117 (replacement libxml2/fixed)
f0444eaf
AE
118 (source (origin
119 (method url-fetch)
120 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
121 version ".tar.gz"))
e9f62e52
LF
122 (patches (search-patches "libxml2-CVE-2016-4658.patch"
123 "libxml2-CVE-2016-5131.patch"))
f0444eaf
AE
124 (sha256
125 (base32
3c9e0ddc 126 "0g336cr0bw6dax1q48bblphmchgihx9p1pjmxdnrd6sh3qci3fgz"))))
f0444eaf
AE
127 (build-system gnu-build-system)
128 (home-page "http://www.xmlsoft.org/")
35b9e423 129 (synopsis "C parser for XML")
c1944c92 130 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
7ce32242 131 (native-inputs `(("perl" ,perl)))
2a8d4401
LC
132 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
133 ;; sub-directory of any given package.
74528069
LC
134 (native-search-paths (list (search-path-specification
135 (variable "XML_CATALOG_FILES")
136 (separator " ")
137 (files '("xml"))
138 (file-pattern "^catalog\\.xml$")
139 (file-type 'regular))))
2a8d4401 140 (search-paths native-search-paths)
f0444eaf 141 (description
7c125ce0
AK
142 "Libxml2 is the XML C parser and toolkit developed for the Gnome
143project (but it is usable outside of the Gnome platform).")
f0444eaf 144 (license license:x11)))
58cc3b38 145
76fed2b3
AV
146(define libxml2/fixed
147 (package
148 (inherit libxml2)
149 (source
150 (origin
151 (inherit (package-source libxml2))
152 (patches
1b3f5fc3 153 (append (origin-patches (package-source libxml2))
76fed2b3
AV
154 (search-patches "libxml2-CVE-2017-0663.patch"
155 "libxml2-CVE-2017-7375.patch"
156 "libxml2-CVE-2017-7376.patch"
157 "libxml2-CVE-2017-9047+CVE-2017-9048.patch"
7c3f22e9
LF
158 "libxml2-CVE-2017-9049+CVE-2017-9050.patch"
159 "libxml2-CVE-2017-15412.patch")))))))
76fed2b3 160
7ce32242 161(define-public python-libxml2
e428b2c0 162 (package/inherit libxml2
7ce32242
SB
163 (name "python-libxml2")
164 (build-system python-build-system)
165 (arguments
166 `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
167 #:tests? #f
168 #:phases
169 (modify-phases %standard-phases
170 (add-before
171 'build 'configure
172 (lambda* (#:key inputs #:allow-other-keys)
173 (chdir "python")
174 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
175 "cross-libc" "libc")))
176 (libxml2 (assoc-ref inputs "libxml2")))
177 (substitute* "setup.py"
178 ;; For 'libxml2/libxml/tree.h'.
179 (("ROOT = r'/usr'")
180 (format #f "ROOT = r'~a'" libxml2))
181 ;; For 'iconv.h'.
182 (("/opt/include")
183 (string-append glibc "/include")))))))))
184 (inputs `(("libxml2" ,libxml2)))
185 (synopsis "Python bindings for the libxml2 library")))
186
187(define-public python2-libxml2
188 (package-with-python2 python-libxml2))
189
58cc3b38
AE
190(define-public libxslt
191 (package
192 (name "libxslt")
0c9c9526 193 (replacement libxslt/fixed)
28b33172 194 (version "1.1.29")
58cc3b38
AE
195 (source (origin
196 (method url-fetch)
197 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
198 version ".tar.gz"))
0c9c9526
LF
199 ;; XXX Oops, the patches field is redefined below, which means the
200 ;; patch for CVE-2016-4738 was not used. Fixed in the definition of
201 ;; libxslt/fixed below.
202 ;(patches (search-patches "libxslt-CVE-2016-4738.patch"))
58cc3b38
AE
203 (sha256
204 (base32
28b33172
LF
205 "1klh81xbm9ppzgqk339097i39b7fnpmlj8lzn8bpczl3aww6x5xm"))
206 (patches (search-patches "libxslt-generated-ids.patch"))))
58cc3b38
AE
207 (build-system gnu-build-system)
208 (home-page "http://xmlsoft.org/XSLT/index.html")
35b9e423 209 (synopsis "C library for applying XSLT stylesheets to XML documents")
58cc3b38
AE
210 (inputs `(("libgcrypt" ,libgcrypt)
211 ("libxml2" ,libxml2)
95288fcc 212 ("python" ,python-minimal-wrapper)
11e3f107 213 ("zlib" ,zlib)))
58cc3b38 214 (description
35b9e423 215 "Libxslt is an XSLT C library developed for the GNOME project. It is
58cc3b38
AE
216based on libxml for XML parsing, tree manipulation and XPath support.")
217 (license license:x11)))
2a1e82bb 218
0c9c9526
LF
219(define libxslt/fixed
220 (package
221 (inherit libxslt)
222 (source (origin
223 (inherit (package-source libxslt))
224 (patches (search-patches "libxslt-CVE-2016-4738.patch"
225 "libxslt-CVE-2017-5029.patch"
226 "libxslt-generated-ids.patch"))))))
227
5eec378b
BW
228(define-public perl-graph-readwrite
229 (package
230 (name "perl-graph-readwrite")
ffbc7d65 231 (version "2.09")
5eec378b
BW
232 (source
233 (origin
234 (method url-fetch)
235 (uri (string-append
236 "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-"
237 version
238 ".tar.gz"))
239 (sha256
240 (base32
ffbc7d65 241 "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh"))))
5eec378b
BW
242 (build-system perl-build-system)
243 (propagated-inputs
244 `(("perl-graph" ,perl-graph)
245 ("perl-parse-yapp" ,perl-parse-yapp)
246 ("perl-xml-parser" ,perl-xml-parser)
247 ("perl-xml-writer" ,perl-xml-writer)))
248 (home-page "http://search.cpan.org/dist/Graph-ReadWrite")
249 (synopsis "Modules for reading and writing directed graphs")
250 (description "This is a collection of perl classes for reading and writing
251directed graphs in a variety of file formats. The graphs are represented in
252Perl using Jarkko Hietaniemi's @code{Graph} classes.
253
254There are two base classes. @code{Graph::Reader} is the base class for classes
255which read a graph file and create an instance of the Graph class.
256@code{Graph::Writer} is the base class for classes which take an instance of
257the @code{Graph} class and write it out in a specific file format.")
2f3108ad 258 (license license:perl-license)))
5eec378b 259
b2696a58 260(define-public perl-xml-atom
261 (package
262 (name "perl-xml-atom")
522f1995 263 (version "0.42")
b2696a58 264 (source (origin
265 (method url-fetch)
266 (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
267 "XML-Atom-" version ".tar.gz"))
268 (sha256
269 (base32
522f1995 270 "1wa8kfy1w4mg7kzxim4whyprkn48a2il6fap0b947zywknw4c6y6"))))
b2696a58 271 (build-system perl-build-system)
522f1995
MB
272 (arguments
273 `(#:phases
274 (modify-phases %standard-phases
275 (add-before 'check 'set-perl-search-path
276 (lambda _
277 (setenv "PERL5LIB"
278 (string-append (getcwd) ":"
279 (getenv "PERL5LIB")))
280 #t)))))
b2696a58 281 (native-inputs
282 `(("perl-datetime" ,perl-datetime)
283 ;; TODO package: perl-datetime-format-atom
522f1995
MB
284 ("perl-html-tagset" ,perl-html-tagset)
285 ("perl-module-build-tiny" ,perl-module-build-tiny)
9dab5017 286 ("perl-module-install" ,perl-module-install)
b2696a58 287 ("perl-xml-xpath" ,perl-xml-xpath)))
288 (inputs
289 `(("perl-class-data-inheritable" ,perl-class-data-inheritable)
290 ("perl-datetime" ,perl-datetime)
291 ("perl-datetime-timezone" ,perl-datetime-timezone)
292 ("perl-digest-sha1" ,perl-digest-sha1)
293 ("perl-libwww" ,perl-libwww)
294 ("perl-uri" ,perl-uri)
295 ("perl-xml-libxml" ,perl-xml-libxml)
296 ("perl-xml-xpath" ,perl-xml-xpath)))
297 (home-page "http://search.cpan.org/dist/XML-Atom")
298 (synopsis "Atom feed and API implementation")
299 (description
300 "Atom is a syndication, API, and archiving format for weblogs and other data.
301@code{XML::Atom} implements the feed format as well as a client for the API.")
2f3108ad 302 (license license:perl-license)))
b2696a58 303
d66fa696
MB
304(define-public perl-xml-descent
305 (package
306 (name "perl-xml-descent")
307 (version "1.04")
308 (source (origin
309 (method url-fetch)
310 (uri (string-append "mirror://cpan/authors/id/A/AN/ANDYA/"
311 "XML-Descent-" version ".tar.gz"))
312 (sha256
313 (base32
314 "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7"))))
315 (build-system perl-build-system)
316 (native-inputs
317 `(("perl-module-build" ,perl-module-build)))
318 (propagated-inputs
319 `(("perl-test-differences" ,perl-test-differences)
320 ("perl-xml-tokeparser" ,perl-xml-tokeparser)))
321 (home-page "http://search.cpan.org/dist/XML-Descent")
322 (synopsis "Recursive descent XML parsing")
323 (description
324 "The conventional models for parsing XML are either @dfn{DOM}
325(a data structure representing the entire document tree is created) or
326@dfn{SAX} (callbacks are issued for each element in the XML).
327
328XML grammar is recursive - so it's nice to be able to write recursive
329parsers for it. @code{XML::Descent} allows such parsers to be created.")
2f3108ad 330 (license license:perl-license)))
d66fa696 331
2a1e82bb
LC
332(define-public perl-xml-parser
333 (package
334 (name "perl-xml-parser")
d495634b 335 (version "2.44")
2a1e82bb
LC
336 (source (origin
337 (method url-fetch)
338 (uri (string-append
2b8c5f54 339 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
2a1e82bb
LC
340 version ".tar.gz"))
341 (sha256
342 (base32
d495634b 343 "05ij0g6bfn27iaggxf8nl5rhlwx6f6p6xmdav6rjcly3x5zd1s8s"))))
2a1e82bb
LC
344 (build-system perl-build-system)
345 (arguments `(#:make-maker-flags
346 (let ((expat (assoc-ref %build-inputs "expat")))
347 (list (string-append "EXPATLIBPATH=" expat "/lib")
348 (string-append "EXPATINCPATH=" expat "/include")))))
349 (inputs `(("expat" ,expat)))
2f3108ad 350 (license license:perl-license)
2a1e82bb
LC
351 (synopsis "Perl bindings to the Expat XML parsing library")
352 (description
353 "This module provides ways to parse XML documents. It is built on top of
354XML::Parser::Expat, which is a lower level interface to James Clark's expat
355library. Each call to one of the parsing methods creates a new instance of
356XML::Parser::Expat which is then used to parse the document. Expat options
357may be provided when the XML::Parser object is created. These options are
358then passed on to the Expat object on each parse call. They can also be given
359as extra arguments to the parse methods, in which case they override options
360given at XML::Parser creation time.")
d495634b 361 (home-page "http://search.cpan.org/dist/XML-Parser")))
37f9ff63 362
62b28f19
MB
363(define-public perl-xml-tokeparser
364 (package
365 (name "perl-xml-tokeparser")
366 (version "0.05")
367 (source (origin
368 (method url-fetch)
369 (uri (string-append "mirror://cpan/authors/id/P/PO/PODMASTER/"
370 "XML-TokeParser-" version ".tar.gz"))
371 (sha256
372 (base32
373 "1hnpwb3lh6cbgwvjjgqzcp6jm4mp612qn6ili38adc9nhkwv8fc5"))))
374 (build-system perl-build-system)
375 (propagated-inputs `(("perl-xml-parser" ,perl-xml-parser)))
376 (home-page "http://search.cpan.org/dist/XML-TokeParser")
377 (synopsis "Simplified interface to XML::Parser")
378 (description
379 "@code{XML::TokeParser} provides a procedural (\"pull mode\") interface
380to @code{XML::Parser} in much the same way that Gisle Aas'
381@code{HTML::TokeParser} provides a procedural interface to @code{HTML::Parser}.
382@code{XML::TokeParser} splits its XML input up into \"tokens\", each
383corresponding to an @code{XML::Parser} event.")
2f3108ad 384 (license license:perl-license)))
62b28f19 385
7339fbe2 386(define-public perl-libxml
1385ba4f 387 (package
7339fbe2 388 (name "perl-libxml")
1385ba4f
AE
389 (version "0.08")
390 (source (origin
391 (method url-fetch)
392 (uri (string-append
393 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
394 version ".tar.gz"))
395 (sha256
396 (base32
397 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
398 (build-system perl-build-system)
7b81406a 399 (propagated-inputs
1385ba4f 400 `(("perl-xml-parser" ,perl-xml-parser)))
2f3108ad 401 (license license:perl-license)
1385ba4f
AE
402 (synopsis "Perl SAX parser using XML::Parser")
403 (description
404 "XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser
405module.")
406 (home-page "http://search.cpan.org/~kmacleod/libxml-perl/lib/XML/Parser/PerlSAX.pm")))
407
3dd6bee1
EB
408(define-public perl-xml-libxml
409 (package
410 (name "perl-xml-libxml")
58ade302 411 (version "2.0132")
3dd6bee1
EB
412 (source
413 (origin
414 (method url-fetch)
415 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
416 "XML-LibXML-" version ".tar.gz"))
417 (sha256
418 (base32
58ade302 419 "0xnl281hb590i287fxpl947f1s4zl9dnvc4ajvsqi89w23im453j"))))
3dd6bee1
EB
420 (build-system perl-build-system)
421 (propagated-inputs
422 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
423 ("perl-xml-sax" ,perl-xml-sax)))
424 (inputs
425 `(("libxml2" ,libxml2)))
426 (home-page "http://search.cpan.org/dist/XML-LibXML")
427 (synopsis "Perl interface to libxml2")
428 (description "This module implements a Perl interface to the libxml2
54c3c140 429library which provides interfaces for parsing and manipulating XML files. This
3dd6bee1
EB
430module allows Perl programmers to make use of the highly capable validating
431XML parser and the high performance DOM implementation.")
2f3108ad 432 (license license:perl-license)))
3dd6bee1 433
f7c4dc2f
RW
434(define-public perl-xml-libxml-simple
435 (package
436 (name "perl-xml-libxml-simple")
f3aa34cc 437 (version "0.97")
f7c4dc2f
RW
438 (source (origin
439 (method url-fetch)
440 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
441 "XML-LibXML-Simple-" version ".tar.gz"))
442 (sha256
443 (base32
f3aa34cc 444 "1g8nlk3zdz2cclxf7azvsb3jfxmvy6ml8wmj774k4qjqcsqmzk0w"))))
f7c4dc2f
RW
445 (build-system perl-build-system)
446 (propagated-inputs
447 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
448 ("perl-xml-libxml" ,perl-xml-libxml)))
449 (home-page "http://search.cpan.org/dist/XML-LibXML-Simple")
450 (synopsis "XML::LibXML based XML::Simple clone")
451 (description
452 "This package provides the same API as @code{XML::Simple} but is based on
453@code{XML::LibXML}.")
2f3108ad 454 (license license:perl-license)))
f7c4dc2f 455
93863a5e
RW
456(define-public perl-xml-libxslt
457 (package
458 (name "perl-xml-libxslt")
459 (version "1.95")
460 (source
461 (origin
462 (method url-fetch)
463 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
464 "XML-LibXSLT-" version ".tar.gz"))
465 (sha256
466 (base32
467 "0dggycql18kfxzkb1kw3yc7gslxlrrgyyn2r2ygsylycb89j3jpi"))))
468 (build-system perl-build-system)
469 (inputs
470 `(("libxslt" ,libxslt)))
471 (propagated-inputs
472 `(("perl-xml-libxml" ,perl-xml-libxml)))
473 (home-page "http://search.cpan.org/dist/XML-LibXSLT")
474 (synopsis "Perl bindings to GNOME libxslt library")
475 (description "This Perl module is an interface to the GNOME project's
476libxslt library.")
2f3108ad 477 (license license:perl-license)))
93863a5e 478
b715dbac
EB
479(define-public perl-xml-namespacesupport
480 (package
481 (name "perl-xml-namespacesupport")
88958ee0 482 (version "1.12")
b715dbac
EB
483 (source
484 (origin
485 (method url-fetch)
486 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
487 "XML-NamespaceSupport-" version ".tar.gz"))
488 (sha256
489 (base32
88958ee0 490 "1vz5pbi4lm5fhq2slrs2hlp6bnk29863abgjlcx43l4dky2rbsa7"))))
b715dbac
EB
491 (build-system perl-build-system)
492 (home-page "http://search.cpan.org/dist/XML-NamespaceSupport")
493 (synopsis "XML namespace support class")
494 (description "This module offers a simple to process namespaced XML
495names (unames) from within any application that may need them. It also helps
496maintain a prefix to namespace URI map, and provides a number of basic
497checks.")
2f3108ad 498 (license license:perl-license)))
b715dbac 499
a022b23f 500(define-public perl-xml-rss
501 (package
502 (name "perl-xml-rss")
503 (version "1.59")
504 (source (origin
505 (method url-fetch)
506 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
507 "XML-RSS-" version ".tar.gz"))
508 (sha256
509 (base32
510 "0v6vfizn2psy6av057kp7fv3z3y73s6b3w56jm3zr6hlq48llsx2"))))
511 (build-system perl-build-system)
512 (native-inputs
513 `(("perl-module-build" ,perl-module-build)
514 ("perl-test-manifest" ,perl-test-manifest)
515 ("perl-test-differences" ,perl-test-differences)
516 ("perl-test-pod" ,perl-test-pod)
517 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
518 ;; XXX: The test which uses this modules does not run, even when it is included
519 ;; it is ignored. ("perl-test-trailingspace" ,perl-test-trailingspace)
520 (inputs
521 `(("perl-datetime" ,perl-datetime)
522 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
523 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
524 ("perl-html-parser" ,perl-html-parser)
525 ("perl-xml-parser" ,perl-xml-parser)))
526 (home-page "http://search.cpan.org/dist/XML-RSS")
527 (synopsis "Creates and updates RSS files")
528 (description
529 "This module provides a basic framework for creating and maintaining
530RDF Site Summary (RSS) files. This distribution also contains many examples
531that allow you to generate HTML from an RSS, convert between 0.9, 0.91, and
5321.0 version, and more.")
2f3108ad 533 (license license:perl-license)))
a022b23f 534
18b8bbb3
EB
535(define-public perl-xml-sax
536 (package
537 (name "perl-xml-sax")
538 (version "0.99")
539 (source
540 (origin
541 (method url-fetch)
542 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
543 "XML-SAX-" version ".tar.gz"))
544 (sha256
545 (base32
546 "115dypb50w1l94y3iwihv5nkixbsv1cxiqkd93y4rk5n6s74pc1j"))))
547 (build-system perl-build-system)
548 (propagated-inputs
549 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
550 ("perl-xml-sax-base" ,perl-xml-sax-base)))
551 (arguments
552 `(#:phases (modify-phases %standard-phases
553 (add-before
40b084a3 554 'install 'augment-path
18b8bbb3
EB
555 ;; The install target tries to load the newly-installed
556 ;; XML::SAX module, but can't find it, so we need to tell
557 ;; perl where to look.
558 (lambda* (#:key outputs #:allow-other-keys)
559 (setenv "PERL5LIB"
560 (string-append (getenv "PERL5LIB") ":"
561 (assoc-ref outputs "out")
562 "/lib/perl5/site_perl")))))))
563 (home-page "http://search.cpan.org/dist/XML-SAX")
564 (synopsis "Perl API for XML")
565 (description "XML::SAX consists of several framework classes for using and
566building Perl SAX2 XML parsers, filters, and drivers.")
2f3108ad 567 (license license:perl-license)))
18b8bbb3 568
1ed6d5bc
EB
569(define-public perl-xml-sax-base
570 (package
571 (name "perl-xml-sax-base")
572 (version "1.08")
573 (source
574 (origin
575 (method url-fetch)
576 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
577 "XML-SAX-Base-" version ".tar.gz"))
578 (sha256
579 (base32
580 "17i161rq1ngjlk0c8vdkrkkc56y1pf51k1g54y28py0micqp0qk6"))))
581 (build-system perl-build-system)
582 (home-page "http://search.cpan.org/dist/XML-SAX-Base")
583 (synopsis "Base class for SAX Drivers and Filters")
584 (description "This module has a very simple task - to be a base class for
585PerlSAX drivers and filters. It's default behaviour is to pass the input
586directly to the output unchanged. It can be useful to use this module as a
587base class so you don't have to, for example, implement the characters()
588callback.")
2f3108ad 589 (license license:perl-license)))
1ed6d5bc 590
535dc6cf
AE
591(define-public perl-xml-simple
592 (package
593 (name "perl-xml-simple")
e831256f 594 (version "2.22")
535dc6cf
AE
595 (source (origin
596 (method url-fetch)
597 (uri (string-append
598 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
599 version ".tar.gz"))
600 (sha256
601 (base32
e831256f 602 "0jgbk30jizafpl7078jhw1di1yh08gf8d85dsvjllr595vr0widr"))))
535dc6cf 603 (build-system perl-build-system)
27ef7f45 604 (propagated-inputs
e831256f
EF
605 `(("perl-xml-parser" ,perl-xml-parser)
606 ("perl-xml-sax" ,perl-xml-sax)))
2f3108ad 607 (license license:perl-license)
535dc6cf
AE
608 (synopsis "Perl module for easy reading/writing of XML files")
609 (description
610 "The XML::Simple module provides a simple API layer on top of an
611underlying XML parsing module (either XML::Parser or one of the SAX2
612parser modules).")
e831256f 613 (home-page "http://search.cpan.org/dist/XML-Simple")))
535dc6cf 614
a2e520af
AE
615(define-public perl-xml-regexp
616 (package
617 (name "perl-xml-regexp")
618 (version "0.04")
619 (source (origin
620 (method url-fetch)
621 (uri (string-append
622 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
623 version ".tar.gz"))
624 (sha256
625 (base32
626 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
627 (build-system perl-build-system)
628 (inputs
629 `(("perl-xml-parser" ,perl-xml-parser)))
2f3108ad 630 (license license:perl-license)
a2e520af
AE
631 (synopsis "Perl regular expressions for XML tokens")
632 (description
633 "XML::RegExp contains regular expressions for the following XML tokens:
634BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
635EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
636 (home-page "http://search.cpan.org/~tjmather/XML-RegExp/lib/XML/RegExp.pm")))
637
ad871fc6
AE
638(define-public perl-xml-dom
639 (package
640 (name "perl-xml-dom")
4e5465f2 641 (version "1.46")
ad871fc6
AE
642 (source (origin
643 (method url-fetch)
644 (uri (string-append
645 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
646 version ".tar.gz"))
647 (sha256
648 (base32
4e5465f2 649 "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb"))))
ad871fc6 650 (build-system perl-build-system)
f7faff88
AE
651 (propagated-inputs
652 `(("perl-libwww" ,perl-libwww)
ad871fc6 653 ("perl-libxml" ,perl-libxml)
4e5465f2 654 ("perl-xml-parser" ,perl-xml-parser)
ad871fc6 655 ("perl-xml-regexp" ,perl-xml-regexp)))
2f3108ad 656 (license license:perl-license)
ad871fc6
AE
657 (synopsis
658 "Perl module for building DOM Level 1 compliant document structures")
659 (description
660 "This module extends the XML::Parser module by Clark Cooper. The
661XML::Parser module is built on top of XML::Parser::Expat, which is a lower
662level interface to James Clark's expat library. XML::DOM::Parser is derived
663from XML::Parser. It parses XML strings or files and builds a data structure
664that conforms to the API of the Document Object Model.")
665 (home-page "http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM.pm")))
666
649e1676
RW
667(define-public perl-xml-compile-tester
668 (package
669 (name "perl-xml-compile-tester")
670 (version "0.90")
671 (source (origin
672 (method url-fetch)
673 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
674 "XML-Compile-Tester-" version ".tar.gz"))
675 (sha256
676 (base32
677 "1bcl8x8cyacqv9yjp97aq9qq85sy8wv78kd8c16yd9yw3by4cpp1"))))
678 (build-system perl-build-system)
679 (propagated-inputs
680 `(("perl-log-report" ,perl-log-report)
681 ("perl-test-deep" ,perl-test-deep)))
682 (home-page "http://search.cpan.org/dist/XML-Compile-Tester")
683 (synopsis "XML::Compile related regression testing")
684 (description
685 "The @code{XML::Compile} module suite has extensive regression testing.
686This module provide functions which simplify writing tests for
687@code{XML::Compile} related distributions.")
2f3108ad 688 (license license:perl-license)))
649e1676 689
b494a5f1
RW
690(define-public perl-xml-compile
691 (package
692 (name "perl-xml-compile")
18c832b0 693 (version "1.54")
b494a5f1
RW
694 (source (origin
695 (method url-fetch)
696 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
697 "XML-Compile-" version ".tar.gz"))
698 (sha256
699 (base32
18c832b0 700 "1hp41960bpqxvv1samv9hc0ghhmvs3i16r4rfl9yp54lp6jhsr2c"))))
b494a5f1
RW
701 (build-system perl-build-system)
702 (propagated-inputs
703 `(("perl-log-report" ,perl-log-report)
704 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
705 ("perl-xml-libxml" ,perl-xml-libxml)
706 ("perl-test-deep" ,perl-test-deep)))
707 (home-page "http://search.cpan.org/dist/XML-Compile")
708 (synopsis "Compilation-based XML processing")
709 (description
710 "@code{XML::Compile} can be used to translate a Perl data-structure into
711XML or XML into a Perl data-structure, both directions under rigid control by
712a schema.")
2f3108ad 713 (license license:perl-license)))
b494a5f1 714
c1d41b5d
RW
715(define-public perl-xml-compile-cache
716 (package
717 (name "perl-xml-compile-cache")
6b9d3f55 718 (version "1.05")
c1d41b5d
RW
719 (source (origin
720 (method url-fetch)
721 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
722 "XML-Compile-Cache-" version ".tar.gz"))
723 (sha256
724 (base32
6b9d3f55 725 "0xbwlszhi9hg8sxm5ylglm2qvnb689i595p913awrj2g4mp9yfsw"))))
c1d41b5d
RW
726 (build-system perl-build-system)
727 (propagated-inputs
728 `(("perl-log-report" ,perl-log-report)
729 ("perl-xml-compile" ,perl-xml-compile)
730 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
731 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)))
732 (home-page "http://search.cpan.org/dist/XML-Compile-Cache")
733 (synopsis "Cache compiled XML translators")
734 (description
735 "This package provides methods to cache compiled XML translators.")
2f3108ad 736 (license license:perl-license)))
c1d41b5d 737
baeab9b8
RW
738(define-public perl-xml-compile-soap
739 (package
740 (name "perl-xml-compile-soap")
24c013c0 741 (version "3.21")
baeab9b8
RW
742 (source (origin
743 (method url-fetch)
744 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
745 "XML-Compile-SOAP-" version ".tar.gz"))
746 (sha256
747 (base32
24c013c0 748 "0rxidh7kjyhnw2y789bqbwccnp8n0m3xskn524y9c752s64qpjcz"))))
baeab9b8
RW
749 (build-system perl-build-system)
750 (propagated-inputs
751 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
752 ("perl-libwww" ,perl-libwww)
753 ("perl-log-report" ,perl-log-report)
754 ("perl-xml-compile" ,perl-xml-compile)
755 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
756 ("perl-xml-compile-tester" ,perl-xml-compile-tester)))
757 (home-page "http://search.cpan.org/dist/XML-Compile-SOAP")
758 (synopsis "Base-class for SOAP implementations")
759 (description
760 "This module provides a class to handle the SOAP protocol. The first
761implementation is @url{SOAP1.1,
762http://www.w3.org/TR/2000/NOTE-SOAP-20000508/}, which is still most often
763used.")
2f3108ad 764 (license license:perl-license)))
baeab9b8 765
6a914948
RW
766(define-public perl-xml-compile-wsdl11
767 (package
768 (name "perl-xml-compile-wsdl11")
270cdbef 769 (version "3.06")
6a914948
RW
770 (source (origin
771 (method url-fetch)
772 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
773 "XML-Compile-WSDL11-" version ".tar.gz"))
774 (sha256
775 (base32
270cdbef 776 "0vbq05cpynm3jj81fw1k4nsb3wv4zngi6blvi1jhdarmh2rfg1x2"))))
6a914948
RW
777 (build-system perl-build-system)
778 (propagated-inputs
779 `(("perl-log-report" ,perl-log-report)
780 ("perl-xml-compile" ,perl-xml-compile)
781 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
782 ("perl-xml-compile-soap" ,perl-xml-compile-soap)))
783 (home-page "http://search.cpan.org/dist/XML-Compile-WSDL11")
784 (synopsis "Create SOAP messages defined by WSDL 1.1")
785 (description
786 "This module understands WSDL version 1.1. A WSDL file defines a set of
787messages to be send and received over SOAP connections. This involves
788encoding of the message to be send into XML, sending the message to the
789server, collect the answer, and finally decoding the XML to Perl.")
2f3108ad 790 (license license:perl-license)))
6a914948 791
246455c2 792(define-public perl-xml-feed
793 (package
794 (name "perl-xml-feed")
795 (version "0.53")
796 (source (origin
797 (method url-fetch)
798 (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
799 "XML-Feed-" version ".tar.gz"))
800 (sha256
801 (base32
802 "07b165g6wk8kqwpl49r3n0kag6p2nrkyp3ch0h8qyxb6nrnkkq7c"))))
803 (build-system perl-build-system)
804 (arguments
805 `(#:tests? #f)) ; Tests require internet connection
806 (native-inputs
807 `(("perl-module-build" ,perl-module-build)
808 ("perl-uri" ,perl-uri)
809 ("perl-class-data-inheritable" ,perl-class-data-inheritable)))
810 (inputs
811 `(("perl-class-errorhandler" ,perl-class-errorhandler)
812 ("perl-datetime" ,perl-datetime)
813 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
814 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
815 ("perl-feed-find" ,perl-feed-find)
816 ("perl-html-parser" ,perl-html-parser)
817 ("perl-libwww-perl" ,perl-libwww)
818 ("perl-module-pluggable" ,perl-module-pluggable)
819 ("perl-uri-fetch" ,perl-uri-fetch)
820 ("perl-xml-atom" ,perl-xml-atom)
821 ("perl-xml-libxml" ,perl-xml-libxml)
822 ("perl-xml-rss" ,perl-xml-rss)))
823 (home-page "http://search.cpan.org/dist/XML-Feed")
824 (synopsis "XML Syndication Feed Support")
825 (description "@code{XML::Feed} is a syndication feed parser for both RSS and
826Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI.
827@code{XML::Feed} supports the following syndication feed formats:
828RSS 0.91, RSS 1.0, RSS 2.0, Atom")
2f3108ad 829 (license license:perl-license)))
246455c2 830
0c1bab36 831(define-public perl-xml-xpath
832 (package
833 (name "perl-xml-xpath")
47b4cedf 834 (version "1.40")
0c1bab36 835 (source (origin
836 (method url-fetch)
837 (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
838 "XML-XPath-" version ".tar.gz"))
839 (sha256
840 (base32
47b4cedf 841 "07pa0bl42jka8mj7jshjynx8vpfh8b4cdyiv4zlkqvkqz98nzxib"))))
0c1bab36 842 (build-system perl-build-system)
843 (native-inputs
844 `(("perl-path-tiny" ,perl-path-tiny)))
845 (inputs
846 `(("perl-xml-parser" ,perl-xml-parser)))
847 (home-page "http://search.cpan.org/dist/XML-XPath")
848 (synopsis "Parse and evaluate XPath statements")
849 (description
850 "This module aims to comply exactly to the @url{XPath specification,
851https://www.w3.org/TR/xpath} and yet allow extensions to be added in
852the form of functions.")
2f3108ad 853 (license license:perl-license)))
0c1bab36 854
6ce212b8
RW
855(define-public pugixml
856 (package
857 (name "pugixml")
f821b101 858 (version "1.8.1")
6ce212b8
RW
859 (source
860 (origin
861 (method url-fetch)
0562a81e
EF
862 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
863 version "/pugixml-" version ".tar.gz"))
6ce212b8
RW
864 (sha256
865 (base32
f821b101 866 "0fcgggry5x5bn0zhb09ij9hb0p45nb0sv0d9fw3cm1cf62hp9n80"))))
6ce212b8
RW
867 (build-system cmake-build-system)
868 (arguments
52c14bb6
RJ
869 `(#:configure-flags '("-DCMAKE_CXX_FLAGS=-shared -fPIC"
870 "-DCMAKE_C_FLAGS=-shared -fPIC")
871 #:tests? #f)) ; no tests
6ce212b8
RW
872 (home-page "http://pugixml.org")
873 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
874 (description
875 "pugixml is a C++ XML processing library, which consists of a DOM-like
876interface with rich traversal/modification capabilities, a fast XML parser
877which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
878implementation for complex data-driven tree queries. Full Unicode support is
879also available, with Unicode interface variants and conversions between
880different Unicode encodings which happen automatically during
881parsing/saving.")
882 (license license:expat)))
883
c2efe1ae
MB
884(define-public python-pyxb
885 (package
886 (name "python-pyxb")
4ef6cfef 887 (version "1.2.6")
c2efe1ae
MB
888 (source (origin
889 (method url-fetch)
890 (uri (pypi-uri "PyXB" version))
891 (sha256
892 (base32
4ef6cfef 893 "1d17pyixbfvjyi2lb0cfp0ch8wwdf44mmg3r5pwqhyyqs66z601a"))))
c2efe1ae
MB
894 (build-system python-build-system)
895 (home-page "http://pyxb.sourceforge.net/")
896 (synopsis "Python XML Schema Bindings")
897 (description
898 "PyXB (\"pixbee\") is a pure Python package that generates Python source
899code for classes that correspond to data structures defined by XMLSchema.")
900 (license (list license:asl2.0 ; Most files.
901 license:expat ; pyxb/utils/six.py
902 license:gpl2 ; bundled jquery in doc is dual MIT/GPL2
903 license:psfl)))) ; pyxb/utils/activestate.py
904
905(define-public python2-pyxb
906 (package-with-python2 python-pyxb))
907
37f9ff63
AE
908(define-public xmlto
909 (package
910 (name "xmlto")
877a6466 911 (version "0.0.28")
37f9ff63
AE
912 (source
913 (origin
914 (method url-fetch)
7bc19c92
LF
915 ;; The old source on fedorahosted.org is offline permanently:
916 ;; <https://bugs.gnu.org/25989>
917 (uri (string-append "mirror://debian/pool/main/x/xmlto/"
918 "xmlto_" version ".orig.tar.bz2"))
919 (file-name (string-append name "-" version ".tar.bz2"))
37f9ff63
AE
920 (sha256
921 (base32
877a6466 922 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
37f9ff63 923 (build-system gnu-build-system)
ae0c1202
LC
924 (arguments
925 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
926 '(#:configure-flags (list (string-append "GETOPT="
927 (assoc-ref %build-inputs
928 "util-linux")
929 "/bin/getopt"))))
37f9ff63 930 (inputs
ae0c1202
LC
931 `(("util-linux" ,util-linux) ; for 'getopt'
932 ("libxml2" ,libxml2) ; for 'xmllint'
933 ("libxslt" ,libxslt))) ; for 'xsltproc'
37f9ff63
AE
934 (home-page "http://cyberelk.net/tim/software/xmlto/")
935 (synopsis "Front-end to an XSL toolchain")
936 (description
937 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
938stylesheet for the conversion you want and applies it using an external
939XSL-T processor. It also performs any necessary post-processing.")
940 (license license:gpl2+)))
0899144f
AE
941
942(define-public xmlsec
943 (package
944 (name "xmlsec")
945 (version "1.2.20")
946 (source (origin
947 (method url-fetch)
948 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
949 name "1-" version ".tar.gz"))
950 (sha256
951 (base32
952 "01bkbv2y3x8d1sf4dcln1x3y2jyj391s3208d9a2ndhglly5j89j"))))
953 (build-system gnu-build-system)
954 (propagated-inputs ; according to xmlsec1.pc
955 `(("libxml2" ,libxml2)
956 ("libxslt" ,libxslt)))
957 (inputs
958 `(("gnutls" ,gnutls)
959 ("libgcrypt" ,libgcrypt)
960 ("libltdl" ,libltdl)))
e4aab734
RW
961 (native-inputs
962 `(("pkg-config" ,pkg-config)))
0899144f
AE
963 (home-page "http://www.libexpat.org/")
964 (synopsis "XML Security Library")
965 (description
966 "The XML Security Library is a C library based on Libxml2. It
967supports XML security standards such as XML Signature, XML Encryption,
968Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
969Libxml2).")
970 (license (license:x11-style "file://COPYING"
971 "See 'COPYING' in the distribution."))))
96f8d991
RW
972
973(define-public minixml
974 (package
975 (name "minixml")
b7cbcee5 976 (version "2.11")
96f8d991 977 (source (origin
b7cbcee5 978 (method url-fetch/tarbomb)
eba9ecd4 979 (uri (string-append "https://github.com/michaelrsweet/mxml/"
b7cbcee5 980 "releases/download/v" version
eba9ecd4 981 "/mxml-" version ".tar.gz"))
96f8d991
RW
982 (sha256
983 (base32
b7cbcee5 984 "13xsw8vvkxd10vca42ccdyl9rs64lcvhbfz57aknpl3xcfn8mxma"))))
96f8d991
RW
985 (build-system gnu-build-system)
986 (arguments
b7cbcee5
TGR
987 `(#:phases
988 (modify-phases %standard-phases
989 (add-after 'unpack 'fix-permissions
990 ;; FIXME: url-fetch/tarbomb resets all permissions to 555/444.
991 (lambda _
992 (for-each
993 (lambda (file)
994 (chmod file #o644))
995 (find-files "doc" "\\."))
996 #t)))
997 #:tests? #f)) ; tests are run during build
eba9ecd4 998 (home-page "https://michaelrsweet.github.io/mxml")
96f8d991
RW
999 (synopsis "Small XML parsing library")
1000 (description
1001 "Mini-XML is a small C library to read and write XML files and strings in
1002UTF-8 and UTF-16 encoding.")
1003 ;; LGPL 2.0+ with additional exceptions for static linking
1004 (license license:lgpl2.0+)))
33ae9107
DT
1005
1006;; TinyXML is an unmaintained piece of software, so the patches and build
1007;; system massaging have no upstream potential.
1008(define-public tinyxml
1009 (package
1010 (name "tinyxml")
1011 (version "2.6.2")
1012 (source (origin
1013 (method url-fetch)
de67e922
LF
1014 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
1015 version "/tinyxml_"
33ae9107
DT
1016 (string-join (string-split version #\.) "_")
1017 ".tar.gz"))
1018 (sha256
1019 (base32
1020 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
fc1adab1 1021 (patches (search-patches "tinyxml-use-stl.patch"))))
33ae9107
DT
1022 (build-system gnu-build-system)
1023 ;; This library is missing *a lot* of the steps to make it usable, so we
1024 ;; have to add them here, like every other distro must do.
1025 (arguments
1026 `(#:phases
1027 (modify-phases %standard-phases
1028 (delete 'configure)
1029 (add-after 'build 'build-shared-library
1030 (lambda _
1031 (zero? (system* "g++" "-Wall" "-O2" "-shared" "-fpic"
1032 "tinyxml.cpp" "tinyxmlerror.cpp"
1033 "tinyxmlparser.cpp" "tinystr.cpp"
1034 "-o" "libtinyxml.so"))))
1035 (replace 'check
1036 (lambda _ (zero? (system "./xmltest"))))
1037 (replace 'install
1038 (lambda* (#:key outputs #:allow-other-keys)
1039 (let* ((out (assoc-ref outputs "out"))
1040 (include (string-append out "/include"))
1041 (lib (string-append out "/lib"))
1042 (pkgconfig (string-append out "/lib/pkgconfig"))
1043 (doc (string-append out "/share/doc")))
1044 ;; Install libs and headers.
1045 (install-file "libtinyxml.so" lib)
1046 (install-file "tinystr.h" include)
1047 (install-file "tinyxml.h" include)
1048 ;; Generate and install pkg-config file.
1049 (mkdir-p pkgconfig)
1050 ;; Software such as Kodi expect this file to be present, but
1051 ;; it's not provided in the source code.
1052 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
1053 (lambda (port)
1054 (format port "prefix=~a
1055exec_prefix=${prefix}
1056libdir=${exec_prefix}/lib
1057includedir=${prefix}/include
1058
1059Name: TinyXML
1060Description: A simple, small, C++ XML parser
1061Version: ~a
1062Libs: -L${libdir} -ltinyxml
1063Cflags: -I${includedir}
1064"
1065 out ,version)))
1066 ;; Install docs.
1067 (mkdir-p doc)
1068 (copy-recursively "docs" (string-append doc "tinyxml"))
1069 #t))))))
1070 (synopsis "Small XML parser for C++")
1071 (description "TinyXML is a small and simple XML parsing library for the
05077200 1072C++ programming language.")
33ae9107
DT
1073 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
1074 (license license:zlib)))
fe9451c5 1075
931bd7f6
TGR
1076(define-public tinyxml2
1077 (package
1078 (name "tinyxml2")
1079 (version "4.0.1")
1080 (source
1081 (origin
1082 (method url-fetch)
1083 (uri (string-append "https://github.com/leethomason/tinyxml2/archive/"
1084 version ".tar.gz"))
1085 (sha256
1086 (base32
1087 "083z4r4khcndxi9k840lcr48sqxvar4gpsnf749xfdn1bkr8xcql"))))
1088 (build-system cmake-build-system)
1089 (arguments
1090 `(#:tests? #f)) ; no tests
1091 (synopsis "Small XML parser for C++")
1092 (description "TinyXML2 is a small and simple XML parsing library for the
1093C++ programming language.")
1094 (home-page "http://www.grinninglizard.com/tinyxml2/")
1095 (license license:zlib)))
1096
fe9451c5
RG
1097(define-public xmlstarlet
1098 (package
1099 (name "xmlstarlet")
1100 (version "1.6.1")
1101 (source
1102 (origin
1103 (method url-fetch)
1104 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1105 version "/xmlstarlet-" version ".tar.gz"))
1106 (sha256
1107 (base32
1108 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1109 (build-system gnu-build-system)
22ea0235
MB
1110 (arguments
1111 '(#:phases
1112 (modify-phases %standard-phases
1113 (add-before 'check 'drop-failing-tests
1114 (lambda _
1115 ;; FIXME: Why are these tests failing.
1116 (substitute* "Makefile"
1117 (("^examples/schema1\\\\") "\\")
1118 (("^examples/valid1\\\\") "\\"))
1119 #t)))))
fe9451c5
RG
1120 (inputs
1121 `(("libxslt" ,libxslt)
1122 ("libxml2" ,libxml2)))
1123 (home-page "http://xmlstar.sourceforge.net/")
1124 (synopsis "Command line XML toolkit")
1125 (description "XMLStarlet is a set of command line utilities which can be
1126used to transform, query, validate, and edit XML documents. XPath is used to
1127match and extract data, and elements can be added, deleted or modified using
1128XSLT and EXSLT.")
1129 (license license:x11)))
19c33040 1130
767d24e8
SR
1131(define-public html-xml-utils
1132 (package
1133 (name "html-xml-utils")
a5c71d15 1134 (version "7.5")
767d24e8
SR
1135 (source
1136 (origin
1137 (method url-fetch)
1138 (uri (string-append
1139 "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-"
1140 version ".tar.gz"))
1141 (sha256
1142 (base32
a5c71d15 1143 "0cbmqa9c4bc4ikk7vmgd65ixh2pl9mr336c4his3m8l7rgsjnh8n"))))
767d24e8
SR
1144 (build-system gnu-build-system)
1145 (home-page "https://www.w3.org/Tools/HTML-XML-utils/")
1146 (synopsis "Command line utilities to manipulate HTML and XML files")
1147 (description "HTML-XML-utils provides a number of simple utilities for
1148manipulating and converting HTML and XML files in various ways. The suite
1149consists of the following tools:
1150
1151@itemize
1152 @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} entities
1153 @item @command{xml2asc} convert from @code{&#nnn;} entities to @code{UTF-8}
1154 @item @command{hxaddid} add IDs to selected elements
1155 @item @command{hxcite} replace bibliographic references by hyperlinks
1156 @item @command{hxcite} mkbib - expand references and create bibliography
1157 @item @command{hxclean} apply heuristics to correct an HTML file
1158 @item @command{hxcopy} copy an HTML file while preserving relative links
1159 @item @command{hxcount} count elements and attributes in HTML or XML files
1160 @item @command{hxextract} extract selected elements
1161 @item @command{hxincl} expand included HTML or XML files
1162 @item @command{hxindex} create an alphabetically sorted index
1163 @item @command{hxmkbib} create bibliography from a template
1164 @item @command{hxmultitoc} create a table of contents for a set of HTML files
1165 @item @command{hxname2id} move some @code{ID=} or @code{NAME=} from A
1166elements to their parents
1167 @item @command{hxnormalize} pretty-print an HTML file
1168 @item @command{hxnsxml} convert output of hxxmlns back to normal XML
1169 @item @command{hxnum} number section headings in an HTML file
1170 @item @command{hxpipe} convert XML to a format easier to parse with Perl or AWK
1171 @item @command{hxprintlinks} number links and add table of URLs at end of an HTML file
1172 @item @command{hxprune} remove marked elements from an HTML file
1173 @item @command{hxref} generate cross-references
1174 @item @command{hxselect} extract elements that match a (CSS) selector
1175 @item @command{hxtoc} insert a table of contents in an HTML file
1176 @item @command{hxuncdata} replace CDATA sections by character entities
1177 @item @command{hxunent} replace HTML predefined character entities to @code{UTF-8}
1178 @item @command{hxunpipe} convert output of pipe back to XML format
1179 @item @command{hxunxmlns} replace \"global names\" by XML Namespace prefixes
1180 @item @command{hxwls} list links in an HTML file
1181 @item @command{hxxmlns} replace XML Namespace prefixes by \"global names\"
1182@end itemize
1183")
1184 (license license:expat)))
1185
19c33040
JN
1186(define-public xlsx2csv
1187 (package
1188 (name "xlsx2csv")
1189 (version "0.7.2")
1190 (source (origin
1191 (method url-fetch)
1192 (uri (string-append
1193 "https://github.com/dilshod/"
1194 name "/archive/release/" version ".tar.gz"))
1195 (file-name (string-append name "-" version ".tar.gz"))
1196 (sha256
1197 (base32
1198 "1gpn6kaa7l1ai8c9zx2j3acf04bvxq79pni8jjfjrk01smjbyyql"))))
1199 (build-system python-build-system)
1200 (arguments
1201 `(#:python ,python-2 ; Use python-2 for the test script.
1202 #:phases
1203 (modify-phases %standard-phases
1204 (replace 'check
1205 (lambda _
1206 (substitute* "test/run"
1207 ;; Run tests with `python' only
1208 (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
1209 (zero? (system* "test/run")))))))
1210 (home-page "https://github.com/dilshod/xlsx2csv")
1211 (synopsis "XLSX to CSV converter")
1212 (description
1213 "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
1214XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
1215files. It is designed to be fast and to handle large input files.")
1216 (license license:gpl2+)))
d2b51c08 1217
1218(define-public python-defusedxml
1219 (package
1220 (name "python-defusedxml")
1221 (version "0.4.1")
1222 (source
1223 (origin
1224 (method url-fetch)
1225 (uri (pypi-uri "defusedxml" version))
1226 (sha256
1227 (base32
1228 "0y147zy3jqmk6ly7fbhqmzn1hf41xcb53f2vcc3m8x4ba5d1smfd"))))
1229 (build-system python-build-system)
1230 (home-page "https://bitbucket.org/tiran/defusedxml")
1231 (synopsis "XML bomb protection for Python stdlib modules")
1232 (description
1233 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1234 (license license:psfl)))
1235
1236(define-public python2-defusedxml
1237 (package-with-python2 python-defusedxml))
ca8f3f9a
AP
1238
1239(define-public libxls
1240 (package
1241 (name "libxls")
1242 (version "1.4.0")
1243 (source (origin
1244 (method url-fetch)
1245 (uri (string-append "https://sourceforge.net/projects/"
1246 name "/files/" name "-"
1247 version ".zip"))
1248 (sha256
1249 (base32
1250 "1g8ds7wbhsa4hdcn77xc2c0l3vvz5bx2hx9ng9c9n7aii92ymfnk"))))
1251 (build-system gnu-build-system)
1252 (arguments
1253 `(#:phases
1254 (modify-phases %standard-phases
1255 ;; Bootstrapping is required in order to fix the test driver script.
1256 (add-after 'unpack 'bootstrap
1257 (lambda _
1258 (zero? (system* "bash" "bootstrap")))))))
1259 (native-inputs
1260 `(("unzip" ,unzip)
1261 ("autoconf" ,autoconf)
1262 ("automake" ,automake)
1263 ("libtool" ,libtool)))
1264 (home-page "http://libxls.sourceforge.net/")
1265 (synopsis "Read Excel files")
1266 (description
1267 "libxls is a C library which can read Excel (xls) files since Excel 97 (the BIFF8 format).
1268libxls cannot write Excel files.")
1269 (license license:bsd-2)))
623fb4d1
AP
1270
1271(define-public freexl
1272 (package
1273 (name "freexl")
dc4ffa67 1274 (version "1.0.4")
623fb4d1
AP
1275 (source (origin
1276 (method url-fetch)
1277 (uri (string-append "http://www.gaia-gis.it/gaia-sins/"
1278 name "-" version ".tar.gz"))
1279 (sha256
1280 (base32
dc4ffa67 1281 "09bwzqjc41cc8qw8qkw9wq58rg9nax8r3fg19iny5vmw1c0z23sh"))))
623fb4d1
AP
1282 (build-system gnu-build-system)
1283 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1284 (synopsis "Read Excel files")
1285 (description
1286 "FreeXL is a C library to extract valid data from within an Excel (.xls)
1287spreadsheet.")
1288 ;; Any of these licenses may be picked.
1289 (license (list license:gpl2+
1290 license:lgpl2.1+
1291 license:mpl1.1))))
d00d6cea
RW
1292
1293(define-public xerces-c
1294 (package
1295 (name "xerces-c")
1296 (version "3.1.4")
1297 (source (origin
1298 (method url-fetch)
1299 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1300 "xerces-c-" version ".tar.xz"))
1301 (sha256
1302 (base32
1303 "0hb29c0smqlpxj0zdm09s983z5jx37szlliccnvgh0qq91wwqwwr"))))
1304 (build-system gnu-build-system)
1305 (arguments
1306 (let ((system (or (%current-target-system)
1307 (%current-system))))
1308 (if (string-prefix? "x86_64" system)
1309 '()
1310 '(#:configure-flags '("--disable-sse2")))))
1311 (native-inputs
1312 `(("perl" ,perl)))
1313 (home-page "http://xerces.apache.org/xerces-c/")
1314 (synopsis "Validating XML parser library for C++")
1315 (description "Xerces-C++ is a validating XML parser written in a portable
1316subset of C++. Xerces-C++ makes it easy to give your application the ability
1317to read and write XML data. A shared library is provided for parsing,
1318generating, manipulating, and validating XML documents using the DOM, SAX, and
1319SAX2 APIs.")
1320 (license license:asl2.0)))
77d7b57c
RW
1321
1322(define-public java-simple-xml
1323 (package
1324 (name "java-simple-xml")
1325 (version "2.7.1")
1326 (source (origin
1327 (method url-fetch)
1328 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
1329 version ".zip"))
1330 (sha256
1331 (base32
1332 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))))
1333 (build-system ant-build-system)
1334 (arguments
1335 `(#:build-target "build"
1336 #:test-target "test"
1337 #:phases
1338 (modify-phases %standard-phases
1339 (replace 'install (install-jars "jar")))))
1340 (native-inputs
1341 `(("unzip" ,unzip)))
1342 (home-page "http://simple.sourceforge.net/")
1343 (synopsis "XML serialization framework for Java")
1344 (description "Simple is a high performance XML serialization and
1345configuration framework for Java. Its goal is to provide an XML framework
1346that enables rapid development of XML configuration and communication systems.
1347This framework aids the development of XML systems with minimal effort and
1348reduced errors. It offers full object serialization and deserialization,
1349maintaining each reference encountered.")
1350 (license license:asl2.0)))
3b695802
P
1351
1352(define-public perl-xml-xpathengine
1353 (package
1354 (name "perl-xml-xpathengine")
1355 (version "0.14")
1356 (source (origin
1357 (method url-fetch)
1358 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1359 "XML-XPathEngine-" version ".tar.gz"))
1360 (sha256
1361 (base32
1362 "0r72na14bmsxfd16s9nlza155amqww0k8wsa9x2a3sqbpp5ppznj"))))
1363 (build-system perl-build-system)
1364 (home-page "http://search.cpan.org/dist/XML-XPathEngine/")
1365 (synopsis "Re-usable XPath engine for DOM-like trees")
1366 (description
1367 "This module provides an XPath engine, that can be re-used by other
1368modules/classes that implement trees.
1369
1370In order to use the XPath engine, nodes in the user module need to mimick DOM
1371nodes. The degree of similitude between the user tree and a DOM dictates how
1372much of the XPath features can be used. A module implementing all of the DOM
1373should be able to use this module very easily (you might need to add the
1374@code{cmp} method on nodes in order to get ordered result sets).")
1375 (license license:perl-license)))
9e1c3581
P
1376
1377(define-public perl-tree-xpathengine
1378 (package
1379 (name "perl-tree-xpathengine")
1380 (version "0.05")
1381 (source (origin
1382 (method url-fetch)
1383 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1384 "Tree-XPathEngine-" version ".tar.gz"))
1385 (sha256
1386 (base32
1387 "1vbbw8wxm79r3xbra8narw1dqvm34510q67wbmg2zmj6zd1k06r9"))))
1388 (build-system perl-build-system)
1389 (home-page "http://search.cpan.org/dist/Tree-XPathEngine/")
1390 (synopsis "Re-usable XPath engine")
1391 (description
1392 "This module provides an XPath engine, that can be re-used by other
1393module/classes that implement trees. It is designed to be compatible with
1394@code{Class::XPath}, ie it passes its tests if you replace @code{Class::XPath}
1395by @code{Tree::XPathEngine}.")
1396 (license license:perl-license)))
b7c59195
P
1397
1398(define-public perl-xml-filter-buffertext
1399 (package
1400 (name "perl-xml-filter-buffertext")
1401 (version "1.01")
1402 (source
1403 (origin
1404 (method url-fetch)
1405 (uri (string-append "mirror://cpan/authors/id/R/RB/RBERJON/"
1406 "XML-Filter-BufferText-" version ".tar.gz"))
1407 (sha256
1408 (base32
1409 "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg"))))
1410 (build-system perl-build-system)
1411 (propagated-inputs
1412 `(("perl-xml-sax-base" ,perl-xml-sax-base)))
1413 (home-page "http://search.cpan.org/dist/XML-Filter-BufferText/")
1414 (synopsis "Filter to put all characters() in one event")
1415 (description "This is a very simple filter. One common cause of
1416grief (and programmer error) is that XML parsers aren't required to provide
1417character events in one chunk. They can, but are not forced to, and most
1418don't. This filter does the trivial but oft-repeated task of putting all
1419characters into a single event.")
1420 (license license:perl-license)))
33b592ee
P
1421
1422(define-public perl-xml-sax-writer
1423 (package
1424 (name "perl-xml-sax-writer")
1425 (version "0.57")
1426 (source (origin
1427 (method url-fetch)
1428 (uri (string-append
1429 "mirror://cpan/authors/id/P/PE/PERIGRIN/"
1430 "XML-SAX-Writer-" version ".tar.gz"))
1431 (sha256
1432 (base32
1433 "1w1cd1ybxdvhmnxdlkywi3x5ka3g4md42kyynksjc09vyizd0q9x"))))
1434 (build-system perl-build-system)
1435 (propagated-inputs
1436 `(("perl-libxml" ,perl-libxml)
1437 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1438 ("perl-xml-namespacesupport", perl-xml-namespacesupport)
1439 ("perl-xml-sax-base" ,perl-xml-sax-base)))
1440 (home-page "http://search.cpan.org/dist/XML-SAX-Writer/")
1441 (synopsis "SAX2 XML Writer")
1442 (description
1443 "This is an XML writer that understands SAX2. It is based on
1444@code{XML::Handler::YAWriter}.")
1445 (license license:perl-license)))
9e88b210
P
1446
1447(define-public perl-xml-handler-yawriter
1448 (package
1449 (name "perl-xml-handler-yawriter")
1450 (version "0.23")
1451 (source
1452 (origin
1453 (method url-fetch)
1454 (uri (string-append "mirror://cpan/authors/id/K/KR/KRAEHE/"
1455 "XML-Handler-YAWriter-" version ".tar.gz"))
1456 (sha256
1457 (base32
1458 "11d45a1sz862va9rry3p2m77pwvq3kpsvgwhc5ramh9mbszbnk77"))))
1459 (build-system perl-build-system)
1460 (propagated-inputs
1461 `(("perl-libxml" ,perl-libxml)))
1462 (home-page "http://search.cpan.org/dist/XML-Handler-YAWriter/")
1463 (synopsis "Yet another Perl SAX XML Writer")
1464 (description "YAWriter implements Yet Another @code{XML::Handler::Writer}.
1465It provides a flexible escaping technique and pretty printing.")
1466 (license license:perl-license)))
85f225fb
P
1467
1468(define-public perl-xml-twig
1469 (package
1470 (name "perl-xml-twig")
1471 (version "3.52")
1472 (source (origin
1473 (method url-fetch)
1474 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1475 "XML-Twig-" version ".tar.gz"))
1476 (sha256
1477 (base32
1478 "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy"))))
1479 (build-system perl-build-system)
1480 (inputs
1481 `(("expat" ,expat)))
1482 (propagated-inputs
1483 `(("perl-html-tidy" ,perl-html-tidy)
1484 ("perl-html-tree" ,perl-html-tree)
1485 ("perl-io-captureoutput" ,perl-io-captureoutput)
1486 ("perl-io-string" ,perl-io-string)
1487 ("perl-io-stringy" ,perl-io-stringy)
1488 ("perl-libxml" ,perl-libxml)
1489 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1490 ("perl-xml-handler-yawriter" ,perl-xml-handler-yawriter)
1491 ("perl-xml-parser" ,perl-xml-parser)
1492 ("perl-xml-sax-writer" ,perl-xml-sax-writer)
1493 ("perl-xml-simple" ,perl-xml-simple)
1494 ("perl-xml-xpathengine" ,perl-xml-xpathengine)
1495 ("perl-test-pod", perl-test-pod)
1496 ("perl-tree-xpathengine" ,perl-tree-xpathengine)))
1497 (home-page "http://search.cpan.org/dist/XML-Twig/")
1498 (synopsis "Perl module for processing huge XML documents in tree mode")
1499 (description "@code{XML::Twig} is an XML transformation module. Its
1500strong points: can be used to process huge documents while still being in tree
1501mode; not bound by DOM or SAX, so it is very perlish and offers a very
1502comprehensive set of methods; simple to use; DWIMs as much as possible.
1503
1504What it doesn't offer: full SAX support (it can export SAX, but only reads
1505XML), full XPath support (unless you use @code{XML::Twig::XPath}), nor DOM
1506support.")
1507 (license license:perl-license)))