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, 2017, 2018 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>
19 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
20 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
21 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
23 ;;; This file is part of GNU Guix.
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.
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.
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/>.
38 (define-module (gnu packages xml)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages gnupg)
43 #:use-module (gnu packages java)
44 #:use-module (gnu packages perl)
45 #:use-module (gnu packages perl-check)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages tls)
48 #:use-module (gnu packages web)
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (guix packages)
51 #:use-module (guix download)
52 #:use-module (guix build-system ant)
53 #:use-module (guix build-system cmake)
54 #:use-module (guix build-system gnu)
55 #:use-module (guix build-system perl)
56 #:use-module (guix build-system python)
57 #:use-module (gnu packages linux)
58 #:use-module (gnu packages pkg-config))
64 (replacement expat-2.2.4)
67 (uri (string-append "mirror://sourceforge/expat/expat/"
68 version "/expat-" version ".tar.bz2"))
71 "11c8jy1wvllvlk7xdc5cm8hdhg0hvs8j0aqy6s702an8wkdcls0q"))))
72 (build-system gnu-build-system)
73 (home-page "http://www.libexpat.org/")
74 (synopsis "Stream-oriented XML parser library written in C")
76 "Expat is an XML parser library written in C. It is a
77 stream-oriented parser in which an application registers handlers for
78 things the parser might find in the XML document (like start tags).")
79 (license license:expat)))
81 (define expat-2.2.4 ; Fix CVE-{2016-9063,2017-9233,2017-11742} & other issues.
87 (uri (string-append "mirror://sourceforge/expat/expat/"
88 version "/expat-" version ".tar.bz2"))
91 "17h1fb9zvqvf0sr78j211bngc6jpql5wzar8fg9b52jzjvdqbb83"))))))
93 (define-public libebml
100 (uri (string-append "https://dl.matroska.org/downloads/"
101 name "/" name "-" version ".tar.xz"))
104 "005a0ipqnfbsq47zrc61zszi439jw32q5xd6dc1jyb3lc0zl266q"))))
105 (build-system gnu-build-system)
106 (home-page "https://matroska-org.github.io/libebml/")
107 (synopsis "C++ library to parse EBML files")
108 (description "libebml is a C++ library to read and write @dfn{EBML}
109 (Extensible Binary Meta Language) files. EBML was designed to be a simplified
110 binary extension of XML for the purpose of storing and manipulating data in a
111 hierarchical form with variable field lengths.")
112 (license license:lgpl2.1)))
114 (define-public libxml2
118 (replacement libxml2/fixed)
121 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
123 (patches (search-patches "libxml2-CVE-2016-4658.patch"
124 "libxml2-CVE-2016-5131.patch"))
127 "0g336cr0bw6dax1q48bblphmchgihx9p1pjmxdnrd6sh3qci3fgz"))))
128 (build-system gnu-build-system)
129 (home-page "http://www.xmlsoft.org/")
130 (synopsis "C parser for XML")
131 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
132 (native-inputs `(("perl" ,perl)))
133 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
134 ;; sub-directory of any given package.
135 (native-search-paths (list (search-path-specification
136 (variable "XML_CATALOG_FILES")
139 (file-pattern "^catalog\\.xml$")
140 (file-type 'regular))))
141 (search-paths native-search-paths)
143 "Libxml2 is the XML C parser and toolkit developed for the Gnome
144 project (but it is usable outside of the Gnome platform).")
145 (license license:x11)))
147 (define libxml2/fixed
152 (inherit (package-source libxml2))
154 (append (origin-patches (package-source libxml2))
155 (search-patches "libxml2-CVE-2017-0663.patch"
156 "libxml2-CVE-2017-7375.patch"
157 "libxml2-CVE-2017-7376.patch"
158 "libxml2-CVE-2017-9047+CVE-2017-9048.patch"
159 "libxml2-CVE-2017-9049+CVE-2017-9050.patch"
160 "libxml2-CVE-2017-15412.patch")))))))
162 (define-public python-libxml2
163 (package/inherit libxml2
164 (name "python-libxml2")
165 (build-system python-build-system)
167 `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
170 (modify-phases %standard-phases
173 (lambda* (#:key inputs #:allow-other-keys)
175 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
176 "cross-libc" "libc")))
177 (libxml2 (assoc-ref inputs "libxml2")))
178 (substitute* "setup.py"
179 ;; For 'libxml2/libxml/tree.h'.
181 (format #f "ROOT = r'~a'" libxml2))
184 (string-append glibc "/include")))))))))
185 (inputs `(("libxml2" ,libxml2)))
186 (synopsis "Python bindings for the libxml2 library")))
188 (define-public python2-libxml2
189 (package-with-python2 python-libxml2))
191 (define-public libxslt
194 (replacement libxslt/fixed)
198 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
200 ;; XXX Oops, the patches field is redefined below, which means the
201 ;; patch for CVE-2016-4738 was not used. Fixed in the definition of
202 ;; libxslt/fixed below.
203 ;(patches (search-patches "libxslt-CVE-2016-4738.patch"))
206 "1klh81xbm9ppzgqk339097i39b7fnpmlj8lzn8bpczl3aww6x5xm"))
207 (patches (search-patches "libxslt-generated-ids.patch"))))
208 (build-system gnu-build-system)
209 (home-page "http://xmlsoft.org/XSLT/index.html")
210 (synopsis "C library for applying XSLT stylesheets to XML documents")
211 (inputs `(("libgcrypt" ,libgcrypt)
213 ("python" ,python-minimal-wrapper)
216 "Libxslt is an XSLT C library developed for the GNOME project. It is
217 based on libxml for XML parsing, tree manipulation and XPath support.")
218 (license license:x11)))
220 (define libxslt/fixed
224 (inherit (package-source libxslt))
225 (patches (search-patches "libxslt-CVE-2016-4738.patch"
226 "libxslt-CVE-2017-5029.patch"
227 "libxslt-generated-ids.patch"))))))
229 (define-public perl-graph-readwrite
231 (name "perl-graph-readwrite")
237 "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-"
242 "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh"))))
243 (build-system perl-build-system)
245 `(("perl-graph" ,perl-graph)
246 ("perl-parse-yapp" ,perl-parse-yapp)
247 ("perl-xml-parser" ,perl-xml-parser)
248 ("perl-xml-writer" ,perl-xml-writer)))
249 (home-page "http://search.cpan.org/dist/Graph-ReadWrite")
250 (synopsis "Modules for reading and writing directed graphs")
251 (description "This is a collection of perl classes for reading and writing
252 directed graphs in a variety of file formats. The graphs are represented in
253 Perl using Jarkko Hietaniemi's @code{Graph} classes.
255 There are two base classes. @code{Graph::Reader} is the base class for classes
256 which read a graph file and create an instance of the Graph class.
257 @code{Graph::Writer} is the base class for classes which take an instance of
258 the @code{Graph} class and write it out in a specific file format.")
259 (license license:perl-license)))
261 (define-public perl-xml-atom
263 (name "perl-xml-atom")
267 (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
268 "XML-Atom-" version ".tar.gz"))
271 "1wa8kfy1w4mg7kzxim4whyprkn48a2il6fap0b947zywknw4c6y6"))))
272 (build-system perl-build-system)
275 (modify-phases %standard-phases
276 (add-before 'check 'set-perl-search-path
279 (string-append (getcwd) ":"
280 (getenv "PERL5LIB")))
283 `(("perl-datetime" ,perl-datetime)
284 ;; TODO package: perl-datetime-format-atom
285 ("perl-html-tagset" ,perl-html-tagset)
286 ("perl-module-build-tiny" ,perl-module-build-tiny)
287 ("perl-module-install" ,perl-module-install)
288 ("perl-xml-xpath" ,perl-xml-xpath)))
290 `(("perl-class-data-inheritable" ,perl-class-data-inheritable)
291 ("perl-datetime" ,perl-datetime)
292 ("perl-datetime-timezone" ,perl-datetime-timezone)
293 ("perl-digest-sha1" ,perl-digest-sha1)
294 ("perl-libwww" ,perl-libwww)
295 ("perl-uri" ,perl-uri)
296 ("perl-xml-libxml" ,perl-xml-libxml)
297 ("perl-xml-xpath" ,perl-xml-xpath)))
298 (home-page "http://search.cpan.org/dist/XML-Atom")
299 (synopsis "Atom feed and API implementation")
301 "Atom is a syndication, API, and archiving format for weblogs and other data.
302 @code{XML::Atom} implements the feed format as well as a client for the API.")
303 (license license:perl-license)))
305 (define-public perl-xml-descent
307 (name "perl-xml-descent")
311 (uri (string-append "mirror://cpan/authors/id/A/AN/ANDYA/"
312 "XML-Descent-" version ".tar.gz"))
315 "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7"))))
316 (build-system perl-build-system)
318 `(("perl-module-build" ,perl-module-build)))
320 `(("perl-test-differences" ,perl-test-differences)
321 ("perl-xml-tokeparser" ,perl-xml-tokeparser)))
322 (home-page "http://search.cpan.org/dist/XML-Descent")
323 (synopsis "Recursive descent XML parsing")
325 "The conventional models for parsing XML are either @dfn{DOM}
326 (a data structure representing the entire document tree is created) or
327 @dfn{SAX} (callbacks are issued for each element in the XML).
329 XML grammar is recursive - so it's nice to be able to write recursive
330 parsers for it. @code{XML::Descent} allows such parsers to be created.")
331 (license license:perl-license)))
333 (define-public perl-xml-parser
335 (name "perl-xml-parser")
340 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
344 "05ij0g6bfn27iaggxf8nl5rhlwx6f6p6xmdav6rjcly3x5zd1s8s"))))
345 (build-system perl-build-system)
346 (arguments `(#:make-maker-flags
347 (let ((expat (assoc-ref %build-inputs "expat")))
348 (list (string-append "EXPATLIBPATH=" expat "/lib")
349 (string-append "EXPATINCPATH=" expat "/include")))))
350 (inputs `(("expat" ,expat)))
351 (license license:perl-license)
352 (synopsis "Perl bindings to the Expat XML parsing library")
354 "This module provides ways to parse XML documents. It is built on top of
355 XML::Parser::Expat, which is a lower level interface to James Clark's expat
356 library. Each call to one of the parsing methods creates a new instance of
357 XML::Parser::Expat which is then used to parse the document. Expat options
358 may be provided when the XML::Parser object is created. These options are
359 then passed on to the Expat object on each parse call. They can also be given
360 as extra arguments to the parse methods, in which case they override options
361 given at XML::Parser creation time.")
362 (home-page "http://search.cpan.org/dist/XML-Parser")))
364 (define-public perl-xml-tokeparser
366 (name "perl-xml-tokeparser")
370 (uri (string-append "mirror://cpan/authors/id/P/PO/PODMASTER/"
371 "XML-TokeParser-" version ".tar.gz"))
374 "1hnpwb3lh6cbgwvjjgqzcp6jm4mp612qn6ili38adc9nhkwv8fc5"))))
375 (build-system perl-build-system)
376 (propagated-inputs `(("perl-xml-parser" ,perl-xml-parser)))
377 (home-page "http://search.cpan.org/dist/XML-TokeParser")
378 (synopsis "Simplified interface to XML::Parser")
380 "@code{XML::TokeParser} provides a procedural (\"pull mode\") interface
381 to @code{XML::Parser} in much the same way that Gisle Aas'
382 @code{HTML::TokeParser} provides a procedural interface to @code{HTML::Parser}.
383 @code{XML::TokeParser} splits its XML input up into \"tokens\", each
384 corresponding to an @code{XML::Parser} event.")
385 (license license:perl-license)))
387 (define-public perl-libxml
394 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
398 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
399 (build-system perl-build-system)
401 `(("perl-xml-parser" ,perl-xml-parser)))
402 (license license:perl-license)
403 (synopsis "Perl SAX parser using XML::Parser")
405 "XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser
407 (home-page "http://search.cpan.org/~kmacleod/libxml-perl/lib/XML/Parser/PerlSAX.pm")))
409 (define-public perl-xml-libxml
411 (name "perl-xml-libxml")
416 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
417 "XML-LibXML-" version ".tar.gz"))
420 "0xnl281hb590i287fxpl947f1s4zl9dnvc4ajvsqi89w23im453j"))))
421 (build-system perl-build-system)
423 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
424 ("perl-xml-sax" ,perl-xml-sax)))
426 `(("libxml2" ,libxml2)))
427 (home-page "http://search.cpan.org/dist/XML-LibXML")
428 (synopsis "Perl interface to libxml2")
429 (description "This module implements a Perl interface to the libxml2
430 library which provides interfaces for parsing and manipulating XML files. This
431 module allows Perl programmers to make use of the highly capable validating
432 XML parser and the high performance DOM implementation.")
433 (license license:perl-license)))
435 (define-public perl-xml-libxml-simple
437 (name "perl-xml-libxml-simple")
441 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
442 "XML-LibXML-Simple-" version ".tar.gz"))
445 "1g8nlk3zdz2cclxf7azvsb3jfxmvy6ml8wmj774k4qjqcsqmzk0w"))))
446 (build-system perl-build-system)
448 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
449 ("perl-xml-libxml" ,perl-xml-libxml)))
450 (home-page "http://search.cpan.org/dist/XML-LibXML-Simple")
451 (synopsis "XML::LibXML based XML::Simple clone")
453 "This package provides the same API as @code{XML::Simple} but is based on
454 @code{XML::LibXML}.")
455 (license license:perl-license)))
457 (define-public perl-xml-libxslt
459 (name "perl-xml-libxslt")
464 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
465 "XML-LibXSLT-" version ".tar.gz"))
468 "0dggycql18kfxzkb1kw3yc7gslxlrrgyyn2r2ygsylycb89j3jpi"))))
469 (build-system perl-build-system)
471 `(("libxslt" ,libxslt)))
473 `(("perl-xml-libxml" ,perl-xml-libxml)))
474 (home-page "http://search.cpan.org/dist/XML-LibXSLT")
475 (synopsis "Perl bindings to GNOME libxslt library")
476 (description "This Perl module is an interface to the GNOME project's
478 (license license:perl-license)))
480 (define-public perl-xml-namespacesupport
482 (name "perl-xml-namespacesupport")
487 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
488 "XML-NamespaceSupport-" version ".tar.gz"))
491 "1vz5pbi4lm5fhq2slrs2hlp6bnk29863abgjlcx43l4dky2rbsa7"))))
492 (build-system perl-build-system)
493 (home-page "http://search.cpan.org/dist/XML-NamespaceSupport")
494 (synopsis "XML namespace support class")
495 (description "This module offers a simple to process namespaced XML
496 names (unames) from within any application that may need them. It also helps
497 maintain a prefix to namespace URI map, and provides a number of basic
499 (license license:perl-license)))
501 (define-public perl-xml-rss
503 (name "perl-xml-rss")
507 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
508 "XML-RSS-" version ".tar.gz"))
511 "0v6vfizn2psy6av057kp7fv3z3y73s6b3w56jm3zr6hlq48llsx2"))))
512 (build-system perl-build-system)
514 `(("perl-module-build" ,perl-module-build)
515 ("perl-test-manifest" ,perl-test-manifest)
516 ("perl-test-differences" ,perl-test-differences)
517 ("perl-test-pod" ,perl-test-pod)
518 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
519 ;; XXX: The test which uses this modules does not run, even when it is included
520 ;; it is ignored. ("perl-test-trailingspace" ,perl-test-trailingspace)
522 `(("perl-datetime" ,perl-datetime)
523 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
524 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
525 ("perl-html-parser" ,perl-html-parser)
526 ("perl-xml-parser" ,perl-xml-parser)))
527 (home-page "http://search.cpan.org/dist/XML-RSS")
528 (synopsis "Creates and updates RSS files")
530 "This module provides a basic framework for creating and maintaining
531 RDF Site Summary (RSS) files. This distribution also contains many examples
532 that allow you to generate HTML from an RSS, convert between 0.9, 0.91, and
533 1.0 version, and more.")
534 (license license:perl-license)))
536 (define-public perl-xml-sax
538 (name "perl-xml-sax")
543 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
544 "XML-SAX-" version ".tar.gz"))
547 "115dypb50w1l94y3iwihv5nkixbsv1cxiqkd93y4rk5n6s74pc1j"))))
548 (build-system perl-build-system)
550 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
551 ("perl-xml-sax-base" ,perl-xml-sax-base)))
553 `(#:phases (modify-phases %standard-phases
555 'install 'augment-path
556 ;; The install target tries to load the newly-installed
557 ;; XML::SAX module, but can't find it, so we need to tell
558 ;; perl where to look.
559 (lambda* (#:key outputs #:allow-other-keys)
561 (string-append (getenv "PERL5LIB") ":"
562 (assoc-ref outputs "out")
563 "/lib/perl5/site_perl")))))))
564 (home-page "http://search.cpan.org/dist/XML-SAX")
565 (synopsis "Perl API for XML")
566 (description "XML::SAX consists of several framework classes for using and
567 building Perl SAX2 XML parsers, filters, and drivers.")
568 (license license:perl-license)))
570 (define-public perl-xml-sax-base
572 (name "perl-xml-sax-base")
577 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
578 "XML-SAX-Base-" version ".tar.gz"))
581 "17i161rq1ngjlk0c8vdkrkkc56y1pf51k1g54y28py0micqp0qk6"))))
582 (build-system perl-build-system)
583 (home-page "http://search.cpan.org/dist/XML-SAX-Base")
584 (synopsis "Base class for SAX Drivers and Filters")
585 (description "This module has a very simple task - to be a base class for
586 PerlSAX drivers and filters. It's default behaviour is to pass the input
587 directly to the output unchanged. It can be useful to use this module as a
588 base class so you don't have to, for example, implement the characters()
590 (license license:perl-license)))
592 (define-public perl-xml-simple
594 (name "perl-xml-simple")
599 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
603 "0jgbk30jizafpl7078jhw1di1yh08gf8d85dsvjllr595vr0widr"))))
604 (build-system perl-build-system)
606 `(("perl-xml-parser" ,perl-xml-parser)
607 ("perl-xml-sax" ,perl-xml-sax)))
608 (license license:perl-license)
609 (synopsis "Perl module for easy reading/writing of XML files")
611 "The XML::Simple module provides a simple API layer on top of an
612 underlying XML parsing module (either XML::Parser or one of the SAX2
614 (home-page "http://search.cpan.org/dist/XML-Simple")))
616 (define-public perl-xml-regexp
618 (name "perl-xml-regexp")
623 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
627 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
628 (build-system perl-build-system)
630 `(("perl-xml-parser" ,perl-xml-parser)))
631 (license license:perl-license)
632 (synopsis "Perl regular expressions for XML tokens")
634 "XML::RegExp contains regular expressions for the following XML tokens:
635 BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
636 EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
637 (home-page "http://search.cpan.org/~tjmather/XML-RegExp/lib/XML/RegExp.pm")))
639 (define-public perl-xml-dom
641 (name "perl-xml-dom")
646 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
650 "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb"))))
651 (build-system perl-build-system)
653 `(("perl-libwww" ,perl-libwww)
654 ("perl-libxml" ,perl-libxml)
655 ("perl-xml-parser" ,perl-xml-parser)
656 ("perl-xml-regexp" ,perl-xml-regexp)))
657 (license license:perl-license)
659 "Perl module for building DOM Level 1 compliant document structures")
661 "This module extends the XML::Parser module by Clark Cooper. The
662 XML::Parser module is built on top of XML::Parser::Expat, which is a lower
663 level interface to James Clark's expat library. XML::DOM::Parser is derived
664 from XML::Parser. It parses XML strings or files and builds a data structure
665 that conforms to the API of the Document Object Model.")
666 (home-page "http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM.pm")))
668 (define-public perl-xml-compile-tester
670 (name "perl-xml-compile-tester")
674 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
675 "XML-Compile-Tester-" version ".tar.gz"))
678 "1bcl8x8cyacqv9yjp97aq9qq85sy8wv78kd8c16yd9yw3by4cpp1"))))
679 (build-system perl-build-system)
681 `(("perl-log-report" ,perl-log-report)
682 ("perl-test-deep" ,perl-test-deep)))
683 (home-page "http://search.cpan.org/dist/XML-Compile-Tester")
684 (synopsis "XML::Compile related regression testing")
686 "The @code{XML::Compile} module suite has extensive regression testing.
687 This module provide functions which simplify writing tests for
688 @code{XML::Compile} related distributions.")
689 (license license:perl-license)))
691 (define-public perl-xml-compile
693 (name "perl-xml-compile")
697 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
698 "XML-Compile-" version ".tar.gz"))
701 "1hp41960bpqxvv1samv9hc0ghhmvs3i16r4rfl9yp54lp6jhsr2c"))))
702 (build-system perl-build-system)
704 `(("perl-log-report" ,perl-log-report)
705 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
706 ("perl-xml-libxml" ,perl-xml-libxml)
707 ("perl-test-deep" ,perl-test-deep)))
708 (home-page "http://search.cpan.org/dist/XML-Compile")
709 (synopsis "Compilation-based XML processing")
711 "@code{XML::Compile} can be used to translate a Perl data-structure into
712 XML or XML into a Perl data-structure, both directions under rigid control by
714 (license license:perl-license)))
716 (define-public perl-xml-compile-cache
718 (name "perl-xml-compile-cache")
722 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
723 "XML-Compile-Cache-" version ".tar.gz"))
726 "0xbwlszhi9hg8sxm5ylglm2qvnb689i595p913awrj2g4mp9yfsw"))))
727 (build-system perl-build-system)
729 `(("perl-log-report" ,perl-log-report)
730 ("perl-xml-compile" ,perl-xml-compile)
731 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
732 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)))
733 (home-page "http://search.cpan.org/dist/XML-Compile-Cache")
734 (synopsis "Cache compiled XML translators")
736 "This package provides methods to cache compiled XML translators.")
737 (license license:perl-license)))
739 (define-public perl-xml-compile-soap
741 (name "perl-xml-compile-soap")
745 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
746 "XML-Compile-SOAP-" version ".tar.gz"))
749 "0rxidh7kjyhnw2y789bqbwccnp8n0m3xskn524y9c752s64qpjcz"))))
750 (build-system perl-build-system)
752 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
753 ("perl-libwww" ,perl-libwww)
754 ("perl-log-report" ,perl-log-report)
755 ("perl-xml-compile" ,perl-xml-compile)
756 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
757 ("perl-xml-compile-tester" ,perl-xml-compile-tester)))
758 (home-page "http://search.cpan.org/dist/XML-Compile-SOAP")
759 (synopsis "Base-class for SOAP implementations")
761 "This module provides a class to handle the SOAP protocol. The first
762 implementation is @url{SOAP1.1,
763 http://www.w3.org/TR/2000/NOTE-SOAP-20000508/}, which is still most often
765 (license license:perl-license)))
767 (define-public perl-xml-compile-wsdl11
769 (name "perl-xml-compile-wsdl11")
773 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
774 "XML-Compile-WSDL11-" version ".tar.gz"))
777 "0vbq05cpynm3jj81fw1k4nsb3wv4zngi6blvi1jhdarmh2rfg1x2"))))
778 (build-system perl-build-system)
780 `(("perl-log-report" ,perl-log-report)
781 ("perl-xml-compile" ,perl-xml-compile)
782 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
783 ("perl-xml-compile-soap" ,perl-xml-compile-soap)))
784 (home-page "http://search.cpan.org/dist/XML-Compile-WSDL11")
785 (synopsis "Create SOAP messages defined by WSDL 1.1")
787 "This module understands WSDL version 1.1. A WSDL file defines a set of
788 messages to be send and received over SOAP connections. This involves
789 encoding of the message to be send into XML, sending the message to the
790 server, collect the answer, and finally decoding the XML to Perl.")
791 (license license:perl-license)))
793 (define-public perl-xml-feed
795 (name "perl-xml-feed")
799 (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
800 "XML-Feed-" version ".tar.gz"))
803 "07b165g6wk8kqwpl49r3n0kag6p2nrkyp3ch0h8qyxb6nrnkkq7c"))))
804 (build-system perl-build-system)
806 `(#:tests? #f)) ; Tests require internet connection
808 `(("perl-module-build" ,perl-module-build)
809 ("perl-uri" ,perl-uri)
810 ("perl-class-data-inheritable" ,perl-class-data-inheritable)))
812 `(("perl-class-errorhandler" ,perl-class-errorhandler)
813 ("perl-datetime" ,perl-datetime)
814 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
815 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
816 ("perl-feed-find" ,perl-feed-find)
817 ("perl-html-parser" ,perl-html-parser)
818 ("perl-libwww-perl" ,perl-libwww)
819 ("perl-module-pluggable" ,perl-module-pluggable)
820 ("perl-uri-fetch" ,perl-uri-fetch)
821 ("perl-xml-atom" ,perl-xml-atom)
822 ("perl-xml-libxml" ,perl-xml-libxml)
823 ("perl-xml-rss" ,perl-xml-rss)))
824 (home-page "http://search.cpan.org/dist/XML-Feed")
825 (synopsis "XML Syndication Feed Support")
826 (description "@code{XML::Feed} is a syndication feed parser for both RSS and
827 Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI.
828 @code{XML::Feed} supports the following syndication feed formats:
829 RSS 0.91, RSS 1.0, RSS 2.0, Atom")
830 (license license:perl-license)))
832 (define-public perl-xml-xpath
834 (name "perl-xml-xpath")
838 (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
839 "XML-XPath-" version ".tar.gz"))
842 "07pa0bl42jka8mj7jshjynx8vpfh8b4cdyiv4zlkqvkqz98nzxib"))))
843 (build-system perl-build-system)
845 `(("perl-path-tiny" ,perl-path-tiny)))
847 `(("perl-xml-parser" ,perl-xml-parser)))
848 (home-page "http://search.cpan.org/dist/XML-XPath")
849 (synopsis "Parse and evaluate XPath statements")
851 "This module aims to comply exactly to the @url{XPath specification,
852 https://www.w3.org/TR/xpath} and yet allow extensions to be added in
853 the form of functions.")
854 (license license:perl-license)))
856 (define-public pugixml
863 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
864 version "/pugixml-" version ".tar.gz"))
867 "0fcgggry5x5bn0zhb09ij9hb0p45nb0sv0d9fw3cm1cf62hp9n80"))))
868 (build-system cmake-build-system)
870 `(#:configure-flags '("-DCMAKE_CXX_FLAGS=-shared -fPIC"
871 "-DCMAKE_C_FLAGS=-shared -fPIC")
872 #:tests? #f)) ; no tests
873 (home-page "http://pugixml.org")
874 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
876 "pugixml is a C++ XML processing library, which consists of a DOM-like
877 interface with rich traversal/modification capabilities, a fast XML parser
878 which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
879 implementation for complex data-driven tree queries. Full Unicode support is
880 also available, with Unicode interface variants and conversions between
881 different Unicode encodings which happen automatically during
883 (license license:expat)))
885 (define-public python-pyxb
891 (uri (pypi-uri "PyXB" version))
894 "1d17pyixbfvjyi2lb0cfp0ch8wwdf44mmg3r5pwqhyyqs66z601a"))))
895 (build-system python-build-system)
896 (home-page "http://pyxb.sourceforge.net/")
897 (synopsis "Python XML Schema Bindings")
899 "PyXB (\"pixbee\") is a pure Python package that generates Python source
900 code for classes that correspond to data structures defined by XMLSchema.")
901 (license (list license:asl2.0 ; Most files.
902 license:expat ; pyxb/utils/six.py
903 license:gpl2 ; bundled jquery in doc is dual MIT/GPL2
904 license:psfl)))) ; pyxb/utils/activestate.py
906 (define-public python2-pyxb
907 (package-with-python2 python-pyxb))
916 ;; The old source on fedorahosted.org is offline permanently:
917 ;; <https://bugs.gnu.org/25989>
918 (uri (string-append "mirror://debian/pool/main/x/xmlto/"
919 "xmlto_" version ".orig.tar.bz2"))
920 (file-name (string-append name "-" version ".tar.bz2"))
923 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
924 (build-system gnu-build-system)
926 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
927 '(#:configure-flags (list (string-append "GETOPT="
928 (assoc-ref %build-inputs
932 `(("util-linux" ,util-linux) ; for 'getopt'
933 ("libxml2" ,libxml2) ; for 'xmllint'
934 ("libxslt" ,libxslt))) ; for 'xsltproc'
935 (home-page "http://cyberelk.net/tim/software/xmlto/")
936 (synopsis "Front-end to an XSL toolchain")
938 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
939 stylesheet for the conversion you want and applies it using an external
940 XSL-T processor. It also performs any necessary post-processing.")
941 (license license:gpl2+)))
943 (define-public xmlsec
949 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
950 name "1-" version ".tar.gz"))
953 "1lpwj8dxwhha54sby0v5axjk79h56jnhjjiwiasbbk15vwzahz4n"))))
954 (build-system gnu-build-system)
955 (propagated-inputs ; according to xmlsec1.pc
956 `(("libxml2" ,libxml2)
957 ("libxslt" ,libxslt)))
960 ("libgcrypt" ,libgcrypt)
961 ("libltdl" ,libltdl)))
963 `(("pkg-config" ,pkg-config)))
964 (home-page "https://www.aleksey.com/xmlsec/")
965 (synopsis "XML Security Library")
967 "The XML Security Library is a C library based on Libxml2. It
968 supports XML security standards such as XML Signature, XML Encryption,
969 Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
971 (license (license:x11-style "file://COPYING"
972 "See 'COPYING' in the distribution."))))
974 (define-public minixml
979 (method url-fetch/tarbomb)
980 (uri (string-append "https://github.com/michaelrsweet/mxml/"
981 "releases/download/v" version
982 "/mxml-" version ".tar.gz"))
985 "13xsw8vvkxd10vca42ccdyl9rs64lcvhbfz57aknpl3xcfn8mxma"))))
986 (build-system gnu-build-system)
989 (modify-phases %standard-phases
990 (add-after 'unpack 'fix-permissions
991 ;; FIXME: url-fetch/tarbomb resets all permissions to 555/444.
996 (find-files "doc" "\\."))
998 #:tests? #f)) ; tests are run during build
999 (home-page "https://michaelrsweet.github.io/mxml")
1000 (synopsis "Small XML parsing library")
1002 "Mini-XML is a small C library to read and write XML files and strings in
1003 UTF-8 and UTF-16 encoding.")
1004 ;; LGPL 2.0+ with additional exceptions for static linking
1005 (license license:lgpl2.0+)))
1007 ;; TinyXML is an unmaintained piece of software, so the patches and build
1008 ;; system massaging have no upstream potential.
1009 (define-public tinyxml
1015 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
1017 (string-join (string-split version #\.) "_")
1021 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
1022 (patches (search-patches "tinyxml-use-stl.patch"))))
1023 (build-system gnu-build-system)
1024 ;; This library is missing *a lot* of the steps to make it usable, so we
1025 ;; have to add them here, like every other distro must do.
1028 (modify-phases %standard-phases
1030 (add-after 'build 'build-shared-library
1032 (zero? (system* "g++" "-Wall" "-O2" "-shared" "-fpic"
1033 "tinyxml.cpp" "tinyxmlerror.cpp"
1034 "tinyxmlparser.cpp" "tinystr.cpp"
1035 "-o" "libtinyxml.so"))))
1037 (lambda _ (zero? (system "./xmltest"))))
1039 (lambda* (#:key outputs #:allow-other-keys)
1040 (let* ((out (assoc-ref outputs "out"))
1041 (include (string-append out "/include"))
1042 (lib (string-append out "/lib"))
1043 (pkgconfig (string-append out "/lib/pkgconfig"))
1044 (doc (string-append out "/share/doc")))
1045 ;; Install libs and headers.
1046 (install-file "libtinyxml.so" lib)
1047 (install-file "tinystr.h" include)
1048 (install-file "tinyxml.h" include)
1049 ;; Generate and install pkg-config file.
1051 ;; Software such as Kodi expect this file to be present, but
1052 ;; it's not provided in the source code.
1053 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
1055 (format port "prefix=~a
1056 exec_prefix=${prefix}
1057 libdir=${exec_prefix}/lib
1058 includedir=${prefix}/include
1061 Description: A simple, small, C++ XML parser
1063 Libs: -L${libdir} -ltinyxml
1064 Cflags: -I${includedir}
1069 (copy-recursively "docs" (string-append doc "tinyxml"))
1071 (synopsis "Small XML parser for C++")
1072 (description "TinyXML is a small and simple XML parsing library for the
1073 C++ programming language.")
1074 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
1075 (license license:zlib)))
1077 (define-public tinyxml2
1084 (uri (string-append "https://github.com/leethomason/tinyxml2/archive/"
1088 "083z4r4khcndxi9k840lcr48sqxvar4gpsnf749xfdn1bkr8xcql"))))
1089 (build-system cmake-build-system)
1091 `(#:tests? #f)) ; no tests
1092 (synopsis "Small XML parser for C++")
1093 (description "TinyXML2 is a small and simple XML parsing library for the
1094 C++ programming language.")
1095 (home-page "http://www.grinninglizard.com/tinyxml2/")
1096 (license license:zlib)))
1098 (define-public xmlstarlet
1105 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1106 version "/xmlstarlet-" version ".tar.gz"))
1109 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1110 (build-system gnu-build-system)
1113 (modify-phases %standard-phases
1114 (add-before 'check 'drop-failing-tests
1116 ;; FIXME: Why are these tests failing.
1117 (substitute* "Makefile"
1118 (("^examples/schema1\\\\") "\\")
1119 (("^examples/valid1\\\\") "\\"))
1122 `(("libxslt" ,libxslt)
1123 ("libxml2" ,libxml2)))
1124 (home-page "http://xmlstar.sourceforge.net/")
1125 (synopsis "Command line XML toolkit")
1126 (description "XMLStarlet is a set of command line utilities which can be
1127 used to transform, query, validate, and edit XML documents. XPath is used to
1128 match and extract data, and elements can be added, deleted or modified using
1130 (license license:x11)))
1132 (define-public html-xml-utils
1134 (name "html-xml-utils")
1140 "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-"
1144 "0cbmqa9c4bc4ikk7vmgd65ixh2pl9mr336c4his3m8l7rgsjnh8n"))))
1145 (build-system gnu-build-system)
1146 (home-page "https://www.w3.org/Tools/HTML-XML-utils/")
1147 (synopsis "Command line utilities to manipulate HTML and XML files")
1148 (description "HTML-XML-utils provides a number of simple utilities for
1149 manipulating and converting HTML and XML files in various ways. The suite
1150 consists of the following tools:
1153 @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} entities
1154 @item @command{xml2asc} convert from @code{&#nnn;} entities to @code{UTF-8}
1155 @item @command{hxaddid} add IDs to selected elements
1156 @item @command{hxcite} replace bibliographic references by hyperlinks
1157 @item @command{hxcite} mkbib - expand references and create bibliography
1158 @item @command{hxclean} apply heuristics to correct an HTML file
1159 @item @command{hxcopy} copy an HTML file while preserving relative links
1160 @item @command{hxcount} count elements and attributes in HTML or XML files
1161 @item @command{hxextract} extract selected elements
1162 @item @command{hxincl} expand included HTML or XML files
1163 @item @command{hxindex} create an alphabetically sorted index
1164 @item @command{hxmkbib} create bibliography from a template
1165 @item @command{hxmultitoc} create a table of contents for a set of HTML files
1166 @item @command{hxname2id} move some @code{ID=} or @code{NAME=} from A
1167 elements to their parents
1168 @item @command{hxnormalize} pretty-print an HTML file
1169 @item @command{hxnsxml} convert output of hxxmlns back to normal XML
1170 @item @command{hxnum} number section headings in an HTML file
1171 @item @command{hxpipe} convert XML to a format easier to parse with Perl or AWK
1172 @item @command{hxprintlinks} number links and add table of URLs at end of an HTML file
1173 @item @command{hxprune} remove marked elements from an HTML file
1174 @item @command{hxref} generate cross-references
1175 @item @command{hxselect} extract elements that match a (CSS) selector
1176 @item @command{hxtoc} insert a table of contents in an HTML file
1177 @item @command{hxuncdata} replace CDATA sections by character entities
1178 @item @command{hxunent} replace HTML predefined character entities to @code{UTF-8}
1179 @item @command{hxunpipe} convert output of pipe back to XML format
1180 @item @command{hxunxmlns} replace \"global names\" by XML Namespace prefixes
1181 @item @command{hxwls} list links in an HTML file
1182 @item @command{hxxmlns} replace XML Namespace prefixes by \"global names\"
1185 (license license:expat)))
1187 (define-public xlsx2csv
1194 "https://github.com/dilshod/"
1195 name "/archive/release/" version ".tar.gz"))
1196 (file-name (string-append name "-" version ".tar.gz"))
1199 "1gpn6kaa7l1ai8c9zx2j3acf04bvxq79pni8jjfjrk01smjbyyql"))))
1200 (build-system python-build-system)
1202 `(#:python ,python-2 ; Use python-2 for the test script.
1204 (modify-phases %standard-phases
1207 (substitute* "test/run"
1208 ;; Run tests with `python' only
1209 (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
1210 (zero? (system* "test/run")))))))
1211 (home-page "https://github.com/dilshod/xlsx2csv")
1212 (synopsis "XLSX to CSV converter")
1214 "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
1215 XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
1216 files. It is designed to be fast and to handle large input files.")
1217 (license license:gpl2+)))
1219 (define-public python-defusedxml
1221 (name "python-defusedxml")
1226 (uri (pypi-uri "defusedxml" version))
1229 "0y147zy3jqmk6ly7fbhqmzn1hf41xcb53f2vcc3m8x4ba5d1smfd"))))
1230 (build-system python-build-system)
1231 (home-page "https://bitbucket.org/tiran/defusedxml")
1232 (synopsis "XML bomb protection for Python stdlib modules")
1234 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1235 (license license:psfl)))
1237 (define-public python2-defusedxml
1238 (package-with-python2 python-defusedxml))
1240 (define-public libxls
1246 (uri (string-append "https://sourceforge.net/projects/"
1247 name "/files/" name "-"
1251 "1g8ds7wbhsa4hdcn77xc2c0l3vvz5bx2hx9ng9c9n7aii92ymfnk"))))
1252 (build-system gnu-build-system)
1255 (modify-phases %standard-phases
1256 ;; Bootstrapping is required in order to fix the test driver script.
1257 (add-after 'unpack 'bootstrap
1259 (zero? (system* "bash" "bootstrap")))))))
1262 ("autoconf" ,autoconf)
1263 ("automake" ,automake)
1264 ("libtool" ,libtool)))
1265 (home-page "http://libxls.sourceforge.net/")
1266 (synopsis "Read Excel files")
1268 "libxls is a C library which can read Excel (xls) files since Excel 97 (the BIFF8 format).
1269 libxls cannot write Excel files.")
1270 (license license:bsd-2)))
1272 (define-public freexl
1278 (uri (string-append "http://www.gaia-gis.it/gaia-sins/"
1279 name "-" version ".tar.gz"))
1282 "09bwzqjc41cc8qw8qkw9wq58rg9nax8r3fg19iny5vmw1c0z23sh"))))
1283 (build-system gnu-build-system)
1284 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1285 (synopsis "Read Excel files")
1287 "FreeXL is a C library to extract valid data from within an Excel (.xls)
1289 ;; Any of these licenses may be picked.
1290 (license (list license:gpl2+
1294 (define-public xerces-c
1300 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1301 "xerces-c-" version ".tar.xz"))
1304 "0hb29c0smqlpxj0zdm09s983z5jx37szlliccnvgh0qq91wwqwwr"))))
1305 (build-system gnu-build-system)
1307 (let ((system (or (%current-target-system)
1308 (%current-system))))
1309 (if (string-prefix? "x86_64" system)
1311 '(#:configure-flags '("--disable-sse2")))))
1314 (home-page "http://xerces.apache.org/xerces-c/")
1315 (synopsis "Validating XML parser library for C++")
1316 (description "Xerces-C++ is a validating XML parser written in a portable
1317 subset of C++. Xerces-C++ makes it easy to give your application the ability
1318 to read and write XML data. A shared library is provided for parsing,
1319 generating, manipulating, and validating XML documents using the DOM, SAX, and
1321 (license license:asl2.0)))
1323 (define-public java-simple-xml
1325 (name "java-simple-xml")
1329 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
1333 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))))
1334 (build-system ant-build-system)
1336 `(#:build-target "build"
1337 #:test-target "test"
1339 (modify-phases %standard-phases
1340 (replace 'install (install-jars "jar")))))
1342 `(("unzip" ,unzip)))
1343 (home-page "http://simple.sourceforge.net/")
1344 (synopsis "XML serialization framework for Java")
1345 (description "Simple is a high performance XML serialization and
1346 configuration framework for Java. Its goal is to provide an XML framework
1347 that enables rapid development of XML configuration and communication systems.
1348 This framework aids the development of XML systems with minimal effort and
1349 reduced errors. It offers full object serialization and deserialization,
1350 maintaining each reference encountered.")
1351 (license license:asl2.0)))
1353 (define-public perl-xml-xpathengine
1355 (name "perl-xml-xpathengine")
1359 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1360 "XML-XPathEngine-" version ".tar.gz"))
1363 "0r72na14bmsxfd16s9nlza155amqww0k8wsa9x2a3sqbpp5ppznj"))))
1364 (build-system perl-build-system)
1365 (home-page "http://search.cpan.org/dist/XML-XPathEngine/")
1366 (synopsis "Re-usable XPath engine for DOM-like trees")
1368 "This module provides an XPath engine, that can be re-used by other
1369 modules/classes that implement trees.
1371 In order to use the XPath engine, nodes in the user module need to mimick DOM
1372 nodes. The degree of similitude between the user tree and a DOM dictates how
1373 much of the XPath features can be used. A module implementing all of the DOM
1374 should be able to use this module very easily (you might need to add the
1375 @code{cmp} method on nodes in order to get ordered result sets).")
1376 (license license:perl-license)))
1378 (define-public perl-tree-xpathengine
1380 (name "perl-tree-xpathengine")
1384 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1385 "Tree-XPathEngine-" version ".tar.gz"))
1388 "1vbbw8wxm79r3xbra8narw1dqvm34510q67wbmg2zmj6zd1k06r9"))))
1389 (build-system perl-build-system)
1390 (home-page "http://search.cpan.org/dist/Tree-XPathEngine/")
1391 (synopsis "Re-usable XPath engine")
1393 "This module provides an XPath engine, that can be re-used by other
1394 module/classes that implement trees. It is designed to be compatible with
1395 @code{Class::XPath}, ie it passes its tests if you replace @code{Class::XPath}
1396 by @code{Tree::XPathEngine}.")
1397 (license license:perl-license)))
1399 (define-public perl-xml-filter-buffertext
1401 (name "perl-xml-filter-buffertext")
1406 (uri (string-append "mirror://cpan/authors/id/R/RB/RBERJON/"
1407 "XML-Filter-BufferText-" version ".tar.gz"))
1410 "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg"))))
1411 (build-system perl-build-system)
1413 `(("perl-xml-sax-base" ,perl-xml-sax-base)))
1414 (home-page "http://search.cpan.org/dist/XML-Filter-BufferText/")
1415 (synopsis "Filter to put all characters() in one event")
1416 (description "This is a very simple filter. One common cause of
1417 grief (and programmer error) is that XML parsers aren't required to provide
1418 character events in one chunk. They can, but are not forced to, and most
1419 don't. This filter does the trivial but oft-repeated task of putting all
1420 characters into a single event.")
1421 (license license:perl-license)))
1423 (define-public perl-xml-sax-writer
1425 (name "perl-xml-sax-writer")
1430 "mirror://cpan/authors/id/P/PE/PERIGRIN/"
1431 "XML-SAX-Writer-" version ".tar.gz"))
1434 "1w1cd1ybxdvhmnxdlkywi3x5ka3g4md42kyynksjc09vyizd0q9x"))))
1435 (build-system perl-build-system)
1437 `(("perl-libxml" ,perl-libxml)
1438 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1439 ("perl-xml-namespacesupport", perl-xml-namespacesupport)
1440 ("perl-xml-sax-base" ,perl-xml-sax-base)))
1441 (home-page "http://search.cpan.org/dist/XML-SAX-Writer/")
1442 (synopsis "SAX2 XML Writer")
1444 "This is an XML writer that understands SAX2. It is based on
1445 @code{XML::Handler::YAWriter}.")
1446 (license license:perl-license)))
1448 (define-public perl-xml-handler-yawriter
1450 (name "perl-xml-handler-yawriter")
1455 (uri (string-append "mirror://cpan/authors/id/K/KR/KRAEHE/"
1456 "XML-Handler-YAWriter-" version ".tar.gz"))
1459 "11d45a1sz862va9rry3p2m77pwvq3kpsvgwhc5ramh9mbszbnk77"))))
1460 (build-system perl-build-system)
1462 `(("perl-libxml" ,perl-libxml)))
1463 (home-page "http://search.cpan.org/dist/XML-Handler-YAWriter/")
1464 (synopsis "Yet another Perl SAX XML Writer")
1465 (description "YAWriter implements Yet Another @code{XML::Handler::Writer}.
1466 It provides a flexible escaping technique and pretty printing.")
1467 (license license:perl-license)))
1469 (define-public perl-xml-twig
1471 (name "perl-xml-twig")
1475 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1476 "XML-Twig-" version ".tar.gz"))
1479 "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy"))))
1480 (build-system perl-build-system)
1482 `(("expat" ,expat)))
1484 `(("perl-html-tidy" ,perl-html-tidy)
1485 ("perl-html-tree" ,perl-html-tree)
1486 ("perl-io-captureoutput" ,perl-io-captureoutput)
1487 ("perl-io-string" ,perl-io-string)
1488 ("perl-io-stringy" ,perl-io-stringy)
1489 ("perl-libxml" ,perl-libxml)
1490 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1491 ("perl-xml-handler-yawriter" ,perl-xml-handler-yawriter)
1492 ("perl-xml-parser" ,perl-xml-parser)
1493 ("perl-xml-sax-writer" ,perl-xml-sax-writer)
1494 ("perl-xml-simple" ,perl-xml-simple)
1495 ("perl-xml-xpathengine" ,perl-xml-xpathengine)
1496 ("perl-test-pod", perl-test-pod)
1497 ("perl-tree-xpathengine" ,perl-tree-xpathengine)))
1498 (home-page "http://search.cpan.org/dist/XML-Twig/")
1499 (synopsis "Perl module for processing huge XML documents in tree mode")
1500 (description "@code{XML::Twig} is an XML transformation module. Its
1501 strong points: can be used to process huge documents while still being in tree
1502 mode; not bound by DOM or SAX, so it is very perlish and offers a very
1503 comprehensive set of methods; simple to use; DWIMs as much as possible.
1505 What it doesn't offer: full SAX support (it can export SAX, but only reads
1506 XML), full XPath support (unless you use @code{XML::Twig::XPath}), nor DOM
1508 (license license:perl-license)))
1510 ;; TODO: Debian builds several jars out of this: jaxp-1.4.jar,
1511 ;; xml-apis.jar and xml-apis-1.4.01.jar.
1512 (define-public java-jaxp
1519 (uri (string-append "mirror://apache/xerces/xml-commons/source/"
1520 "xml-commons-external-" version "-src.tar.gz"))
1522 (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk"))))
1523 (build-system ant-build-system)
1525 `(#:jar-name "jaxp.jar"
1528 #:tests? #f)); no tests
1529 (home-page "http://xerces.apache.org/xml-commons/")
1530 (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)")
1531 (description "Jaxp from the Apache XML Commons project is used by
1532 the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs:
1535 @item Document Object Model (DOM)
1536 @item Simple API for XML (SAX)
1537 @item Java APIs for XML Processing (JAXP)
1538 @item Transformation API for XML (TrAX)
1539 @item Document Object Model (DOM) Load and Save
1540 @item JSR 206 Java API for XML Processing
1542 (license (list license:asl2.0
1543 license:w3c ;; Files under org.w3c
1544 license:public-domain)))) ;; org.xml.sax
1546 (define-public java-apache-xml-commons-resolver
1548 (name "java-apache-xml-commons-resolver")
1553 (uri (string-append "mirror://apache/xerces/xml-commons/"
1554 "xml-commons-resolver-" version ".tar.gz"))
1556 (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm"))
1557 (modules '((guix build utils)))
1560 (for-each delete-file (find-files "." ".*\\.(jar|zip)"))
1562 (build-system ant-build-system)
1564 `(#:jar-name (string-append "xml-resolver.jar")
1565 #:tests? #f)); no tests
1567 `(("java-junit" ,java-junit)))
1568 (home-page "http://xerces.apache.org/xml-commons/")
1569 (synopsis "Catalog-based entity and URI resolution")
1570 (description "The resolver class implements the full semantics of OASIS Technical
1571 Resolution 9401:1997 (Amendment 2 to TR 9401) catalogs and the 06 Aug
1572 2001 Committee Specification of OASIS XML Catalogs.
1574 It also includes a framework of classes designed to read catalog files
1575 in a number of formats:
1578 @item The plain-text flavor described by TR9401.
1579 @item The XCatalog XML format defined by John Cowan
1580 @item The XML Catalog format defined by the OASIS Entity Resolution
1581 Technical Committee.
1583 (license license:asl2.0)))
1585 ;; Jaxen requires java-dom4j and java-xom that in turn require jaxen.
1586 ;; This package is a bootstrap version without dependencies on dom4j and xom.
1587 (define java-jaxen-bootstrap
1589 (name "java-jaxen-bootstrap")
1593 ;; No release on github
1594 (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/"
1595 version "/jaxen-" version "-sources.jar"))
1598 "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx"))))
1599 (build-system ant-build-system)
1601 `(#:jar-name "jaxen.jar"
1603 #:tests? #f; no tests
1605 (modify-phases %standard-phases
1606 (add-before 'build 'remove-dom4j
1608 (delete-file-recursively "src/org/jaxen/dom4j")
1609 (delete-file-recursively "src/org/jaxen/xom")
1612 `(("java-jdom" ,java-jdom)))
1613 (home-page "https://github.com/jaxen-xpath/jaxen")
1614 (synopsis "XPath library")
1615 (description "Jaxen is an XPath library written in Java. It is adaptable
1616 to many different object models, including DOM, XOM, dom4j, and JDOM. It is
1617 also possible to write adapters that treat non-XML trees such as compiled
1618 Java byte code or Java beans as XML, thus enabling you to query these trees
1620 (license license:bsd-3)))
1622 (define-public java-xom
1628 (uri (string-append "https://github.com/elharo/xom/archive/XOM_"
1632 "04m69db1irqja12a9rfxrac8cbn9psqa1k136wh4ls4pxfsdr5wg"))
1633 (modules '((guix build utils)))
1636 (for-each delete-file
1637 (find-files "." "\\.jar$"))
1639 (build-system ant-build-system)
1641 `(#:jar-name "xom.jar"
1643 #:tests? #f; no tests
1645 (modify-phases %standard-phases
1646 (add-before 'configure 'fix-tagsoup-dep
1648 ;; FIXME: Where is tagsoup source?
1649 (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java")
1652 `(("java-jdom" ,java-jdom)
1653 ("java-junit" ,java-junit)
1654 ("java-classpathx-servletapi" ,java-classpathx-servletapi)
1655 ("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
1656 ("java-xerces" ,java-xerces)))
1657 (home-page "https://xom.nu/")
1658 (synopsis "XML Object Model")
1659 (description "XOM is a new XML Object Model for processing XML with Java
1660 that strives for correctness and simplicity.")
1662 (license license:lgpl2.1)))