1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
8 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com>
10 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
11 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
12 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
13 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
14 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
15 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
16 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
17 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
18 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
20 ;;; This file is part of GNU Guix.
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35 (define-module (gnu packages xml)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages gnupg)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages python)
42 #:use-module (gnu packages tls)
43 #:use-module (gnu packages web)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix packages)
46 #:use-module (guix download)
47 #:use-module (guix build-system ant)
48 #:use-module (guix build-system cmake)
49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system perl)
51 #:use-module (guix build-system python)
52 #:use-module (gnu packages linux)
53 #:use-module (gnu packages pkg-config))
59 (replacement expat-2.2.2)
62 (uri (string-append "mirror://sourceforge/expat/expat/"
63 version "/expat-" version ".tar.bz2"))
66 "11c8jy1wvllvlk7xdc5cm8hdhg0hvs8j0aqy6s702an8wkdcls0q"))))
67 (build-system gnu-build-system)
68 (home-page "http://www.libexpat.org/")
69 (synopsis "Stream-oriented XML parser library written in C")
71 "Expat is an XML parser library written in C. It is a
72 stream-oriented parser in which an application registers handlers for
73 things the parser might find in the XML document (like start tags).")
74 (license license:expat)))
76 (define expat-2.2.2 ; Fixes CVE-2017-9233, CVE-2016-9063 and other issues.
82 (uri (string-append "mirror://sourceforge/expat/expat/"
83 version "/expat-" version ".tar.bz2"))
86 "0ik0r39ala9c6hj4kxrk933klgwkzlkbrfhvhaykx8l1rwgr2xj3"))))))
88 (define-public libebml
95 (uri (string-append "https://dl.matroska.org/downloads/"
96 name "/" name "-" version ".tar.bz2"))
99 "11zka6z9ncywyjr1gfm5cnii33ln7y3w6s86kiacchip2g7kw3f5"))))
100 (build-system gnu-build-system)
101 (home-page "https://www.matroska.org")
102 (synopsis "C++ libary to parse EBML files")
103 (description "libebml is a C++ library to read and write EBML (Extensible
104 Binary Meta Language) files. EBML was designed to be a simplified binary
105 extension of XML for the purpose of storing and manipulating data in a
106 hierarchical form with variable field lengths.")
107 (license license:lgpl2.1)))
109 (define-public libxml2
115 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
117 (patches (search-patches "libxml2-CVE-2016-4658.patch"
118 "libxml2-CVE-2016-5131.patch"))
121 "0g336cr0bw6dax1q48bblphmchgihx9p1pjmxdnrd6sh3qci3fgz"))))
122 (build-system gnu-build-system)
123 (home-page "http://www.xmlsoft.org/")
124 (synopsis "C parser for XML")
125 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
126 (native-inputs `(("perl" ,perl)))
127 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
128 ;; sub-directory of any given package.
129 (native-search-paths (list (search-path-specification
130 (variable "XML_CATALOG_FILES")
133 (file-pattern "^catalog\\.xml$")
134 (file-type 'regular))))
135 (search-paths native-search-paths)
137 "Libxml2 is the XML C parser and toolkit developed for the Gnome
138 project (but it is usable outside of the Gnome platform).")
139 (license license:x11)))
141 (define-public python-libxml2
142 (package (inherit libxml2)
143 (name "python-libxml2")
144 (build-system python-build-system)
146 `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
149 (modify-phases %standard-phases
152 (lambda* (#:key inputs #:allow-other-keys)
154 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
155 "cross-libc" "libc")))
156 (libxml2 (assoc-ref inputs "libxml2")))
157 (substitute* "setup.py"
158 ;; For 'libxml2/libxml/tree.h'.
160 (format #f "ROOT = r'~a'" libxml2))
163 (string-append glibc "/include")))))))))
164 (inputs `(("libxml2" ,libxml2)))
165 (synopsis "Python bindings for the libxml2 library")))
167 (define-public python2-libxml2
168 (package-with-python2 python-libxml2))
170 (define-public libxslt
176 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
178 (patches (search-patches "libxslt-CVE-2016-4738.patch"))
181 "1klh81xbm9ppzgqk339097i39b7fnpmlj8lzn8bpczl3aww6x5xm"))
182 (patches (search-patches "libxslt-generated-ids.patch"))))
183 (build-system gnu-build-system)
184 (home-page "http://xmlsoft.org/XSLT/index.html")
185 (synopsis "C library for applying XSLT stylesheets to XML documents")
186 (inputs `(("libgcrypt" ,libgcrypt)
188 ("python" ,python-minimal-wrapper)
191 "Libxslt is an XSLT C library developed for the GNOME project. It is
192 based on libxml for XML parsing, tree manipulation and XPath support.")
193 (license license:x11)))
195 (define-public perl-graph-readwrite
197 (name "perl-graph-readwrite")
203 "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-"
208 "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh"))))
209 (build-system perl-build-system)
211 `(("perl-graph" ,perl-graph)
212 ("perl-parse-yapp" ,perl-parse-yapp)
213 ("perl-xml-parser" ,perl-xml-parser)
214 ("perl-xml-writer" ,perl-xml-writer)))
215 (home-page "http://search.cpan.org/dist/Graph-ReadWrite")
216 (synopsis "Modules for reading and writing directed graphs")
217 (description "This is a collection of perl classes for reading and writing
218 directed graphs in a variety of file formats. The graphs are represented in
219 Perl using Jarkko Hietaniemi's @code{Graph} classes.
221 There are two base classes. @code{Graph::Reader} is the base class for classes
222 which read a graph file and create an instance of the Graph class.
223 @code{Graph::Writer} is the base class for classes which take an instance of
224 the @code{Graph} class and write it out in a specific file format.")
225 (license license:perl-license)))
227 (define-public perl-xml-atom
229 (name "perl-xml-atom")
233 (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
234 "XML-Atom-" version ".tar.gz"))
237 "17lnkb9ymrhk2z642bhj5i2bv3q1da3kpp2lvsl0yhqshk3wdjj8"))))
238 (build-system perl-build-system)
240 `(("perl-datetime" ,perl-datetime)
241 ;; TODO package: perl-datetime-format-atom
242 ("perl-module-install" ,perl-module-install)
243 ("perl-xml-xpath" ,perl-xml-xpath)))
245 `(("perl-class-data-inheritable" ,perl-class-data-inheritable)
246 ("perl-datetime" ,perl-datetime)
247 ("perl-datetime-timezone" ,perl-datetime-timezone)
248 ("perl-digest-sha1" ,perl-digest-sha1)
249 ("perl-libwww" ,perl-libwww)
250 ("perl-uri" ,perl-uri)
251 ("perl-xml-libxml" ,perl-xml-libxml)
252 ("perl-xml-xpath" ,perl-xml-xpath)))
253 (home-page "http://search.cpan.org/dist/XML-Atom")
254 (synopsis "Atom feed and API implementation")
256 "Atom is a syndication, API, and archiving format for weblogs and other data.
257 @code{XML::Atom} implements the feed format as well as a client for the API.")
258 (license license:perl-license)))
260 (define-public perl-xml-descent
262 (name "perl-xml-descent")
266 (uri (string-append "mirror://cpan/authors/id/A/AN/ANDYA/"
267 "XML-Descent-" version ".tar.gz"))
270 "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7"))))
271 (build-system perl-build-system)
273 `(("perl-module-build" ,perl-module-build)))
275 `(("perl-test-differences" ,perl-test-differences)
276 ("perl-xml-tokeparser" ,perl-xml-tokeparser)))
277 (home-page "http://search.cpan.org/dist/XML-Descent")
278 (synopsis "Recursive descent XML parsing")
280 "The conventional models for parsing XML are either @dfn{DOM}
281 (a data structure representing the entire document tree is created) or
282 @dfn{SAX} (callbacks are issued for each element in the XML).
284 XML grammar is recursive - so it's nice to be able to write recursive
285 parsers for it. @code{XML::Descent} allows such parsers to be created.")
286 (license license:perl-license)))
288 (define-public perl-xml-parser
290 (name "perl-xml-parser")
295 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
299 "05ij0g6bfn27iaggxf8nl5rhlwx6f6p6xmdav6rjcly3x5zd1s8s"))))
300 (build-system perl-build-system)
301 (arguments `(#:make-maker-flags
302 (let ((expat (assoc-ref %build-inputs "expat")))
303 (list (string-append "EXPATLIBPATH=" expat "/lib")
304 (string-append "EXPATINCPATH=" expat "/include")))))
305 (inputs `(("expat" ,expat)))
306 (license license:perl-license)
307 (synopsis "Perl bindings to the Expat XML parsing library")
309 "This module provides ways to parse XML documents. It is built on top of
310 XML::Parser::Expat, which is a lower level interface to James Clark's expat
311 library. Each call to one of the parsing methods creates a new instance of
312 XML::Parser::Expat which is then used to parse the document. Expat options
313 may be provided when the XML::Parser object is created. These options are
314 then passed on to the Expat object on each parse call. They can also be given
315 as extra arguments to the parse methods, in which case they override options
316 given at XML::Parser creation time.")
317 (home-page "http://search.cpan.org/dist/XML-Parser")))
319 (define-public perl-xml-tokeparser
321 (name "perl-xml-tokeparser")
325 (uri (string-append "mirror://cpan/authors/id/P/PO/PODMASTER/"
326 "XML-TokeParser-" version ".tar.gz"))
329 "1hnpwb3lh6cbgwvjjgqzcp6jm4mp612qn6ili38adc9nhkwv8fc5"))))
330 (build-system perl-build-system)
331 (propagated-inputs `(("perl-xml-parser" ,perl-xml-parser)))
332 (home-page "http://search.cpan.org/dist/XML-TokeParser")
333 (synopsis "Simplified interface to XML::Parser")
335 "@code{XML::TokeParser} provides a procedural (\"pull mode\") interface
336 to @code{XML::Parser} in much the same way that Gisle Aas'
337 @code{HTML::TokeParser} provides a procedural interface to @code{HTML::Parser}.
338 @code{XML::TokeParser} splits its XML input up into \"tokens\", each
339 corresponding to an @code{XML::Parser} event.")
340 (license license:perl-license)))
342 (define-public perl-libxml
349 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
353 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
354 (build-system perl-build-system)
356 `(("perl-xml-parser" ,perl-xml-parser)))
357 (license license:perl-license)
358 (synopsis "Perl SAX parser using XML::Parser")
360 "XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser
362 (home-page "http://search.cpan.org/~kmacleod/libxml-perl/lib/XML/Parser/PerlSAX.pm")))
364 (define-public perl-xml-libxml
366 (name "perl-xml-libxml")
371 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
372 "XML-LibXML-" version ".tar.gz"))
375 "0awgd2gjzy7kn38bqblsigikzl81xsi561phkz9f9b9v3x2vmrr6"))))
376 (build-system perl-build-system)
378 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
379 ("perl-xml-sax" ,perl-xml-sax)))
381 `(("libxml2" ,libxml2)))
382 (home-page "http://search.cpan.org/dist/XML-LibXML")
383 (synopsis "Perl interface to libxml2")
384 (description "This module implements a Perl interface to the libxml2
385 library which provides interfaces for parsing and manipulating XML files. This
386 module allows Perl programmers to make use of the highly capable validating
387 XML parser and the high performance DOM implementation.")
388 (license license:perl-license)))
390 (define-public perl-xml-libxml-simple
392 (name "perl-xml-libxml-simple")
396 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
397 "XML-LibXML-Simple-" version ".tar.gz"))
400 "1g8nlk3zdz2cclxf7azvsb3jfxmvy6ml8wmj774k4qjqcsqmzk0w"))))
401 (build-system perl-build-system)
403 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
404 ("perl-xml-libxml" ,perl-xml-libxml)))
405 (home-page "http://search.cpan.org/dist/XML-LibXML-Simple")
406 (synopsis "XML::LibXML based XML::Simple clone")
408 "This package provides the same API as @code{XML::Simple} but is based on
409 @code{XML::LibXML}.")
410 (license license:perl-license)))
412 (define-public perl-xml-libxslt
414 (name "perl-xml-libxslt")
419 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
420 "XML-LibXSLT-" version ".tar.gz"))
423 "0dggycql18kfxzkb1kw3yc7gslxlrrgyyn2r2ygsylycb89j3jpi"))))
424 (build-system perl-build-system)
426 `(("libxslt" ,libxslt)))
428 `(("perl-xml-libxml" ,perl-xml-libxml)))
429 (home-page "http://search.cpan.org/dist/XML-LibXSLT")
430 (synopsis "Perl bindings to GNOME libxslt library")
431 (description "This Perl module is an interface to the GNOME project's
433 (license license:perl-license)))
435 (define-public perl-xml-namespacesupport
437 (name "perl-xml-namespacesupport")
442 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
443 "XML-NamespaceSupport-" version ".tar.gz"))
446 "1vz5pbi4lm5fhq2slrs2hlp6bnk29863abgjlcx43l4dky2rbsa7"))))
447 (build-system perl-build-system)
448 (home-page "http://search.cpan.org/dist/XML-NamespaceSupport")
449 (synopsis "XML namespace support class")
450 (description "This module offers a simple to process namespaced XML
451 names (unames) from within any application that may need them. It also helps
452 maintain a prefix to namespace URI map, and provides a number of basic
454 (license license:perl-license)))
456 (define-public perl-xml-rss
458 (name "perl-xml-rss")
462 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
463 "XML-RSS-" version ".tar.gz"))
466 "0v6vfizn2psy6av057kp7fv3z3y73s6b3w56jm3zr6hlq48llsx2"))))
467 (build-system perl-build-system)
469 `(("perl-module-build" ,perl-module-build)
470 ("perl-test-manifest" ,perl-test-manifest)
471 ("perl-test-differences" ,perl-test-differences)
472 ("perl-test-pod" ,perl-test-pod)
473 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
474 ;; XXX: The test which uses this modules does not run, even when it is included
475 ;; it is ignored. ("perl-test-trailingspace" ,perl-test-trailingspace)
477 `(("perl-datetime" ,perl-datetime)
478 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
479 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
480 ("perl-html-parser" ,perl-html-parser)
481 ("perl-xml-parser" ,perl-xml-parser)))
482 (home-page "http://search.cpan.org/dist/XML-RSS")
483 (synopsis "Creates and updates RSS files")
485 "This module provides a basic framework for creating and maintaining
486 RDF Site Summary (RSS) files. This distribution also contains many examples
487 that allow you to generate HTML from an RSS, convert between 0.9, 0.91, and
488 1.0 version, and more.")
489 (license license:perl-license)))
491 (define-public perl-xml-sax
493 (name "perl-xml-sax")
498 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
499 "XML-SAX-" version ".tar.gz"))
502 "115dypb50w1l94y3iwihv5nkixbsv1cxiqkd93y4rk5n6s74pc1j"))))
503 (build-system perl-build-system)
505 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
506 ("perl-xml-sax-base" ,perl-xml-sax-base)))
508 `(#:phases (modify-phases %standard-phases
510 'install 'augment-path
511 ;; The install target tries to load the newly-installed
512 ;; XML::SAX module, but can't find it, so we need to tell
513 ;; perl where to look.
514 (lambda* (#:key outputs #:allow-other-keys)
516 (string-append (getenv "PERL5LIB") ":"
517 (assoc-ref outputs "out")
518 "/lib/perl5/site_perl")))))))
519 (home-page "http://search.cpan.org/dist/XML-SAX")
520 (synopsis "Perl API for XML")
521 (description "XML::SAX consists of several framework classes for using and
522 building Perl SAX2 XML parsers, filters, and drivers.")
523 (license license:perl-license)))
525 (define-public perl-xml-sax-base
527 (name "perl-xml-sax-base")
532 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
533 "XML-SAX-Base-" version ".tar.gz"))
536 "17i161rq1ngjlk0c8vdkrkkc56y1pf51k1g54y28py0micqp0qk6"))))
537 (build-system perl-build-system)
538 (home-page "http://search.cpan.org/dist/XML-SAX-Base")
539 (synopsis "Base class for SAX Drivers and Filters")
540 (description "This module has a very simple task - to be a base class for
541 PerlSAX drivers and filters. It's default behaviour is to pass the input
542 directly to the output unchanged. It can be useful to use this module as a
543 base class so you don't have to, for example, implement the characters()
545 (license license:perl-license)))
547 (define-public perl-xml-simple
549 (name "perl-xml-simple")
554 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
558 "0jgbk30jizafpl7078jhw1di1yh08gf8d85dsvjllr595vr0widr"))))
559 (build-system perl-build-system)
561 `(("perl-xml-parser" ,perl-xml-parser)
562 ("perl-xml-sax" ,perl-xml-sax)))
563 (license license:perl-license)
564 (synopsis "Perl module for easy reading/writing of XML files")
566 "The XML::Simple module provides a simple API layer on top of an
567 underlying XML parsing module (either XML::Parser or one of the SAX2
569 (home-page "http://search.cpan.org/dist/XML-Simple")))
571 (define-public perl-xml-regexp
573 (name "perl-xml-regexp")
578 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
582 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
583 (build-system perl-build-system)
585 `(("perl-xml-parser" ,perl-xml-parser)))
586 (license license:perl-license)
587 (synopsis "Perl regular expressions for XML tokens")
589 "XML::RegExp contains regular expressions for the following XML tokens:
590 BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
591 EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
592 (home-page "http://search.cpan.org/~tjmather/XML-RegExp/lib/XML/RegExp.pm")))
594 (define-public perl-xml-dom
596 (name "perl-xml-dom")
601 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
605 "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb"))))
606 (build-system perl-build-system)
608 `(("perl-libwww" ,perl-libwww)
609 ("perl-libxml" ,perl-libxml)
610 ("perl-xml-parser" ,perl-xml-parser)
611 ("perl-xml-regexp" ,perl-xml-regexp)))
612 (license license:perl-license)
614 "Perl module for building DOM Level 1 compliant document structures")
616 "This module extends the XML::Parser module by Clark Cooper. The
617 XML::Parser module is built on top of XML::Parser::Expat, which is a lower
618 level interface to James Clark's expat library. XML::DOM::Parser is derived
619 from XML::Parser. It parses XML strings or files and builds a data structure
620 that conforms to the API of the Document Object Model.")
621 (home-page "http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM.pm")))
623 (define-public perl-xml-compile-tester
625 (name "perl-xml-compile-tester")
629 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
630 "XML-Compile-Tester-" version ".tar.gz"))
633 "1bcl8x8cyacqv9yjp97aq9qq85sy8wv78kd8c16yd9yw3by4cpp1"))))
634 (build-system perl-build-system)
636 `(("perl-log-report" ,perl-log-report)
637 ("perl-test-deep" ,perl-test-deep)))
638 (home-page "http://search.cpan.org/dist/XML-Compile-Tester")
639 (synopsis "XML::Compile related regression testing")
641 "The @code{XML::Compile} module suite has extensive regression testing.
642 This module provide functions which simplify writing tests for
643 @code{XML::Compile} related distributions.")
644 (license license:perl-license)))
646 (define-public perl-xml-compile
648 (name "perl-xml-compile")
652 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
653 "XML-Compile-" version ".tar.gz"))
656 "1hp41960bpqxvv1samv9hc0ghhmvs3i16r4rfl9yp54lp6jhsr2c"))))
657 (build-system perl-build-system)
659 `(("perl-log-report" ,perl-log-report)
660 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
661 ("perl-xml-libxml" ,perl-xml-libxml)
662 ("perl-test-deep" ,perl-test-deep)))
663 (home-page "http://search.cpan.org/dist/XML-Compile")
664 (synopsis "Compilation-based XML processing")
666 "@code{XML::Compile} can be used to translate a Perl data-structure into
667 XML or XML into a Perl data-structure, both directions under rigid control by
669 (license license:perl-license)))
671 (define-public perl-xml-compile-cache
673 (name "perl-xml-compile-cache")
677 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
678 "XML-Compile-Cache-" version ".tar.gz"))
681 "0xbwlszhi9hg8sxm5ylglm2qvnb689i595p913awrj2g4mp9yfsw"))))
682 (build-system perl-build-system)
684 `(("perl-log-report" ,perl-log-report)
685 ("perl-xml-compile" ,perl-xml-compile)
686 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
687 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)))
688 (home-page "http://search.cpan.org/dist/XML-Compile-Cache")
689 (synopsis "Cache compiled XML translators")
691 "This package provides methods to cache compiled XML translators.")
692 (license license:perl-license)))
694 (define-public perl-xml-compile-soap
696 (name "perl-xml-compile-soap")
700 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
701 "XML-Compile-SOAP-" version ".tar.gz"))
704 "0rxidh7kjyhnw2y789bqbwccnp8n0m3xskn524y9c752s64qpjcz"))))
705 (build-system perl-build-system)
707 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
708 ("perl-libwww" ,perl-libwww)
709 ("perl-log-report" ,perl-log-report)
710 ("perl-xml-compile" ,perl-xml-compile)
711 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
712 ("perl-xml-compile-tester" ,perl-xml-compile-tester)))
713 (home-page "http://search.cpan.org/dist/XML-Compile-SOAP")
714 (synopsis "Base-class for SOAP implementations")
716 "This module provides a class to handle the SOAP protocol. The first
717 implementation is @url{SOAP1.1,
718 http://www.w3.org/TR/2000/NOTE-SOAP-20000508/}, which is still most often
720 (license license:perl-license)))
722 (define-public perl-xml-compile-wsdl11
724 (name "perl-xml-compile-wsdl11")
728 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
729 "XML-Compile-WSDL11-" version ".tar.gz"))
732 "0vbq05cpynm3jj81fw1k4nsb3wv4zngi6blvi1jhdarmh2rfg1x2"))))
733 (build-system perl-build-system)
735 `(("perl-log-report" ,perl-log-report)
736 ("perl-xml-compile" ,perl-xml-compile)
737 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
738 ("perl-xml-compile-soap" ,perl-xml-compile-soap)))
739 (home-page "http://search.cpan.org/dist/XML-Compile-WSDL11")
740 (synopsis "Create SOAP messages defined by WSDL 1.1")
742 "This module understands WSDL version 1.1. A WSDL file defines a set of
743 messages to be send and received over SOAP connections. This involves
744 encoding of the message to be send into XML, sending the message to the
745 server, collect the answer, and finally decoding the XML to Perl.")
746 (license license:perl-license)))
748 (define-public perl-xml-feed
750 (name "perl-xml-feed")
754 (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
755 "XML-Feed-" version ".tar.gz"))
758 "07b165g6wk8kqwpl49r3n0kag6p2nrkyp3ch0h8qyxb6nrnkkq7c"))))
759 (build-system perl-build-system)
761 `(#:tests? #f)) ; Tests require internet connection
763 `(("perl-module-build" ,perl-module-build)
764 ("perl-uri" ,perl-uri)
765 ("perl-class-data-inheritable" ,perl-class-data-inheritable)))
767 `(("perl-class-errorhandler" ,perl-class-errorhandler)
768 ("perl-datetime" ,perl-datetime)
769 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
770 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
771 ("perl-feed-find" ,perl-feed-find)
772 ("perl-html-parser" ,perl-html-parser)
773 ("perl-libwww-perl" ,perl-libwww)
774 ("perl-module-pluggable" ,perl-module-pluggable)
775 ("perl-uri-fetch" ,perl-uri-fetch)
776 ("perl-xml-atom" ,perl-xml-atom)
777 ("perl-xml-libxml" ,perl-xml-libxml)
778 ("perl-xml-rss" ,perl-xml-rss)))
779 (home-page "http://search.cpan.org/dist/XML-Feed")
780 (synopsis "XML Syndication Feed Support")
781 (description "@code{XML::Feed} is a syndication feed parser for both RSS and
782 Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI.
783 @code{XML::Feed} supports the following syndication feed formats:
784 RSS 0.91, RSS 1.0, RSS 2.0, Atom")
785 (license license:perl-license)))
787 (define-public perl-xml-xpath
789 (name "perl-xml-xpath")
793 (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
794 "XML-XPath-" version ".tar.gz"))
797 "07pa0bl42jka8mj7jshjynx8vpfh8b4cdyiv4zlkqvkqz98nzxib"))))
798 (build-system perl-build-system)
800 `(("perl-path-tiny" ,perl-path-tiny)))
802 `(("perl-xml-parser" ,perl-xml-parser)))
803 (home-page "http://search.cpan.org/dist/XML-XPath")
804 (synopsis "Parse and evaluate XPath statements")
806 "This module aims to comply exactly to the @url{XPath specification,
807 https://www.w3.org/TR/xpath} and yet allow extensions to be added in
808 the form of functions.")
809 (license license:perl-license)))
811 (define-public pugixml
818 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
819 version "/pugixml-" version ".tar.gz"))
822 "0fcgggry5x5bn0zhb09ij9hb0p45nb0sv0d9fw3cm1cf62hp9n80"))))
823 (build-system cmake-build-system)
825 `(#:configure-flags '("-DCMAKE_CXX_FLAGS=-shared -fPIC"
826 "-DCMAKE_C_FLAGS=-shared -fPIC")
827 #:tests? #f)) ; no tests
828 (home-page "http://pugixml.org")
829 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
831 "pugixml is a C++ XML processing library, which consists of a DOM-like
832 interface with rich traversal/modification capabilities, a fast XML parser
833 which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
834 implementation for complex data-driven tree queries. Full Unicode support is
835 also available, with Unicode interface variants and conversions between
836 different Unicode encodings which happen automatically during
838 (license license:expat)))
840 (define-public python-pyxb
846 (uri (pypi-uri "PyXB" version))
849 "0rzzwibfqa28gxgcxx4cybx1qcg0g6fand06ykj3gz7z5kp653sf"))))
850 (build-system python-build-system)
851 (home-page "http://pyxb.sourceforge.net/")
852 (synopsis "Python XML Schema Bindings")
854 "PyXB (\"pixbee\") is a pure Python package that generates Python source
855 code for classes that correspond to data structures defined by XMLSchema.")
856 (license (list license:asl2.0 ; Most files.
857 license:expat ; pyxb/utils/six.py
858 license:gpl2 ; bundled jquery in doc is dual MIT/GPL2
859 license:psfl)))) ; pyxb/utils/activestate.py
861 (define-public python2-pyxb
862 (package-with-python2 python-pyxb))
871 ;; The old source on fedorahosted.org is offline permanently:
872 ;; <https://bugs.gnu.org/25989>
873 (uri (string-append "mirror://debian/pool/main/x/xmlto/"
874 "xmlto_" version ".orig.tar.bz2"))
875 (file-name (string-append name "-" version ".tar.bz2"))
878 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
879 (build-system gnu-build-system)
881 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
882 '(#:configure-flags (list (string-append "GETOPT="
883 (assoc-ref %build-inputs
887 `(("util-linux" ,util-linux) ; for 'getopt'
888 ("libxml2" ,libxml2) ; for 'xmllint'
889 ("libxslt" ,libxslt))) ; for 'xsltproc'
890 (home-page "http://cyberelk.net/tim/software/xmlto/")
891 (synopsis "Front-end to an XSL toolchain")
893 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
894 stylesheet for the conversion you want and applies it using an external
895 XSL-T processor. It also performs any necessary post-processing.")
896 (license license:gpl2+)))
898 (define-public xmlsec
904 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
905 name "1-" version ".tar.gz"))
908 "01bkbv2y3x8d1sf4dcln1x3y2jyj391s3208d9a2ndhglly5j89j"))))
909 (build-system gnu-build-system)
910 (propagated-inputs ; according to xmlsec1.pc
911 `(("libxml2" ,libxml2)
912 ("libxslt" ,libxslt)))
915 ("libgcrypt" ,libgcrypt)
916 ("libltdl" ,libltdl)))
918 `(("pkg-config" ,pkg-config)))
919 (home-page "http://www.libexpat.org/")
920 (synopsis "XML Security Library")
922 "The XML Security Library is a C library based on Libxml2. It
923 supports XML security standards such as XML Signature, XML Encryption,
924 Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
926 (license (license:x11-style "file://COPYING"
927 "See 'COPYING' in the distribution."))))
929 (define-public minixml
935 (uri (string-append "https://github.com/michaelrsweet/mxml/"
936 "releases/download/release-" version
937 "/mxml-" version ".tar.gz"))
940 "14bqfq4lymhb31snz6wsvzhlavy0573v1nki1lbngiyxcj5zazr6"))))
941 (build-system gnu-build-system)
943 `(#:tests? #f)) ;no "check" target
944 (home-page "https://michaelrsweet.github.io/mxml")
945 (synopsis "Small XML parsing library")
947 "Mini-XML is a small C library to read and write XML files and strings in
948 UTF-8 and UTF-16 encoding.")
949 ;; LGPL 2.0+ with additional exceptions for static linking
950 (license license:lgpl2.0+)))
952 ;; TinyXML is an unmaintained piece of software, so the patches and build
953 ;; system massaging have no upstream potential.
954 (define-public tinyxml
960 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
962 (string-join (string-split version #\.) "_")
966 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
967 (patches (search-patches "tinyxml-use-stl.patch"))))
968 (build-system gnu-build-system)
969 ;; This library is missing *a lot* of the steps to make it usable, so we
970 ;; have to add them here, like every other distro must do.
973 (modify-phases %standard-phases
975 (add-after 'build 'build-shared-library
977 (zero? (system* "g++" "-Wall" "-O2" "-shared" "-fpic"
978 "tinyxml.cpp" "tinyxmlerror.cpp"
979 "tinyxmlparser.cpp" "tinystr.cpp"
980 "-o" "libtinyxml.so"))))
982 (lambda _ (zero? (system "./xmltest"))))
984 (lambda* (#:key outputs #:allow-other-keys)
985 (let* ((out (assoc-ref outputs "out"))
986 (include (string-append out "/include"))
987 (lib (string-append out "/lib"))
988 (pkgconfig (string-append out "/lib/pkgconfig"))
989 (doc (string-append out "/share/doc")))
990 ;; Install libs and headers.
991 (install-file "libtinyxml.so" lib)
992 (install-file "tinystr.h" include)
993 (install-file "tinyxml.h" include)
994 ;; Generate and install pkg-config file.
996 ;; Software such as Kodi expect this file to be present, but
997 ;; it's not provided in the source code.
998 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
1000 (format port "prefix=~a
1001 exec_prefix=${prefix}
1002 libdir=${exec_prefix}/lib
1003 includedir=${prefix}/include
1006 Description: A simple, small, C++ XML parser
1008 Libs: -L${libdir} -ltinyxml
1009 Cflags: -I${includedir}
1014 (copy-recursively "docs" (string-append doc "tinyxml"))
1016 (synopsis "Small XML parser for C++")
1017 (description "TinyXML is a small and simple XML parsing library for the
1018 C++ programming language.")
1019 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
1020 (license license:zlib)))
1022 (define-public tinyxml2
1029 (uri (string-append "https://github.com/leethomason/tinyxml2/archive/"
1033 "083z4r4khcndxi9k840lcr48sqxvar4gpsnf749xfdn1bkr8xcql"))))
1034 (build-system cmake-build-system)
1036 `(#:tests? #f)) ; no tests
1037 (synopsis "Small XML parser for C++")
1038 (description "TinyXML2 is a small and simple XML parsing library for the
1039 C++ programming language.")
1040 (home-page "http://www.grinninglizard.com/tinyxml2/")
1041 (license license:zlib)))
1043 (define-public xmlstarlet
1050 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1051 version "/xmlstarlet-" version ".tar.gz"))
1054 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1055 (build-system gnu-build-system)
1058 (modify-phases %standard-phases
1059 (add-before 'check 'drop-failing-tests
1061 ;; FIXME: Why are these tests failing.
1062 (substitute* "Makefile"
1063 (("^examples/schema1\\\\") "\\")
1064 (("^examples/valid1\\\\") "\\"))
1067 `(("libxslt" ,libxslt)
1068 ("libxml2" ,libxml2)))
1069 (home-page "http://xmlstar.sourceforge.net/")
1070 (synopsis "Command line XML toolkit")
1071 (description "XMLStarlet is a set of command line utilities which can be
1072 used to transform, query, validate, and edit XML documents. XPath is used to
1073 match and extract data, and elements can be added, deleted or modified using
1075 (license license:x11)))
1077 (define-public xlsx2csv
1084 "https://github.com/dilshod/"
1085 name "/archive/release/" version ".tar.gz"))
1086 (file-name (string-append name "-" version ".tar.gz"))
1089 "1gpn6kaa7l1ai8c9zx2j3acf04bvxq79pni8jjfjrk01smjbyyql"))))
1090 (build-system python-build-system)
1092 `(#:python ,python-2 ; Use python-2 for the test script.
1094 (modify-phases %standard-phases
1097 (substitute* "test/run"
1098 ;; Run tests with `python' only
1099 (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
1100 (zero? (system* "test/run")))))))
1101 (home-page "https://github.com/dilshod/xlsx2csv")
1102 (synopsis "XLSX to CSV converter")
1104 "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
1105 XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
1106 files. It is designed to be fast and to handle large input files.")
1107 (license license:gpl2+)))
1109 (define-public python-defusedxml
1111 (name "python-defusedxml")
1116 (uri (pypi-uri "defusedxml" version))
1119 "0y147zy3jqmk6ly7fbhqmzn1hf41xcb53f2vcc3m8x4ba5d1smfd"))))
1120 (build-system python-build-system)
1121 (home-page "https://bitbucket.org/tiran/defusedxml")
1122 (synopsis "XML bomb protection for Python stdlib modules")
1124 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1125 (license license:psfl)))
1127 (define-public python2-defusedxml
1128 (package-with-python2 python-defusedxml))
1130 (define-public libxls
1136 (uri (string-append "https://sourceforge.net/projects/"
1137 name "/files/" name "-"
1141 "1g8ds7wbhsa4hdcn77xc2c0l3vvz5bx2hx9ng9c9n7aii92ymfnk"))))
1142 (build-system gnu-build-system)
1145 (modify-phases %standard-phases
1146 ;; Bootstrapping is required in order to fix the test driver script.
1147 (add-after 'unpack 'bootstrap
1149 (zero? (system* "bash" "bootstrap")))))))
1152 ("autoconf" ,autoconf)
1153 ("automake" ,automake)
1154 ("libtool" ,libtool)))
1155 (home-page "http://libxls.sourceforge.net/")
1156 (synopsis "Read Excel files")
1158 "libxls is a C library which can read Excel (xls) files since Excel 97 (the BIFF8 format).
1159 libxls cannot write Excel files.")
1160 (license license:bsd-2)))
1162 (define-public freexl
1168 (uri (string-append "http://www.gaia-gis.it/gaia-sins/"
1169 name "-" version ".tar.gz"))
1172 "17a0yrjb0gln7819j0vp7y25imhvwpil2b0rm44mwgzml0a4i6mk"))))
1173 (build-system gnu-build-system)
1174 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1175 (synopsis "Read Excel files")
1177 "FreeXL is a C library to extract valid data from within an Excel (.xls)
1179 ;; Any of these licenses may be picked.
1180 (license (list license:gpl2+
1184 (define-public xerces-c
1190 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1191 "xerces-c-" version ".tar.xz"))
1194 "0hb29c0smqlpxj0zdm09s983z5jx37szlliccnvgh0qq91wwqwwr"))))
1195 (build-system gnu-build-system)
1197 (let ((system (or (%current-target-system)
1198 (%current-system))))
1199 (if (string-prefix? "x86_64" system)
1201 '(#:configure-flags '("--disable-sse2")))))
1204 (home-page "http://xerces.apache.org/xerces-c/")
1205 (synopsis "Validating XML parser library for C++")
1206 (description "Xerces-C++ is a validating XML parser written in a portable
1207 subset of C++. Xerces-C++ makes it easy to give your application the ability
1208 to read and write XML data. A shared library is provided for parsing,
1209 generating, manipulating, and validating XML documents using the DOM, SAX, and
1211 (license license:asl2.0)))
1213 (define-public java-simple-xml
1215 (name "java-simple-xml")
1219 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
1223 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))))
1224 (build-system ant-build-system)
1226 `(#:build-target "build"
1227 #:test-target "test"
1229 (modify-phases %standard-phases
1230 (replace 'install (install-jars "jar")))))
1232 `(("unzip" ,unzip)))
1233 (home-page "http://simple.sourceforge.net/")
1234 (synopsis "XML serialization framework for Java")
1235 (description "Simple is a high performance XML serialization and
1236 configuration framework for Java. Its goal is to provide an XML framework
1237 that enables rapid development of XML configuration and communication systems.
1238 This framework aids the development of XML systems with minimal effort and
1239 reduced errors. It offers full object serialization and deserialization,
1240 maintaining each reference encountered.")
1241 (license license:asl2.0)))