1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019 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, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
8 ;;; Copyright © 2015, 2016, 2017, 2018 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 Nikita <nikita@n0.is>
15 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
16 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 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>
22 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
23 ;;; Copyright © 2018 Jack Hill <jackhill@jackhill.us>
24 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
25 ;;; Copyright © 2020 Paul Garlick <pgarlick@tourbillion-technology.com>
26 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
28 ;;; This file is part of GNU Guix.
30 ;;; GNU Guix is free software; you can redistribute it and/or modify it
31 ;;; under the terms of the GNU General Public License as published by
32 ;;; the Free Software Foundation; either version 3 of the License, or (at
33 ;;; your option) any later version.
35 ;;; GNU Guix is distributed in the hope that it will be useful, but
36 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
37 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 ;;; GNU General Public License for more details.
40 ;;; You should have received a copy of the GNU General Public License
41 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
43 (define-module (gnu packages xml)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages base)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages check)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages curl)
50 #:use-module (gnu packages docbook)
51 #:use-module (gnu packages documentation)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gnome)
54 #:use-module (gnu packages gnupg)
55 #:use-module (gnu packages graphviz)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages java)
58 #:use-module (gnu packages nss)
59 #:use-module (gnu packages perl)
60 #:use-module (gnu packages perl-check)
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages tls)
63 #:use-module (gnu packages web)
64 #:use-module ((guix licenses) #:prefix license:)
65 #:use-module (guix packages)
66 #:use-module (guix download)
67 #:use-module (guix git-download)
68 #:use-module (guix build-system ant)
69 #:use-module (guix build-system cmake)
70 #:use-module (guix build-system gnu)
71 #:use-module (guix build-system meson)
72 #:use-module (guix build-system perl)
73 #:use-module (guix build-system python)
74 #:use-module (gnu packages linux)
75 #:use-module (gnu packages pkg-config))
77 (define-public libxmlb
86 (url "https://github.com/hughsie/libxmlb.git")
88 (file-name (git-file-name name version))
90 (base32 "1mb73pnfwqc4mm0lm16yfn0lj495h8hcciprb2v6wgy3ifnnjxib"))))
91 (build-system meson-build-system)
95 `(("gobject-introspection" ,gobject-introspection)
97 ("pkg-config" ,pkg-config)))
99 `(("appstream-glib" ,appstream-glib)
101 (synopsis "Library to help create and query binary XML blobs")
102 (description "Libxmlb library takes XML source, and converts it to a
103 structured binary representation with a deduplicated string table; where the
104 strings have the NULs included. This allows an application to mmap the binary
105 XML file, do an XPath query and return some strings without actually parsing
106 the entire document.")
107 (home-page "https://github.com/hughsie/libxmlb")
108 (license license:lgpl2.1+)))
114 (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
117 (uri (list (string-append "mirror://sourceforge/expat/expat/"
118 version "/expat-" version ".tar.xz")
120 "https://github.com/libexpat/libexpat/releases/download/R_"
121 (string-map dot->underscore version)
122 "/expat-" version ".tar.xz")))
125 "1960mmgbb4cm64n1p0nz3hrs1pw03hkrfcw8prmnn4622mdrd9hy")))))
126 (build-system gnu-build-system)
128 '(#:configure-flags '("--disable-static")))
129 (home-page "https://libexpat.github.io/")
130 (synopsis "Stream-oriented XML parser library written in C")
132 "Expat is an XML parser library written in C. It is a
133 stream-oriented parser in which an application registers handlers for
134 things the parser might find in the XML document (like start tags).")
135 (license license:expat)))
137 (define-public libebml
144 (uri (string-append "https://dl.matroska.org/downloads/libebml/"
145 "libebml-" version ".tar.xz"))
147 (base32 "1cy4hbk8qbxn4c6pwvlsvr1rp8vhfach9rwfg4c50qa94nlckaw0"))))
148 (build-system cmake-build-system)
151 (list "-DBUILD_SHARED_LIBS=YES")
152 #:tests? #f)) ; no test suite
153 (home-page "https://matroska-org.github.io/libebml/")
154 (synopsis "C++ library to parse EBML files")
155 (description "libebml is a C++ library to read and write @dfn{EBML}
156 (Extensible Binary Meta Language) files. EBML was designed to be a simplified
157 binary extension of XML for the purpose of storing and manipulating data in a
158 hierarchical form with variable field lengths.")
159 (license license:lgpl2.1)))
161 (define-public libxml2
167 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
171 "07xynh8hcxb2yb1fs051xrgszjvj37wnxvxgsj10rzmqzy9y3zma"))))
172 (build-system gnu-build-system)
173 (outputs '("out" "static"))
175 `(#:phases (modify-phases %standard-phases
176 (add-after 'install 'move-static-libs
177 (lambda* (#:key outputs #:allow-other-keys)
178 (let ((src (string-append (assoc-ref outputs "out") "/lib"))
179 (dst (string-append (assoc-ref outputs "static")
182 (for-each (lambda (ar)
183 (rename-file ar (string-append dst "/"
185 (find-files src "\\.a$"))
187 ;; Remove reference to the static library from the .la
188 ;; file such that Libtool does the right thing when both
189 ;; the shared and static variants are available.
190 (substitute* (string-append src "/libxml2.la")
191 (("^old_library='libxml2.a'") "old_library=''"))
193 (home-page "http://www.xmlsoft.org/")
194 (synopsis "C parser for XML")
195 (inputs `(("xz" ,xz)))
196 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
197 (native-inputs `(("perl" ,perl)))
198 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
199 ;; sub-directory of any given package.
200 (native-search-paths (list (search-path-specification
201 (variable "XML_CATALOG_FILES")
204 (file-pattern "^catalog\\.xml$")
205 (file-type 'regular))))
206 (search-paths native-search-paths)
208 "Libxml2 is the XML C parser and toolkit developed for the Gnome
209 project (but it is usable outside of the Gnome platform).")
210 (license license:x11)))
212 ;; This is the latest stable release.
213 (define-public libxmlplusplus
215 (name "libxmlplusplus")
220 (url "https://github.com/libxmlplusplus/libxmlplusplus.git")
222 (file-name (git-file-name name version))
225 "0wjz591rjlgbah7dcq8i0yn0zw9d62b7g6r0pppx81ic0cx8n8ga"))))
226 (build-system gnu-build-system)
229 (modify-phases %standard-phases
230 (add-after 'unpack 'fix-documentation
231 (lambda* (#:key inputs #:allow-other-keys)
232 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
234 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
235 "/xml/xsl/docbook-xsl-"
236 ,(package-version docbook-xsl))))
237 (substitute* '("examples/dom_xpath/example.xml"
238 "docs/manual/libxml++_without_code.xml")
239 (("http://.*/docbookx\\.dtd")
240 (string-append xmldoc "/docbookx.dtd")))
241 (setenv "SGML_CATALOG_FILES"
242 (string-append xmldoc "/catalog.xml"))
243 (substitute* "docs/manual/docbook-customisation.xsl"
244 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
245 (string-append xsldoc "/html/chunk.xsl"))))
248 `(("libxml2" ,libxml2)))
250 `(("glibmm" ,glibmm)))
252 `(("autoconf" ,autoconf)
253 ("automake" ,automake)
255 ("docbook-xml" ,docbook-xml)
256 ("docbook-xsl" ,docbook-xsl)
257 ("graphviz" ,graphviz) ; for dot
260 ("mm-common" ,mm-common)
262 ("pkg-config" ,pkg-config)))
263 (home-page "https://github.com/libxmlplusplus/libxmlplusplus/")
264 (synopsis "C++ bindings for libxml2")
266 "libxml++ (a.k.a. libxmlplusplus) provides a C++ interface to XML files.
267 It uses libxml2 to access the XML files.")
268 (license license:lgpl2.1+)))
270 ;; This is the last release providing the 2.6 API, hence the name.
271 ;; This is needed by tascam-gtk
272 (define-public libxmlplusplus-2.6
274 (inherit libxmlplusplus)
275 (name "libxmlplusplus")
280 (url "https://github.com/libxmlplusplus/libxmlplusplus.git")
282 (file-name (git-file-name name version))
285 "0gbfi4l88w828gmyc9br11l003ylyi4vigp5d1kfgsn0k4cig3y9"))))))
287 (define-public python-libxml2
288 (package/inherit libxml2
289 (name "python-libxml2")
291 (inherit (package-source libxml2))
292 (patches (cons (search-patch "python-libxml2-utf8.patch")
293 (origin-patches (package-source libxml2))))))
294 (build-system python-build-system)
297 `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
300 (modify-phases %standard-phases
303 (lambda* (#:key inputs #:allow-other-keys)
305 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
306 "cross-libc" "libc")))
307 (libxml2 (assoc-ref inputs "libxml2")))
308 (substitute* "setup.py"
309 ;; For 'libxml2/libxml/tree.h'.
311 (format #f "ROOT = r'~a'" libxml2))
314 (string-append glibc "/include"))))
316 (inputs `(("libxml2" ,libxml2)))
317 (synopsis "Python bindings for the libxml2 library")))
319 (define-public python2-libxml2
320 (package-with-python2 python-libxml2))
322 (define-public libxslt
328 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
332 "0zrzz6kjdyavspzik6fbkpvfpbd25r2qg6py5nnjaabrsr3bvccq"))
333 (patches (search-patches "libxslt-generated-ids.patch"))))
334 (build-system gnu-build-system)
336 `(#:phases (modify-phases %standard-phases
337 (add-before 'check 'disable-fuzz-tests
339 ;; Disable libFuzzer tests, because they require
340 ;; instrumentation builds of libxml2 and libxslt.
341 (substitute* "tests/Makefile"
342 (("exslt plugins fuzz")
345 (home-page "http://xmlsoft.org/XSLT/index.html")
346 (synopsis "C library for applying XSLT stylesheets to XML documents")
347 (inputs `(("libgcrypt" ,libgcrypt)
349 ("python" ,python-minimal-wrapper)
353 `(("pkg-config" ,pkg-config)))
355 "Libxslt is an XSLT C library developed for the GNOME project. It is
356 based on libxml for XML parsing, tree manipulation and XPath support.")
357 (license license:x11)))
359 (define-public perl-graph-readwrite
361 (name "perl-graph-readwrite")
367 "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-"
372 "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh"))))
373 (build-system perl-build-system)
375 `(("perl-graph" ,perl-graph)
376 ("perl-parse-yapp" ,perl-parse-yapp)
377 ("perl-xml-parser" ,perl-xml-parser)
378 ("perl-xml-writer" ,perl-xml-writer)))
379 (home-page "https://metacpan.org/release/Graph-ReadWrite")
380 (synopsis "Modules for reading and writing directed graphs")
381 (description "This is a collection of perl classes for reading and writing
382 directed graphs in a variety of file formats. The graphs are represented in
383 Perl using Jarkko Hietaniemi's @code{Graph} classes.
385 There are two base classes. @code{Graph::Reader} is the base class for classes
386 which read a graph file and create an instance of the Graph class.
387 @code{Graph::Writer} is the base class for classes which take an instance of
388 the @code{Graph} class and write it out in a specific file format.")
389 (license license:perl-license)))
391 (define-public perl-xml-atom
393 (name "perl-xml-atom")
397 (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
398 "XML-Atom-" version ".tar.gz"))
401 "1wa8kfy1w4mg7kzxim4whyprkn48a2il6fap0b947zywknw4c6y6"))))
402 (build-system perl-build-system)
405 (modify-phases %standard-phases
406 (add-before 'check 'set-perl-search-path
409 (string-append (getcwd) ":"
410 (getenv "PERL5LIB")))
413 ;; TODO package: perl-datetime-format-atom
414 `(("perl-html-tagset" ,perl-html-tagset)
415 ("perl-module-build-tiny" ,perl-module-build-tiny)
416 ("perl-module-install" ,perl-module-install)))
418 `(("perl-class-data-inheritable" ,perl-class-data-inheritable)
419 ("perl-datetime" ,perl-datetime)
420 ("perl-datetime-timezone" ,perl-datetime-timezone)
421 ("perl-digest-sha1" ,perl-digest-sha1)
422 ("perl-libwww" ,perl-libwww)
423 ("perl-uri" ,perl-uri)
424 ("perl-xml-libxml" ,perl-xml-libxml)
425 ("perl-xml-xpath" ,perl-xml-xpath)))
426 (home-page "https://metacpan.org/release/XML-Atom")
427 (synopsis "Atom feed and API implementation")
429 "Atom is a syndication, API, and archiving format for weblogs and other data.
430 @code{XML::Atom} implements the feed format as well as a client for the API.")
431 (license license:perl-license)))
433 (define-public perl-xml-descent
435 (name "perl-xml-descent")
439 (uri (string-append "mirror://cpan/authors/id/A/AN/ANDYA/"
440 "XML-Descent-" version ".tar.gz"))
443 "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7"))))
444 (build-system perl-build-system)
446 `(("perl-module-build" ,perl-module-build)))
448 `(("perl-test-differences" ,perl-test-differences)
449 ("perl-xml-tokeparser" ,perl-xml-tokeparser)))
450 (home-page "https://metacpan.org/release/XML-Descent")
451 (synopsis "Recursive descent XML parsing")
453 "The conventional models for parsing XML are either @dfn{DOM}
454 (a data structure representing the entire document tree is created) or
455 @dfn{SAX} (callbacks are issued for each element in the XML).
457 XML grammar is recursive - so it's nice to be able to write recursive
458 parsers for it. @code{XML::Descent} allows such parsers to be created.")
459 (license license:perl-license)))
461 (define-public perl-xml-parser
463 (name "perl-xml-parser")
468 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
472 "0pai3ik47q7rgnix9644c673fwydz52gqkxr9kxwq765j4j36cfk"))))
473 (build-system perl-build-system)
474 (arguments `(#:make-maker-flags
475 (let ((expat (assoc-ref %build-inputs "expat")))
476 (list (string-append "EXPATLIBPATH=" expat "/lib")
477 (string-append "EXPATINCPATH=" expat "/include")))))
478 (inputs `(("expat" ,expat)))
479 (license license:perl-license)
480 (synopsis "Perl bindings to the Expat XML parsing library")
482 "This module provides ways to parse XML documents. It is built on top of
483 XML::Parser::Expat, which is a lower level interface to James Clark's expat
484 library. Each call to one of the parsing methods creates a new instance of
485 XML::Parser::Expat which is then used to parse the document. Expat options
486 may be provided when the XML::Parser object is created. These options are
487 then passed on to the Expat object on each parse call. They can also be given
488 as extra arguments to the parse methods, in which case they override options
489 given at XML::Parser creation time.")
490 (home-page "https://metacpan.org/release/XML-Parser")))
492 (define-public perl-xml-tokeparser
494 (name "perl-xml-tokeparser")
498 (uri (string-append "mirror://cpan/authors/id/P/PO/PODMASTER/"
499 "XML-TokeParser-" version ".tar.gz"))
502 "1hnpwb3lh6cbgwvjjgqzcp6jm4mp612qn6ili38adc9nhkwv8fc5"))))
503 (build-system perl-build-system)
504 (propagated-inputs `(("perl-xml-parser" ,perl-xml-parser)))
505 (home-page "https://metacpan.org/release/XML-TokeParser")
506 (synopsis "Simplified interface to XML::Parser")
508 "@code{XML::TokeParser} provides a procedural (\"pull mode\") interface
509 to @code{XML::Parser} in much the same way that Gisle Aas'
510 @code{HTML::TokeParser} provides a procedural interface to @code{HTML::Parser}.
511 @code{XML::TokeParser} splits its XML input up into \"tokens\", each
512 corresponding to an @code{XML::Parser} event.")
513 (license license:perl-license)))
515 (define-public perl-libxml
522 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
526 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
527 (build-system perl-build-system)
529 `(("perl-xml-parser" ,perl-xml-parser)))
530 (license license:perl-license)
531 (synopsis "Perl modules for working with XML")
533 "libxml-perl is a collection of smaller Perl modules, scripts, and
534 documents for working with XML in Perl. libxml-perl software works in
535 combination with @code{XML::Parser}, PerlSAX, @code{XML::DOM},
536 @code{XML::Grove}, and others.")
537 (home-page "https://metacpan.org/release/libxml-perl")))
539 (define-public perl-xml-libxml
541 (name "perl-xml-libxml")
546 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
547 "XML-LibXML-" version ".tar.gz"))
550 "1ks69xymv6zkj7hvaymjvb78ch81abri7kg4zrwxhdfsqb8a9g7h"))))
551 (build-system perl-build-system)
553 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
554 ("perl-xml-sax" ,perl-xml-sax)))
556 `(("libxml2" ,libxml2)))
557 (home-page "https://metacpan.org/release/XML-LibXML")
558 (synopsis "Perl interface to libxml2")
559 (description "This module implements a Perl interface to the libxml2
560 library which provides interfaces for parsing and manipulating XML files. This
561 module allows Perl programmers to make use of the highly capable validating
562 XML parser and the high performance DOM implementation.")
563 (license license:perl-license)))
565 (define-public perl-xml-libxml-simple
567 (name "perl-xml-libxml-simple")
571 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
572 "XML-LibXML-Simple-" version ".tar.gz"))
575 "0i4ybiqdnvnbfxqslw2y392kvy7i752dl8n99bqiqv5kzk4lbzhl"))))
576 (build-system perl-build-system)
578 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
579 ("perl-xml-libxml" ,perl-xml-libxml)))
580 (home-page "https://metacpan.org/release/XML-LibXML-Simple")
581 (synopsis "XML::LibXML based XML::Simple clone")
583 "This package provides the same API as @code{XML::Simple} but is based on
584 @code{XML::LibXML}.")
585 (license license:perl-license)))
587 (define-public perl-xml-libxslt
589 (name "perl-xml-libxslt")
594 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
595 "XML-LibXSLT-" version ".tar.gz"))
598 "0wyl8klgr65j8y8fzgwz9jlvfjwvxazna8j3dg9gksd2v973fpia"))))
599 (build-system perl-build-system)
601 `(("libxslt" ,libxslt)))
603 `(("perl-xml-libxml" ,perl-xml-libxml)))
604 (home-page "https://metacpan.org/release/XML-LibXSLT")
605 (synopsis "Perl bindings to GNOME libxslt library")
606 (description "This Perl module is an interface to the GNOME project's
608 (license license:perl-license)))
610 (define-public perl-xml-namespacesupport
612 (name "perl-xml-namespacesupport")
617 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
618 "XML-NamespaceSupport-" version ".tar.gz"))
621 "1vz5pbi4lm5fhq2slrs2hlp6bnk29863abgjlcx43l4dky2rbsa7"))))
622 (build-system perl-build-system)
623 (home-page "https://metacpan.org/release/XML-NamespaceSupport")
624 (synopsis "XML namespace support class")
625 (description "This module offers a simple to process namespaced XML
626 names (unames) from within any application that may need them. It also helps
627 maintain a prefix to namespace URI map, and provides a number of basic
629 (license license:perl-license)))
631 (define-public perl-xml-rss
633 (name "perl-xml-rss")
637 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
638 "XML-RSS-" version ".tar.gz"))
641 "03f983l2dnkvcw6iyg1s0xmv5wn793d3kvqlshmhm01ibp7ffvzs"))))
642 (build-system perl-build-system)
644 `(("perl-module-build" ,perl-module-build)
645 ("perl-test-manifest" ,perl-test-manifest)
646 ("perl-test-differences" ,perl-test-differences)
647 ("perl-test-pod" ,perl-test-pod)
648 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
649 ;; XXX: The test which uses this modules does not run, even when it is included
650 ;; it is ignored. ("perl-test-trailingspace" ,perl-test-trailingspace)
652 `(("perl-datetime" ,perl-datetime)
653 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
654 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
655 ("perl-html-parser" ,perl-html-parser)
656 ("perl-xml-parser" ,perl-xml-parser)))
657 (home-page "https://metacpan.org/release/XML-RSS")
658 (synopsis "Creates and updates RSS files")
660 "This module provides a basic framework for creating and maintaining
661 RDF Site Summary (RSS) files. This distribution also contains many examples
662 that allow you to generate HTML from an RSS, convert between 0.9, 0.91, and
663 1.0 version, and more.")
664 (license license:perl-license)))
666 (define-public perl-xml-sax
668 (name "perl-xml-sax")
673 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
674 "XML-SAX-" version ".tar.gz"))
676 (base32 "0am13vnv8qsjafr5ljakwnkhlwpk15sga02z8mxsg9is0j3w61j5"))))
677 (build-system perl-build-system)
679 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
680 ("perl-xml-sax-base" ,perl-xml-sax-base)))
682 `(#:phases (modify-phases %standard-phases
684 'install 'augment-path
685 ;; The install target tries to load the newly-installed
686 ;; XML::SAX module, but can't find it, so we need to tell
687 ;; perl where to look.
688 (lambda* (#:key outputs #:allow-other-keys)
690 (string-append (getenv "PERL5LIB") ":"
691 (assoc-ref outputs "out")
692 "/lib/perl5/site_perl"))
694 (home-page "https://metacpan.org/release/XML-SAX")
695 (synopsis "Perl API for XML")
696 (description "XML::SAX consists of several framework classes for using and
697 building Perl SAX2 XML parsers, filters, and drivers.")
698 (license license:perl-license)))
700 (define-public perl-xml-sax-base
702 (name "perl-xml-sax-base")
707 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
708 "XML-SAX-Base-" version ".tar.gz"))
711 "1l1ai9g1z11ja7mvnfl5mj346r13jyckbg9qlw6c2izglidkbjv6"))))
712 (build-system perl-build-system)
713 (home-page "https://metacpan.org/release/XML-SAX-Base")
714 (synopsis "Base class for SAX Drivers and Filters")
715 (description "This module has a very simple task - to be a base class for
716 PerlSAX drivers and filters. It's default behaviour is to pass the input
717 directly to the output unchanged. It can be useful to use this module as a
718 base class so you don't have to, for example, implement the characters()
720 (license license:perl-license)))
722 (define-public perl-xml-simple
724 (name "perl-xml-simple")
729 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
733 "1y6vh328zrh085d40852v4ij2l4g0amxykswxd1nfhd2pspds7sk"))))
734 (build-system perl-build-system)
736 `(("perl-xml-parser" ,perl-xml-parser)
737 ("perl-xml-sax" ,perl-xml-sax)))
738 (license license:perl-license)
739 (synopsis "Perl module for easy reading/writing of XML files")
741 "The XML::Simple module provides a simple API layer on top of an
742 underlying XML parsing module (either XML::Parser or one of the SAX2
744 (home-page "https://metacpan.org/release/XML-Simple")))
746 (define-public perl-xml-regexp
748 (name "perl-xml-regexp")
753 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
757 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
758 (build-system perl-build-system)
760 `(("perl-xml-parser" ,perl-xml-parser)))
761 (license license:perl-license)
762 (synopsis "Perl regular expressions for XML tokens")
764 "XML::RegExp contains regular expressions for the following XML tokens:
765 BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
766 EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
767 (home-page "https://metacpan.org/release/XML-RegExp")))
769 (define-public perl-xml-dom
771 (name "perl-xml-dom")
776 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
780 "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb"))))
781 (build-system perl-build-system)
783 `(("perl-libwww" ,perl-libwww)
784 ("perl-libxml" ,perl-libxml)
785 ("perl-xml-parser" ,perl-xml-parser)
786 ("perl-xml-regexp" ,perl-xml-regexp)))
787 (license license:perl-license)
789 "Perl module for building DOM Level 1 compliant document structures")
791 "This module extends the XML::Parser module by Clark Cooper. The
792 XML::Parser module is built on top of XML::Parser::Expat, which is a lower
793 level interface to James Clark's expat library. XML::DOM::Parser is derived
794 from XML::Parser. It parses XML strings or files and builds a data structure
795 that conforms to the API of the Document Object Model.")
796 (home-page "https://metacpan.org/release/XML-DOM")))
798 (define-public perl-xml-compile-tester
800 (name "perl-xml-compile-tester")
804 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
805 "XML-Compile-Tester-" version ".tar.gz"))
808 "1drzwziwi96rfkh48qpw4l225mcbk8ppl2157nj92cslcpwwdk75"))))
809 (build-system perl-build-system)
811 `(("perl-log-report" ,perl-log-report)
812 ("perl-test-deep" ,perl-test-deep)))
813 (home-page "https://metacpan.org/release/XML-Compile-Tester")
814 (synopsis "XML::Compile related regression testing")
816 "The @code{XML::Compile} module suite has extensive regression testing.
817 This module provide functions which simplify writing tests for
818 @code{XML::Compile} related distributions.")
819 (license license:perl-license)))
821 (define-public perl-xml-compile
823 (name "perl-xml-compile")
827 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
828 "XML-Compile-" version ".tar.gz"))
831 "0psr5pwsk2biz2bfkigmx04v2rfhs6ybwcfmcrrg7gvh9bpp222b"))))
832 (build-system perl-build-system)
834 `(("perl-carp" ,perl-carp)
835 ("perl-log-report" ,perl-log-report)
836 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
837 ("perl-xml-libxml" ,perl-xml-libxml)
838 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
839 ("perl-test-deep" ,perl-test-deep)
840 ("perl-types-serialiser" ,perl-types-serialiser)))
841 (home-page "https://metacpan.org/release/XML-Compile")
842 (synopsis "Compilation-based XML processing")
844 "@code{XML::Compile} can be used to translate a Perl data-structure into
845 XML or XML into a Perl data-structure, both directions under rigid control by
847 (license license:perl-license)))
849 (define-public perl-xml-compile-cache
851 (name "perl-xml-compile-cache")
855 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
856 "XML-Compile-Cache-" version ".tar.gz"))
859 "181qf1s7ymgi7saph3cf9p6dbxkxyh1ja23na4dchhi8v5mi66sr"))))
860 (build-system perl-build-system)
862 `(("perl-log-report" ,perl-log-report)
863 ("perl-xml-compile" ,perl-xml-compile)
864 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
865 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)))
866 (home-page "https://metacpan.org/release/XML-Compile-Cache")
867 (synopsis "Cache compiled XML translators")
869 "This package provides methods to cache compiled XML translators.")
870 (license license:perl-license)))
872 (define-public perl-xml-compile-soap
874 (name "perl-xml-compile-soap")
878 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
879 "XML-Compile-SOAP-" version ".tar.gz"))
882 "0pkcph562l2ij7rlwlvm58v6y062qsbydfpaz2qnph2ixqy0xfd1"))))
883 (build-system perl-build-system)
885 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
886 ("perl-libwww" ,perl-libwww)
887 ("perl-log-report" ,perl-log-report)
888 ("perl-xml-compile" ,perl-xml-compile)
889 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
890 ("perl-xml-compile-tester" ,perl-xml-compile-tester)))
891 (home-page "https://metacpan.org/release/XML-Compile-SOAP")
892 (synopsis "Base-class for SOAP implementations")
894 "This module provides a class to handle the SOAP protocol. The first
895 implementation is @url{SOAP1.1,
896 http://www.w3.org/TR/2000/NOTE-SOAP-20000508/}, which is still most often
898 (license license:perl-license)))
900 (define-public perl-xml-compile-wsdl11
902 (name "perl-xml-compile-wsdl11")
906 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
907 "XML-Compile-WSDL11-" version ".tar.gz"))
910 "09ayl442hzvn97q4ghn5rz4r82dm9w3l69hixhb29h9xq9ysi7ba"))))
911 (build-system perl-build-system)
913 `(("perl-log-report" ,perl-log-report)
914 ("perl-xml-compile" ,perl-xml-compile)
915 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
916 ("perl-xml-compile-soap" ,perl-xml-compile-soap)))
917 (home-page "https://metacpan.org/release/XML-Compile-WSDL11")
918 (synopsis "Create SOAP messages defined by WSDL 1.1")
920 "This module understands WSDL version 1.1. A WSDL file defines a set of
921 messages to be send and received over SOAP connections. This involves
922 encoding of the message to be send into XML, sending the message to the
923 server, collect the answer, and finally decoding the XML to Perl.")
924 (license license:perl-license)))
926 (define-public perl-xml-feed
928 (name "perl-xml-feed")
932 (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
933 "XML-Feed-" version ".tar.gz"))
936 "1z1a88bpy64j42bbyl8acbfl3dn9iaz47gx6clkgy5sbn4kr0kgk"))))
937 (build-system perl-build-system)
939 `(("perl-module-build" ,perl-module-build)
940 ("perl-uri" ,perl-uri)
941 ("perl-class-data-inheritable" ,perl-class-data-inheritable)))
943 `(("perl-class-errorhandler" ,perl-class-errorhandler)
944 ("perl-datetime" ,perl-datetime)
945 ("perl-datetime-format-flexible" ,perl-datetime-format-flexible)
946 ("perl-datetime-format-iso8601" ,perl-datetime-format-iso8601)
947 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
948 ("perl-datetime-format-natural" ,perl-datetime-format-natural)
949 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
950 ("perl-feed-find" ,perl-feed-find)
951 ("perl-html-parser" ,perl-html-parser)
952 ("perl-libwww-perl" ,perl-libwww)
953 ("perl-module-pluggable" ,perl-module-pluggable)
954 ("perl-uri-fetch" ,perl-uri-fetch)
955 ("perl-xml-atom" ,perl-xml-atom)
956 ("perl-xml-libxml" ,perl-xml-libxml)
957 ("perl-xml-rss" ,perl-xml-rss)))
958 (home-page "https://metacpan.org/release/XML-Feed")
959 (synopsis "XML Syndication Feed Support")
960 (description "@code{XML::Feed} is a syndication feed parser for both RSS and
961 Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI.
962 @code{XML::Feed} supports the following syndication feed formats:
963 RSS 0.91, RSS 1.0, RSS 2.0, Atom")
964 (license license:perl-license)))
966 (define-public perl-xml-xpath
968 (name "perl-xml-xpath")
972 (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
973 "XML-XPath-" version ".tar.gz"))
976 "03yxj7w5a43ibbpiqsvb3lswj2b71dydsx4rs2fw0p8n0l3i3j8w"))))
977 (build-system perl-build-system)
979 `(("perl-path-tiny" ,perl-path-tiny)))
981 `(("perl-xml-parser" ,perl-xml-parser)))
982 (home-page "https://metacpan.org/release/XML-XPath")
983 (synopsis "Parse and evaluate XPath statements")
985 "This module aims to comply exactly to the @url{XPath specification,
986 https://www.w3.org/TR/xpath} and yet allow extensions to be added in
987 the form of functions.")
988 (license license:perl-license)))
990 (define-public pugixml
997 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
998 version "/pugixml-" version ".tar.gz"))
1000 (base32 "02l7nllhydggf7s64d2x84kckbmwag4lsn28sc82953hnkxrkwsm"))))
1001 (build-system cmake-build-system)
1003 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
1004 #:tests? #f)) ; no tests
1006 `(("pkg-config" ,pkg-config)))
1007 (home-page "https://pugixml.org")
1008 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
1010 "pugixml is a C++ XML processing library, which consists of a DOM-like
1011 interface with rich traversal/modification capabilities, a fast XML parser
1012 which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
1013 implementation for complex data-driven tree queries. Full Unicode support is
1014 also available, with Unicode interface variants and conversions between
1015 different Unicode encodings which happen automatically during
1017 (license license:expat)))
1019 (define-public python-pyxb
1021 (name "python-pyxb")
1025 (uri (pypi-uri "PyXB" version))
1028 "1d17pyixbfvjyi2lb0cfp0ch8wwdf44mmg3r5pwqhyyqs66z601a"))))
1029 (build-system python-build-system)
1030 (home-page "http://pyxb.sourceforge.net/")
1031 (synopsis "Python XML Schema Bindings")
1033 "PyXB (\"pixbee\") is a pure Python package that generates Python source
1034 code for classes that correspond to data structures defined by XMLSchema.")
1035 (license (list license:asl2.0 ; Most files.
1036 license:expat ; pyxb/utils/six.py
1037 license:gpl2 ; bundled jquery in doc is dual MIT/GPL2
1038 license:psfl)))) ; pyxb/utils/activestate.py
1040 (define-public python2-pyxb
1041 (package-with-python2 python-pyxb))
1043 (define-public xmlto
1050 ;; The old source on fedorahosted.org is offline permanently:
1051 ;; <https://bugs.gnu.org/25989>
1052 (uri (string-append "mirror://debian/pool/main/x/xmlto/"
1053 "xmlto_" version ".orig.tar.bz2"))
1054 (file-name (string-append name "-" version ".tar.bz2"))
1057 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
1058 (build-system gnu-build-system)
1060 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
1061 '(#:configure-flags (list (string-append "GETOPT="
1062 (assoc-ref %build-inputs
1066 `(("util-linux" ,util-linux)))
1068 `(("util-linux" ,util-linux) ; for 'getopt'
1069 ("libxml2" ,libxml2) ; for 'xmllint'
1070 ("libxslt" ,libxslt))) ; for 'xsltproc'
1071 (home-page "http://cyberelk.net/tim/software/xmlto/")
1072 (synopsis "Front-end to an XSL toolchain")
1074 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
1075 stylesheet for the conversion you want and applies it using an external
1076 XSL-T processor. It also performs any necessary post-processing.")
1077 (license license:gpl2+)))
1079 (define-public xmlsec
1085 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
1086 "xmlsec1-" version ".tar.gz"))
1089 "1j5bf7ni45jghyrbf7a14wx2pvfara557zyry7g7h8840c5kd11d"))))
1090 (build-system gnu-build-system)
1091 (propagated-inputs ; according to xmlsec1.pc
1092 `(("libxml2" ,libxml2)
1093 ("libxslt" ,libxslt)))
1095 `(("gnutls" ,gnutls)
1096 ("libgcrypt" ,libgcrypt)
1097 ("libltdl" ,libltdl)))
1099 `(("pkg-config" ,pkg-config)))
1100 (home-page "https://www.aleksey.com/xmlsec/")
1101 (synopsis "XML Security Library")
1103 "The XML Security Library is a C library based on Libxml2. It
1104 supports XML security standards such as XML Signature, XML Encryption,
1105 Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
1107 (license (license:x11-style "file://COPYING"
1108 "See 'COPYING' in the distribution."))))
1110 (define-public xmlsec-nss
1116 `(("nss:bin" ,nss "bin") ; for certutil
1117 ,@(package-native-inputs xmlsec)))
1120 ("libltdl" ,libltdl)))
1121 (synopsis "XML Security Library (using NSS instead of GnuTLS)")))
1123 (define-public minixml
1129 (uri (string-append "https://github.com/michaelrsweet/mxml/"
1130 "releases/download/v" version
1131 "/mxml-" version ".tar.gz"))
1134 "0kq3wiycb40dcyswvajrqb1n5ffm5xcnsfxxaml92vhpl6x57yvb"))))
1135 (build-system gnu-build-system)
1138 (list (string-append "LDFLAGS=-Wl,-rpath="
1139 (assoc-ref %outputs "out") "/lib"))
1140 #:tests? #f)) ; tests are run during build
1141 (home-page "https://michaelrsweet.github.io/mxml")
1142 (synopsis "Small XML parsing library")
1144 "Mini-XML is a small C library to read and write XML files and strings in
1145 UTF-8 and UTF-16 encoding.")
1146 ;; LGPL 2.0+ with additional exceptions for static linking
1147 (license license:lgpl2.0+)))
1149 ;; TinyXML is an unmaintained piece of software, so the patches and build
1150 ;; system massaging have no upstream potential.
1151 (define-public tinyxml
1157 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
1159 (string-join (string-split version #\.) "_")
1161 (file-name (string-append name "-" version ".tar.gz"))
1164 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
1165 (patches (search-patches "tinyxml-use-stl.patch"))))
1166 (build-system gnu-build-system)
1167 ;; This library is missing *a lot* of the steps to make it usable, so we
1168 ;; have to add them here, like every other distro must do.
1171 (modify-phases %standard-phases
1173 (add-after 'build 'build-shared-library
1175 (invoke "g++" "-Wall" "-O2" "-shared" "-fpic"
1176 "tinyxml.cpp" "tinyxmlerror.cpp"
1177 "tinyxmlparser.cpp" "tinystr.cpp"
1178 "-o" "libtinyxml.so")))
1180 (lambda _ (invoke "./xmltest")))
1182 (lambda* (#:key outputs #:allow-other-keys)
1183 (let* ((out (assoc-ref outputs "out"))
1184 (include (string-append out "/include"))
1185 (lib (string-append out "/lib"))
1186 (pkgconfig (string-append out "/lib/pkgconfig"))
1187 (doc (string-append out "/share/doc")))
1188 ;; Install libs and headers.
1189 (install-file "libtinyxml.so" lib)
1190 (install-file "tinystr.h" include)
1191 (install-file "tinyxml.h" include)
1192 ;; Generate and install pkg-config file.
1194 ;; Software such as Kodi expect this file to be present, but
1195 ;; it's not provided in the source code.
1196 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
1198 (format port "prefix=~a
1199 exec_prefix=${prefix}
1200 libdir=${exec_prefix}/lib
1201 includedir=${prefix}/include
1204 Description: A simple, small, C++ XML parser
1206 Libs: -L${libdir} -ltinyxml
1207 Cflags: -I${includedir}
1212 (copy-recursively "docs" (string-append doc "tinyxml"))
1214 (synopsis "Small XML parser for C++")
1215 (description "TinyXML is a small and simple XML parsing library for the
1216 C++ programming language.")
1217 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
1218 (license license:zlib)))
1220 (define-public tinyxml2
1228 (url "https://github.com/leethomason/tinyxml2")
1230 (file-name (git-file-name name version))
1232 (base32 "0raa8r2hsagk7gjlqjwax95ib8d47ba79n91r4aws2zg8y6ssv1d"))))
1233 (build-system cmake-build-system)
1234 (synopsis "Small XML parser for C++")
1235 (description "TinyXML2 is a small and simple XML parsing library for the
1236 C++ programming language.")
1237 (home-page "http://www.grinninglizard.com/tinyxml2/")
1238 (license license:zlib)))
1240 (define-public xmlstarlet
1247 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1248 version "/xmlstarlet-" version ".tar.gz"))
1251 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1252 (build-system gnu-build-system)
1255 (modify-phases %standard-phases
1256 (add-before 'check 'drop-failing-tests
1258 ;; FIXME: Why are these tests failing.
1259 (substitute* "Makefile"
1260 (("^examples/schema1\\\\") "\\")
1261 (("^examples/valid1\\\\") "\\"))
1264 `(("libxslt" ,libxslt)
1265 ("libxml2" ,libxml2)))
1266 (home-page "http://xmlstar.sourceforge.net/")
1267 (synopsis "Command line XML toolkit")
1268 (description "XMLStarlet is a set of command line utilities which can be
1269 used to transform, query, validate, and edit XML documents. XPath is used to
1270 match and extract data, and elements can be added, deleted or modified using
1272 (license license:x11)))
1274 (define-public html-xml-utils
1276 (name "html-xml-utils")
1282 "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-"
1285 (base32 "0gs3xvdbzhk5k12i95p5d4fgkkaldnlv45sch7pnncb0lrpcjsnq"))))
1286 (build-system gnu-build-system)
1287 (home-page "https://www.w3.org/Tools/HTML-XML-utils/")
1288 (synopsis "Command line utilities to manipulate HTML and XML files")
1289 (description "HTML-XML-utils provides a number of simple utilities for
1290 manipulating and converting HTML and XML files in various ways. The suite
1291 consists of the following tools:
1294 @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} entities
1295 @item @command{xml2asc} convert from @code{&#nnn;} entities to @code{UTF-8}
1296 @item @command{hxaddid} add IDs to selected elements
1297 @item @command{hxcite} replace bibliographic references by hyperlinks
1298 @item @command{hxcite} mkbib - expand references and create bibliography
1299 @item @command{hxclean} apply heuristics to correct an HTML file
1300 @item @command{hxcopy} copy an HTML file while preserving relative links
1301 @item @command{hxcount} count elements and attributes in HTML or XML files
1302 @item @command{hxextract} extract selected elements
1303 @item @command{hxincl} expand included HTML or XML files
1304 @item @command{hxindex} create an alphabetically sorted index
1305 @item @command{hxmkbib} create bibliography from a template
1306 @item @command{hxmultitoc} create a table of contents for a set of HTML files
1307 @item @command{hxname2id} move some @code{ID=} or @code{NAME=} from A
1308 elements to their parents
1309 @item @command{hxnormalize} pretty-print an HTML file
1310 @item @command{hxnsxml} convert output of hxxmlns back to normal XML
1311 @item @command{hxnum} number section headings in an HTML file
1312 @item @command{hxpipe} convert XML to a format easier to parse with Perl or AWK
1313 @item @command{hxprintlinks} number links and add table of URLs at end of an HTML file
1314 @item @command{hxprune} remove marked elements from an HTML file
1315 @item @command{hxref} generate cross-references
1316 @item @command{hxselect} extract elements that match a (CSS) selector
1317 @item @command{hxtoc} insert a table of contents in an HTML file
1318 @item @command{hxuncdata} replace CDATA sections by character entities
1319 @item @command{hxunent} replace HTML predefined character entities to @code{UTF-8}
1320 @item @command{hxunpipe} convert output of pipe back to XML format
1321 @item @command{hxunxmlns} replace \"global names\" by XML Namespace prefixes
1322 @item @command{hxwls} list links in an HTML file
1323 @item @command{hxxmlns} replace XML Namespace prefixes by \"global names\"
1326 (license license:expat)))
1328 (define-public xlsx2csv
1336 (url "https://github.com/dilshod/xlsx2csv")
1338 (file-name (git-file-name name version))
1340 (base32 "168dm6p7w6pvgd87yb9hcxv9y0liv6mxgril202nfva68cp8y939"))))
1341 (build-system python-build-system)
1343 `(#:python ,python-2 ; use python-2 for the test script
1345 (modify-phases %standard-phases
1348 (substitute* "test/run"
1349 ;; Run tests with `python' only.
1350 (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
1351 (invoke "test/run"))))))
1352 (home-page "https://github.com/dilshod/xlsx2csv")
1353 (synopsis "XLSX to CSV converter")
1355 "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
1356 XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
1357 files. It is designed to be fast and to handle large input files.")
1358 (license license:gpl2+)))
1360 (define-public python-defusedxml
1362 (name "python-defusedxml")
1367 (uri (pypi-uri "defusedxml" version))
1370 "1xbp8fivl3wlbyg2jrvs4lalaqv1xp9a9f29p75wdx2s2d6h717n"))))
1371 (build-system python-build-system)
1372 (home-page "https://bitbucket.org/tiran/defusedxml")
1373 (synopsis "XML bomb protection for Python stdlib modules")
1375 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1376 (license license:psfl)))
1378 (define-public python2-defusedxml
1379 (package-with-python2 python-defusedxml))
1381 (define-public freexl
1387 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1388 "freexl-" version ".tar.gz"))
1391 "08pwj17l0lgp6zms9nmpawdxpvhzrslklbd53s4b430k7mxbbs1x"))))
1392 (build-system gnu-build-system)
1393 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1394 (synopsis "Read Excel files")
1396 "FreeXL is a C library to extract valid data from within an Excel (.xls)
1398 ;; Any of these licenses may be picked.
1399 (license (list license:gpl2+
1403 (define-public xerces-c
1409 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1410 "xerces-c-" version ".tar.xz"))
1413 "0jf1khvlssg31vkxbc25dxjxcxm56xb8nywj1sypj6hxzjlrkz0j"))))
1414 (build-system gnu-build-system)
1416 (let ((system (or (%current-target-system)
1417 (%current-system))))
1418 (if (string-prefix? "x86_64" system)
1420 '(#:configure-flags '("--disable-sse2")))))
1423 (home-page "https://xerces.apache.org/xerces-c/")
1424 (synopsis "Validating XML parser library for C++")
1425 (description "Xerces-C++ is a validating XML parser written in a portable
1426 subset of C++. Xerces-C++ makes it easy to give your application the ability
1427 to read and write XML data. A shared library is provided for parsing,
1428 generating, manipulating, and validating XML documents using the DOM, SAX, and
1430 (license license:asl2.0)))
1432 (define-public xlsxio
1440 (url "https://github.com/brechtsanders/xlsxio")
1442 (file-name (git-file-name name version))
1444 (base32 "0j8jral3yc2aib2ykp527lyb62a1d9p7qmfbszy7iy3s65pkma9b"))))
1448 ("minizip" ,minizip)
1450 (build-system gnu-build-system)
1453 (modify-phases %standard-phases
1457 (lambda* (#:key outputs #:allow-other-keys)
1458 (invoke "make" "install"
1460 "PREFIX=" (assoc-ref outputs "out"))))))))
1461 (synopsis "C library for reading and writing .xlsx files")
1462 (description "XLSX I/O aims to provide a C library for reading and writing
1463 .xlsx files. The .xlsx file format is the native format used by Microsoft(R)
1464 Excel(TM) since version 2007.")
1465 (home-page "https://github.com/brechtsanders/xlsxio")
1466 (license license:expat)))
1468 (define-public java-simple-xml
1470 (name "java-simple-xml")
1474 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
1478 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))
1479 (patches (search-patches "java-simple-xml-fix-tests.patch"))))
1480 (build-system ant-build-system)
1482 `(#:build-target "build"
1483 #:test-target "test"
1485 (modify-phases %standard-phases
1486 (replace 'install (install-jars "jar")))))
1488 `(("unzip" ,unzip)))
1489 (home-page "http://simple.sourceforge.net/")
1490 (synopsis "XML serialization framework for Java")
1491 (description "Simple is a high performance XML serialization and
1492 configuration framework for Java. Its goal is to provide an XML framework
1493 that enables rapid development of XML configuration and communication systems.
1494 This framework aids the development of XML systems with minimal effort and
1495 reduced errors. It offers full object serialization and deserialization,
1496 maintaining each reference encountered.")
1497 (license license:asl2.0)))
1499 (define-public perl-xml-xpathengine
1501 (name "perl-xml-xpathengine")
1505 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1506 "XML-XPathEngine-" version ".tar.gz"))
1509 "0r72na14bmsxfd16s9nlza155amqww0k8wsa9x2a3sqbpp5ppznj"))))
1510 (build-system perl-build-system)
1511 (home-page "https://metacpan.org/release/XML-XPathEngine")
1512 (synopsis "Re-usable XPath engine for DOM-like trees")
1514 "This module provides an XPath engine, that can be re-used by other
1515 modules/classes that implement trees.
1517 In order to use the XPath engine, nodes in the user module need to mimic DOM
1518 nodes. The degree of similitude between the user tree and a DOM dictates how
1519 much of the XPath features can be used. A module implementing all of the DOM
1520 should be able to use this module very easily (you might need to add the
1521 @code{cmp} method on nodes in order to get ordered result sets).")
1522 (license license:perl-license)))
1524 (define-public perl-tree-xpathengine
1526 (name "perl-tree-xpathengine")
1530 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1531 "Tree-XPathEngine-" version ".tar.gz"))
1534 "1vbbw8wxm79r3xbra8narw1dqvm34510q67wbmg2zmj6zd1k06r9"))))
1535 (build-system perl-build-system)
1536 (home-page "https://metacpan.org/release/Tree-XPathEngine")
1537 (synopsis "Re-usable XPath engine")
1539 "This module provides an XPath engine, that can be re-used by other
1540 module/classes that implement trees. It is designed to be compatible with
1541 @code{Class::XPath}, ie it passes its tests if you replace @code{Class::XPath}
1542 by @code{Tree::XPathEngine}.")
1543 (license license:perl-license)))
1545 (define-public perl-xml-filter-buffertext
1547 (name "perl-xml-filter-buffertext")
1552 (uri (string-append "mirror://cpan/authors/id/R/RB/RBERJON/"
1553 "XML-Filter-BufferText-" version ".tar.gz"))
1556 "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg"))))
1557 (build-system perl-build-system)
1559 `(("perl-xml-sax-base" ,perl-xml-sax-base)))
1560 (home-page "https://metacpan.org/release/XML-Filter-BufferText")
1561 (synopsis "Filter to put all characters() in one event")
1562 (description "This is a very simple filter. One common cause of
1563 grief (and programmer error) is that XML parsers aren't required to provide
1564 character events in one chunk. They can, but are not forced to, and most
1565 don't. This filter does the trivial but oft-repeated task of putting all
1566 characters into a single event.")
1567 (license license:perl-license)))
1569 (define-public perl-xml-sax-writer
1571 (name "perl-xml-sax-writer")
1576 "mirror://cpan/authors/id/P/PE/PERIGRIN/"
1577 "XML-SAX-Writer-" version ".tar.gz"))
1580 "1w1cd1ybxdvhmnxdlkywi3x5ka3g4md42kyynksjc09vyizd0q9x"))))
1581 (build-system perl-build-system)
1583 `(("perl-libxml" ,perl-libxml)
1584 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1585 ("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
1586 ("perl-xml-sax-base" ,perl-xml-sax-base)))
1587 (home-page "https://metacpan.org/release/XML-SAX-Writer")
1588 (synopsis "SAX2 XML Writer")
1590 "This is an XML writer that understands SAX2. It is based on
1591 @code{XML::Handler::YAWriter}.")
1592 (license license:perl-license)))
1594 (define-public perl-xml-handler-yawriter
1596 (name "perl-xml-handler-yawriter")
1601 (uri (string-append "mirror://cpan/authors/id/K/KR/KRAEHE/"
1602 "XML-Handler-YAWriter-" version ".tar.gz"))
1605 "11d45a1sz862va9rry3p2m77pwvq3kpsvgwhc5ramh9mbszbnk77"))))
1606 (build-system perl-build-system)
1608 `(("perl-libxml" ,perl-libxml)))
1609 (home-page "https://metacpan.org/release/XML-Handler-YAWriter")
1610 (synopsis "Yet another Perl SAX XML Writer")
1611 (description "YAWriter implements Yet Another @code{XML::Handler::Writer}.
1612 It provides a flexible escaping technique and pretty printing.")
1613 (license license:perl-license)))
1615 (define-public perl-xml-twig
1617 (name "perl-xml-twig")
1621 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1622 "XML-Twig-" version ".tar.gz"))
1625 "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy"))))
1626 (build-system perl-build-system)
1628 `(("expat" ,expat)))
1630 `(("perl-html-tidy" ,perl-html-tidy)
1631 ("perl-html-tree" ,perl-html-tree)
1632 ("perl-io-captureoutput" ,perl-io-captureoutput)
1633 ("perl-io-string" ,perl-io-string)
1634 ("perl-io-stringy" ,perl-io-stringy)
1635 ("perl-libxml" ,perl-libxml)
1636 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1637 ("perl-xml-handler-yawriter" ,perl-xml-handler-yawriter)
1638 ("perl-xml-parser" ,perl-xml-parser)
1639 ("perl-xml-sax-writer" ,perl-xml-sax-writer)
1640 ("perl-xml-simple" ,perl-xml-simple)
1641 ("perl-xml-xpathengine" ,perl-xml-xpathengine)
1642 ("perl-test-pod" ,perl-test-pod)
1643 ("perl-tree-xpathengine" ,perl-tree-xpathengine)))
1644 (home-page "https://metacpan.org/release/XML-Twig")
1645 (synopsis "Perl module for processing huge XML documents in tree mode")
1646 (description "@code{XML::Twig} is an XML transformation module. Its
1647 strong points: can be used to process huge documents while still being in tree
1648 mode; not bound by DOM or SAX, so it is very perlish and offers a very
1649 comprehensive set of methods; simple to use; DWIMs as much as possible.
1651 What it doesn't offer: full SAX support (it can export SAX, but only reads
1652 XML), full XPath support (unless you use @code{XML::Twig::XPath}), nor DOM
1654 (license license:perl-license)))
1656 ;; TODO: Debian builds several jars out of this: jaxp-1.4.jar,
1657 ;; xml-apis.jar and xml-apis-1.4.01.jar.
1658 (define-public java-jaxp
1665 (uri (string-append "mirror://apache/xerces/xml-commons/source/"
1666 "xml-commons-external-" version "-src.tar.gz"))
1668 (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk"))))
1669 (build-system ant-build-system)
1671 `(#:jar-name "jaxp.jar"
1674 #:tests? #f)); no tests
1675 (home-page "http://xerces.apache.org/xml-commons/")
1676 (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)")
1677 (description "Jaxp from the Apache XML Commons project is used by
1678 the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs:
1681 @item Document Object Model (DOM)
1682 @item Simple API for XML (SAX)
1683 @item Java APIs for XML Processing (JAXP)
1684 @item Transformation API for XML (TrAX)
1685 @item Document Object Model (DOM) Load and Save
1686 @item JSR 206 Java API for XML Processing
1688 (license (list license:asl2.0
1689 license:w3c ;; Files under org.w3c
1690 license:public-domain)))) ;; org.xml.sax
1692 (define-public java-apache-xml-commons-resolver
1694 (name "java-apache-xml-commons-resolver")
1699 (uri (string-append "mirror://apache/xerces/xml-commons/"
1700 "xml-commons-resolver-" version ".tar.gz"))
1702 (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm"))
1703 (modules '((guix build utils)))
1706 (for-each delete-file (find-files "." ".*\\.(jar|zip)"))
1708 (build-system ant-build-system)
1710 `(#:jar-name (string-append "xml-resolver.jar")
1711 #:tests? #f)); no tests
1713 `(("java-junit" ,java-junit)))
1714 (home-page "http://xerces.apache.org/xml-commons/")
1715 (synopsis "Catalog-based entity and URI resolution")
1716 (description "The resolver class implements the full semantics of OASIS Technical
1717 Resolution 9401:1997 (Amendment 2 to TR 9401) catalogs and the 06 Aug
1718 2001 Committee Specification of OASIS XML Catalogs.
1720 It also includes a framework of classes designed to read catalog files
1721 in a number of formats:
1724 @item The plain-text flavor described by TR9401.
1725 @item The XCatalog XML format defined by John Cowan
1726 @item The XML Catalog format defined by the OASIS Entity Resolution
1727 Technical Committee.
1729 (license license:asl2.0)))
1731 ;; Jaxen requires java-dom4j and java-xom that in turn require jaxen.
1732 ;; This package is a bootstrap version without dependencies on dom4j and xom.
1733 (define java-jaxen-bootstrap
1735 (name "java-jaxen-bootstrap")
1739 ;; No release on github
1740 (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/"
1741 version "/jaxen-" version "-sources.jar"))
1744 "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx"))))
1745 (build-system ant-build-system)
1747 `(#:jar-name "jaxen.jar"
1749 #:tests? #f; no tests
1751 (modify-phases %standard-phases
1752 (add-before 'build 'remove-dom4j
1754 (delete-file-recursively "src/org/jaxen/dom4j")
1755 (delete-file-recursively "src/org/jaxen/xom")
1758 `(("java-jdom" ,java-jdom)))
1759 (home-page "https://github.com/jaxen-xpath/jaxen")
1760 (synopsis "XPath library")
1761 (description "Jaxen is an XPath library written in Java. It is adaptable
1762 to many different object models, including DOM, XOM, dom4j, and JDOM. It is
1763 also possible to write adapters that treat non-XML trees such as compiled
1764 Java byte code or Java beans as XML, thus enabling you to query these trees
1766 (license license:bsd-3)))
1768 (define-public java-jaxen
1770 (inherit java-jaxen-bootstrap)
1773 `(("java-jdom" ,java-jdom)
1774 ("java-xom" ,java-xom)
1775 ("java-dom4j" ,java-dom4j)))))
1777 (define-public java-xom
1784 (url "https://github.com/elharo/xom")
1785 (commit (string-append "XOM_" version))))
1786 (file-name (git-file-name name version))
1789 "1jh6y03g5zzdhsb5jm6ms1xnamr460qmn96y3w6aw0ikfwqlg0bq"))
1790 (modules '((guix build utils)))
1793 (for-each delete-file
1794 (find-files "." "\\.jar$"))
1796 (build-system ant-build-system)
1798 `(#:jar-name "xom.jar"
1800 #:tests? #f ; no tests
1802 (modify-phases %standard-phases
1803 (add-after 'unpack 'make-git-checkout-writable
1805 (for-each make-file-writable (find-files "."))
1807 (add-before 'configure 'fix-tagsoup-dep
1809 ;; FIXME: Where is tagsoup source?
1810 (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java")
1813 `(("java-jdom" ,java-jdom)
1814 ("java-junit" ,java-junit)
1815 ("java-classpathx-servletapi" ,java-classpathx-servletapi)
1816 ("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
1817 ("java-xerces" ,java-xerces)))
1818 (home-page "https://xom.nu/")
1819 (synopsis "XML Object Model")
1820 (description "XOM is a new XML Object Model for processing XML with Java
1821 that strives for correctness and simplicity.")
1823 (license license:lgpl2.1)))
1825 (define-public java-xsdlib
1827 (name "java-xsdlib")
1831 (uri (string-append "https://repo1.maven.org/maven2/com/sun/msv/"
1832 "datatype/xsd/xsdlib/" version "/xsdlib-"
1833 version "-sources.jar"))
1836 "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim"))))
1837 (build-system ant-build-system)
1839 `(#:tests? #f; no tests
1840 #:jar-name "xsdlib.jar"
1843 `(("java-xerces" ,java-xerces)))
1844 (home-page (string-append "https://web.archive.org/web/20161127144537/"
1845 "https://msv.java.net//"))
1846 (synopsis "Sun Multi-Schema Validator")
1847 (description "Xsdlib contains an implementation of sun.com.msv, an XML
1849 (license license:bsd-2)))
1851 (define-public java-xpp3
1857 (uri (string-append "http://www.extreme.indiana.edu/dist/"
1858 "java-repository/xpp3/distributions/xpp3-"
1859 version "_src.tgz"))
1862 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
1863 (modules '((guix build utils)))
1865 '(begin ;; Delete bundled jar archives.
1866 (for-each delete-file (find-files "." ".*\\.jar"))
1868 (build-system ant-build-system)
1870 `(#:tests? #f; no tests
1871 #:build-target "jar"
1873 (modify-phases %standard-phases
1874 (replace 'install (install-jars "build")))))
1875 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
1876 (synopsis "Streaming pull XML parser")
1877 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
1878 parser and should be used when there is a need to process quickly and
1879 efficiently all input elements (for example in SOAP processors). This
1880 package is a stable XmlPull parsing engine that is based on ideas from XPP
1881 and in particular XPP2 but completely revised and rewritten to take the best
1882 advantage of JIT JVMs.")
1883 (license (license:non-copyleft "file://LICENSE.txt"))))
1885 (define-public java-xmlpull2
1887 (name "java-xmlpull2")
1891 (uri (string-append "http://www.extreme.indiana.edu/xgws/xsoap/"
1892 "PullParser/PullParser" version ".tgz"))
1895 "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md"))
1896 (modules '((guix build utils)))
1898 '(begin ;; Delete bundled jar archives.
1899 (for-each delete-file (find-files "." ".*\\.jar"))
1901 (build-system ant-build-system)
1903 `(#:tests? #f; no tests
1904 #:build-target "impl"
1906 (modify-phases %standard-phases
1907 (replace 'install (install-jars "build/lib")))))
1908 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
1909 (synopsis "Streaming pull XML parser")
1910 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
1911 parser and should be used when there is a need to process quickly and
1912 efficiently all input elements (for example in SOAP processors). This
1913 package is in maintenance mode.")
1914 (license (license:non-copyleft "file:///LICENSE.txt"))))
1916 (define-public java-dom4j
1923 (url "https://github.com/dom4j/dom4j")
1924 (commit (string-append "version-" version))))
1925 (file-name (git-file-name name version))
1928 "0q907srj9v4hwicpcrn4slyld5npf2jv7hzchsgrg29q2xmbwkdl"))
1929 (modules '((guix build utils)))
1931 '(begin ;; Delete bundled jar archives.
1932 (for-each delete-file (find-files "." ".*\\.jar"))
1934 (build-system ant-build-system)
1936 `(#:jar-name "dom4j.jar"
1938 #:source-dir "src/main/java"
1939 ;; FIXME: Requires xalan, but xalan depends on java-cup which has a
1940 ;; dependency on itself through jflex.
1943 (modify-phases %standard-phases
1944 (add-before 'build 'copy-jaxen-sources
1945 ;; java-jaxen-bootstrap is not enough. These files have a circular
1946 ;; dependency and there is no subset of dom4j that would allow
1947 ;; breaking the circle.
1948 (lambda* (#:key inputs #:allow-other-keys)
1949 (mkdir-p "jaxen-sources")
1950 (with-directory-excursion "jaxen-sources"
1951 (system* "jar" "xf" (assoc-ref inputs "java-jaxen-sources")))
1952 (mkdir-p "src/main/java/org/jaxen/dom4j")
1953 (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java"
1954 "src/main/java/org/jaxen/dom4j/DocumentNavigator.java")
1955 (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java"
1956 "src/main/java/org/jaxen/dom4j/Dom4jXPath.java")
1958 (add-before 'build 'fix-old-xpp2
1960 ;; This package normally depends on xpp2 2.0, but version 2.1.10
1961 ;; is the only version whose source code is published.
1962 (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java"
1963 (("public void resetStartTag")
1964 "public boolean removeAttributeByRawName(String name) {\n
1967 public boolean removeAttributeByName(String name, String name2) {\n
1969 }\n\npublic void resetStartTag")
1970 (("Atttribute") "Attribute"))
1973 `(("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
1974 ("java-jaxen-sources" ,(package-source java-jaxen-bootstrap))
1975 ("java-xmlpull2" ,java-xmlpull2)
1976 ("java-xpp3" ,java-xpp3)
1977 ("java-xsdlib" ,java-xsdlib)))
1979 `(("java-testng" ,java-testng)
1980 ("java-xerces" ,java-xerces)))
1981 (home-page "https://dom4j.github.io/")
1982 (synopsis "Flexible XML framework for Java")
1983 (description "Dom4j is a flexible XML framework for Java. DOM4J works
1984 with DOM, SAX, XPath, and XSLT. It can parse large XML documents with very
1985 low memory footprint.")
1986 ;; some BSD-like 5-clause license
1987 (license (license:non-copyleft "file://LICENSE"))))
1989 (define-public java-kxml2
1996 (url "https://github.com/stefanhaustein/kxml2")
1997 (commit (string-append "v" version))))
1998 (file-name (git-file-name name version))
2001 "0g6d8c9r9sh3x04sf4wdpgwvhkqvk11k3kq9skx91i60h4vn01hg"))))
2002 (build-system ant-build-system)
2004 `(#:jar-name "kxml2.jar"
2005 #:source-dir "src/main/java"
2006 #:test-include (list "TestWb.java")
2007 ;; Test failure: it was expected to get an XML entity but got the
2008 ;; equivalent Unicode character instead.
2011 (modify-phases %standard-phases
2012 (add-after 'unpack 'make-git-checkout-writable
2014 (for-each make-file-writable (find-files "."))
2016 (add-before 'build 'copy-resources
2018 (copy-recursively "src/main/resources" "build/classes")
2021 `(("java-xpp3" ,java-xpp3)))
2023 `(("java-junit" ,java-junit)))
2024 (home-page "http://kxml.org")
2025 (synopsis "XML pull parser")
2026 (description "kXML is a small XML pull parser, specially designed for
2027 constrained environments such as Applets, Personal Java or devices compliant
2028 with the Mobile Information Device Profile (MIDP).")
2029 (license license:expat)))
2031 (define-public java-stax
2037 (uri (string-append "https://repo1.maven.org/maven2/stax/stax/"
2038 version "/stax-" version "-sources.jar"))
2041 "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z"))))
2042 (build-system ant-build-system)
2044 `(#:jar-name "stax.jar"
2045 #:tests? #f; no tests
2047 (modify-phases %standard-phases
2048 (add-before 'configure 'fix-utf8
2050 ;; This file is ISO-8859-1 but java expects UTF-8.
2051 ;; Remove special characters in comments.
2052 (with-fluids ((%default-port-encoding "ISO-8859-1"))
2053 (substitute* "src/com/wutka/dtd/Scanner.java"
2056 (home-page "https://repo1.maven.org/maven2/stax/stax/")
2057 (synopsis "Streaming API for XML")
2058 (description "This package provides the reference implementation of the
2059 @dfn{Streaming API for XML} (StAX). It is used for streaming XML data to
2060 and from a Java application. It provides a standard pull parser interface.")
2061 (license license:asl2.0)))
2063 (define-public java-jettison
2065 (name "java-jettison")
2070 (url "https://github.com/codehaus/jettison")
2071 (commit (string-append "jettison-" version))))
2072 (file-name (git-file-name name version))
2075 "15sydmi5chdh4126qc7v8bsrp7fp4ldaya8a05iby4pq2324q0qw"))))
2076 (build-system ant-build-system)
2078 `(#:jar-name "jettison.jar"
2079 #:source-dir "src/main/java"
2080 #:test-exclude (list "**/Abstract*.java"
2083 "**/BadgerFishDOMTest.java"
2084 "**/MappedDOMTest.java")))
2086 `(("java-junit" ,java-junit)))
2087 (home-page "https://github.com/codehaus/jettison")
2088 (synopsis "StAX implementation for JSON")
2089 (description "Jettison is a Java library for converting XML to JSON and
2090 vice-versa with the help of the @dfn{Streaming API for XML} (StAX). It
2091 implements @code{XMLStreamWriter} and @code{XMLStreamReader} and supports
2092 @code{Mapped} and @code{BadgerFish} conventions.")
2093 (license license:asl2.0)))
2095 (define-public java-jdom2
2102 (url "https://github.com/hunterhacker/jdom")
2103 (commit (string-append "JDOM-" version))))
2104 (file-name (git-file-name name version))
2107 "14vv1kxrsdvwi4cz3rx6r48w5y6fvk9cymil8qhvxwp56xxrgxiq"))))
2108 (build-system ant-build-system)
2110 `(#:build-target "package"
2111 #:tests? #f ; tests are run as part of the build process
2113 (modify-phases %standard-phases
2115 (install-jars "build")))))
2116 (home-page "http://jdom.org/")
2117 (synopsis "Access, manipulate, and output XML data")
2118 (description "Jdom is a Java-based solution for accessing, manipulating, and
2119 outputting XML data from Java code.")
2120 (license license:bsd-4)))
2122 (define-public java-xstream
2124 (name "java-xstream")
2130 (url "https://github.com/x-stream/xstream")
2131 (commit (string-append
2133 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
2135 (file-name (git-file-name name version))
2137 (base32 "12m2bw8bapdc1w0pni9wl5hh2y8jfdgcvxd464jl9917dsp3ai2n"))))
2138 (build-system ant-build-system)
2140 `(#:jar-name "xstream.jar"
2141 ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system.
2144 #:source-dir "xstream/src/java"))
2146 `(("java-jdom" ,java-jdom)
2147 ("java-jdom2" ,java-jdom2)
2148 ("java-cglib" ,java-cglib)
2149 ("java-joda-time" ,java-joda-time)
2150 ("java-jettison" ,java-jettison)
2151 ("java-xom" ,java-xom)
2152 ("java-xpp3" ,java-xpp3)
2153 ("java-dom4j" ,java-dom4j)
2154 ("java-stax2-api" ,java-stax2-api)
2155 ("java-woodstox-core" ,java-woodstox-core)
2156 ("java-kxml2" ,java-kxml2)
2157 ("java-stax" ,java-stax)))
2158 (home-page "https://x-stream.github.io")
2159 (synopsis "XML serialization library")
2160 (description "XStream is a simple library to serialize Java objects to XML
2162 (license license:bsd-3)))
2164 (define-public xmlrpc-c
2170 (uri (string-append "mirror://sourceforge/xmlrpc-c/Xmlrpc-c%20Super%20Stable/"
2171 version "/xmlrpc-c-" version ".tgz"))
2174 "18zwbj6i2hpcn5riiyp8i6rml0sfv60dd7phw1x8g4r4lj2bbxf9"))))
2175 (build-system gnu-build-system)
2179 `(;; For tools, if ever needed.
2182 `(#:make-flags ; Add $libdir to the RUNPATH of all the executables.
2183 (list (string-append "LDFLAGS_PERSONAL=-Wl,-rpath=" %output "/lib"))
2185 (modify-phases %standard-phases
2186 (add-after 'unpack 'fix-/bin/sh-in-tests
2188 (substitute* "GNUmakefile"
2189 (("#! /bin/sh") (which "sh")))
2191 (home-page "http://xmlrpc-c.sourceforge.net/")
2192 (synopsis "Lightweight RPC library based on XML and HTTP")
2194 "XML-RPC is a quick-and-easy way to make procedure calls over the Internet.
2195 It converts the procedure call into an XML document, sends it to a remote
2196 server using HTTP, and gets back the response as XML. This library provides a
2197 modular implementation of XML-RPC for C and C++.")
2198 (license (list license:psfl license:expat))))
2200 (define-public python-elementpath
2202 (name "python-elementpath")
2207 (uri (pypi-uri "elementpath" version))
2210 "15h7d41v48q31hzjay7qzixdv531hnga3h35hksk7x52pgqcrkz7"))))
2211 (build-system python-build-system)
2213 "https://github.com/sissaschool/elementpath")
2215 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
2217 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
2218 for Python's ElementTree XML data structures, both for the standard
2219 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
2221 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
2222 because lxml.etree already has it's own implementation of XPath 1.0.")
2223 (license license:expat)))
2225 (define-public python-lxml
2227 (name "python-lxml")
2232 (uri (pypi-uri "lxml" version))
2234 (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg"))))
2235 (build-system python-build-system)
2237 `(#:phases (modify-phases %standard-phases
2240 (invoke "make" "test"))))))
2242 `(("libxml2" ,libxml2)
2243 ("libxslt" ,libxslt)))
2244 (home-page "https://lxml.de/")
2245 (synopsis "Python XML processing library")
2247 "The lxml XML toolkit is a Pythonic binding for the C libraries
2248 libxml2 and libxslt.")
2249 (license license:bsd-3))) ; and a few more, see LICENSES.txt
2251 (define-public python2-lxml
2252 (package-with-python2 python-lxml))
2254 (define-public python-xmlschema
2256 (name "python-xmlschema")
2259 ;; Unit tests are not distributed with the PyPI archive.
2262 (url "https://github.com/sissaschool/xmlschema")
2263 (commit (string-append "v" version))))
2264 (file-name (git-file-name name version))
2267 "03bz5mp45y4shmlc1gxq1h69vjx60z1acg9cy4kq7fczgx8qg9jw"))))
2268 (build-system python-build-system)
2271 (modify-phases %standard-phases
2273 (lambda* (#:key (tests? #t) #:allow-other-keys)
2276 (setenv "PYTHONPATH"
2277 (string-append "./build/lib:"
2278 (getenv "PYTHONPATH")))
2279 (invoke "python" "-m" "unittest" "-v"))
2280 (format #t "test suite not run~%"))
2283 `(("python-lxml" ,python-lxml))) ;for tests
2285 `(("python-elementpath" ,python-elementpath)))
2286 (home-page "https://github.com/sissaschool/xmlschema")
2287 (synopsis "XML Schema validator and data conversion library")
2289 "The @code{xmlschema} library is an implementation of
2290 @url{https://www.w3.org/2001/XMLSchema, XML Schema} for Python. It has
2291 full support for the XSD 1.0 and 1.1 standards, an XPath-based API for
2292 finding schema's elements and attributes; and can encode and decode
2293 XML data to JSON and other formats.")
2294 (license license:expat)))
2296 (define-public python-xmltodict
2298 (name "python-xmltodict")
2303 (uri (pypi-uri "xmltodict" version))
2306 "08cadlb9vsb4pmzc99lz3a2lx6qcfazyvgk10pcqijvyxlwcdn2h"))))
2307 (build-system python-build-system)
2309 `(("python-coverage" ,python-coverage)
2310 ("python-nose" ,python-nose)))
2311 (home-page "https://github.com/martinblech/xmltodict")
2312 (synopsis "Work with XML like you are working with JSON")
2313 (description "This package provides a Python library to convert XML to
2314 @code{OrderedDict}.")
2315 (license license:expat)))