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>
27 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
28 ;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
29 ;;; Copyright © 2021 Michael Rohleder <mike@rohleder.de>
30 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
32 ;;; This file is part of GNU Guix.
34 ;;; GNU Guix is free software; you can redistribute it and/or modify it
35 ;;; under the terms of the GNU General Public License as published by
36 ;;; the Free Software Foundation; either version 3 of the License, or (at
37 ;;; your option) any later version.
39 ;;; GNU Guix is distributed in the hope that it will be useful, but
40 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
41 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 ;;; GNU General Public License for more details.
44 ;;; You should have received a copy of the GNU General Public License
45 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47 (define-module (gnu packages xml)
48 #:use-module (gnu packages)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages autotools)
51 #:use-module (gnu packages check)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages curl)
54 #:use-module (gnu packages docbook)
55 #:use-module (gnu packages documentation)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages gnupg)
60 #:use-module (gnu packages graphviz)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages java)
63 #:use-module (gnu packages nss)
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages perl-check)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages tls)
68 #:use-module (gnu packages web)
69 #:use-module ((guix licenses) #:prefix license:)
70 #:use-module (guix packages)
71 #:use-module (guix download)
72 #:use-module (guix git-download)
73 #:use-module (guix build-system ant)
74 #:use-module (guix build-system cmake)
75 #:use-module (guix build-system gnu)
76 #:use-module (guix build-system meson)
77 #:use-module (guix build-system perl)
78 #:use-module (guix build-system python)
79 #:use-module (gnu packages linux)
80 #:use-module (gnu packages pkg-config))
82 (define-public libxmlb
91 (url "https://github.com/hughsie/libxmlb")
93 (file-name (git-file-name name version))
95 (base32 "1mb73pnfwqc4mm0lm16yfn0lj495h8hcciprb2v6wgy3ifnnjxib"))))
96 (build-system meson-build-system)
100 `(("gobject-introspection" ,gobject-introspection)
102 ("pkg-config" ,pkg-config)))
104 `(("appstream-glib" ,appstream-glib)
106 (synopsis "Library to help create and query binary XML blobs")
107 (description "Libxmlb library takes XML source, and converts it to a
108 structured binary representation with a deduplicated string table; where the
109 strings have the NULs included. This allows an application to mmap the binary
110 XML file, do an XPath query and return some strings without actually parsing
111 the entire document.")
112 (home-page "https://github.com/hughsie/libxmlb")
113 (license license:lgpl2.1+)))
119 (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
122 (uri (list (string-append "mirror://sourceforge/expat/expat/"
123 version "/expat-" version ".tar.xz")
125 "https://github.com/libexpat/libexpat/releases/download/R_"
126 (string-map dot->underscore version)
127 "/expat-" version ".tar.xz")))
130 "1960mmgbb4cm64n1p0nz3hrs1pw03hkrfcw8prmnn4622mdrd9hy")))))
131 (build-system gnu-build-system)
133 '(#:configure-flags '("--disable-static")))
134 (home-page "https://libexpat.github.io/")
135 (synopsis "Stream-oriented XML parser library written in C")
137 "Expat is an XML parser library written in C. It is a
138 stream-oriented parser in which an application registers handlers for
139 things the parser might find in the XML document (like start tags).")
140 (license license:expat)))
142 (define-public libebml
149 (uri (string-append "https://dl.matroska.org/downloads/libebml/"
150 "libebml-" version ".tar.xz"))
152 (base32 "1wmri5c94b02q2z32bqlpfs4vbw0n0c602321wigna2qw1y27is1"))))
153 (build-system cmake-build-system)
156 (list "-DBUILD_SHARED_LIBS=YES")
157 #:tests? #f)) ; no test suite
158 (home-page "https://matroska-org.github.io/libebml/")
159 (synopsis "C++ library to parse EBML files")
160 (description "libebml is a C++ library to read and write @dfn{EBML}
161 (Extensible Binary Meta Language) files. EBML was designed to be a simplified
162 binary extension of XML for the purpose of storing and manipulating data in a
163 hierarchical form with variable field lengths.")
164 (license license:lgpl2.1)))
166 (define-public libxml2
172 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
176 "07xynh8hcxb2yb1fs051xrgszjvj37wnxvxgsj10rzmqzy9y3zma"))))
177 (build-system gnu-build-system)
178 (outputs '("out" "static"))
180 `(#:phases (modify-phases %standard-phases
181 (add-after 'install 'move-static-libs
182 (lambda* (#:key outputs #:allow-other-keys)
183 (let ((src (string-append (assoc-ref outputs "out") "/lib"))
184 (dst (string-append (assoc-ref outputs "static")
187 (for-each (lambda (ar)
188 (rename-file ar (string-append dst "/"
190 (find-files src "\\.a$"))
192 ;; Remove reference to the static library from the .la
193 ;; file such that Libtool does the right thing when both
194 ;; the shared and static variants are available.
195 (substitute* (string-append src "/libxml2.la")
196 (("^old_library='libxml2.a'") "old_library=''"))
198 (home-page "http://www.xmlsoft.org/")
199 (synopsis "C parser for XML")
200 (inputs `(("xz" ,xz)))
201 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
202 (native-inputs `(("perl" ,perl)))
203 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
204 ;; sub-directory of any given package.
205 (native-search-paths (list (search-path-specification
206 (variable "XML_CATALOG_FILES")
209 (file-pattern "^catalog\\.xml$")
210 (file-type 'regular))))
211 (search-paths native-search-paths)
213 "Libxml2 is the XML C parser and toolkit developed for the Gnome
214 project (but it is usable outside of the Gnome platform).")
215 (license license:x11)))
217 ;; This is the latest stable release.
218 (define-public libxmlplusplus
220 (name "libxmlplusplus")
225 (url "https://github.com/libxmlplusplus/libxmlplusplus")
227 (file-name (git-file-name name version))
230 "0wjz591rjlgbah7dcq8i0yn0zw9d62b7g6r0pppx81ic0cx8n8ga"))))
231 (build-system gnu-build-system)
234 (modify-phases %standard-phases
235 (add-after 'unpack 'fix-documentation
236 (lambda* (#:key inputs #:allow-other-keys)
237 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
239 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
240 "/xml/xsl/docbook-xsl-"
241 ,(package-version docbook-xsl))))
242 (substitute* '("examples/dom_xpath/example.xml"
243 "docs/manual/libxml++_without_code.xml")
244 (("http://.*/docbookx\\.dtd")
245 (string-append xmldoc "/docbookx.dtd")))
246 (setenv "SGML_CATALOG_FILES"
247 (string-append xmldoc "/catalog.xml"))
248 (substitute* "docs/manual/docbook-customisation.xsl"
249 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
250 (string-append xsldoc "/html/chunk.xsl"))))
253 `(("libxml2" ,libxml2)))
255 `(("glibmm" ,glibmm)))
257 `(("autoconf" ,autoconf)
258 ("automake" ,automake)
260 ("docbook-xml" ,docbook-xml)
261 ("docbook-xsl" ,docbook-xsl)
262 ("graphviz" ,graphviz) ; for dot
265 ("mm-common" ,mm-common)
267 ("pkg-config" ,pkg-config)))
268 (home-page "https://github.com/libxmlplusplus/libxmlplusplus/")
269 (synopsis "C++ bindings for libxml2")
271 "libxml++ (a.k.a. libxmlplusplus) provides a C++ interface to XML files.
272 It uses libxml2 to access the XML files.")
273 (license license:lgpl2.1+)))
275 ;; This is the last release providing the 2.6 API, hence the name.
276 ;; This is needed by tascam-gtk
277 (define-public libxmlplusplus-2.6
279 (inherit libxmlplusplus)
280 (name "libxmlplusplus")
285 (url "https://github.com/libxmlplusplus/libxmlplusplus")
287 (file-name (git-file-name name version))
290 "0gbfi4l88w828gmyc9br11l003ylyi4vigp5d1kfgsn0k4cig3y9"))))))
292 (define-public python-libxml2
293 (package/inherit libxml2
294 (name "python-libxml2")
296 (inherit (package-source libxml2))
297 (patches (cons (search-patch "python-libxml2-utf8.patch")
298 (origin-patches (package-source libxml2))))))
299 (build-system python-build-system)
302 `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
305 (modify-phases %standard-phases
308 (lambda* (#:key inputs #:allow-other-keys)
310 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
311 "cross-libc" "libc")))
312 (libxml2 (assoc-ref inputs "libxml2")))
313 (substitute* "setup.py"
314 ;; For 'libxml2/libxml/tree.h'.
316 (format #f "ROOT = r'~a'" libxml2))
319 (string-append glibc "/include"))))
321 (inputs `(("libxml2" ,libxml2)))
322 (synopsis "Python bindings for the libxml2 library")))
324 (define-public python2-libxml2
325 (package-with-python2 python-libxml2))
327 (define-public libxslt
333 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
337 "0zrzz6kjdyavspzik6fbkpvfpbd25r2qg6py5nnjaabrsr3bvccq"))
338 (patches (search-patches "libxslt-generated-ids.patch"))))
339 (build-system gnu-build-system)
341 `(#:phases (modify-phases %standard-phases
342 (add-before 'check 'disable-fuzz-tests
344 ;; Disable libFuzzer tests, because they require
345 ;; instrumentation builds of libxml2 and libxslt.
346 (substitute* "tests/Makefile"
347 (("exslt plugins fuzz")
350 (home-page "http://xmlsoft.org/XSLT/index.html")
351 (synopsis "C library for applying XSLT stylesheets to XML documents")
352 (inputs `(("libgcrypt" ,libgcrypt)
354 ("python" ,python-minimal-wrapper)
358 `(("pkg-config" ,pkg-config)))
360 "Libxslt is an XSLT C library developed for the GNOME project. It is
361 based on libxml for XML parsing, tree manipulation and XPath support.")
362 (license license:x11)))
364 (define-public openjade
370 (uri (string-append "mirror://sourceforge/openjade/openjade/"
371 version "/" name "-" version ".tar.gz"))
374 "1l92sfvx1f0wmkbvzv1385y1gb3hh010xksi1iyviyclrjb7jb8x"))))
375 (build-system gnu-build-system)
378 (list (string-append "--enable-spincludedir="
379 (assoc-ref %build-inputs "opensp")
381 (string-append "--enable-splibdir="
382 (assoc-ref %build-inputs "opensp") "/lib")
383 ;; Workaround segfaults in OpenJade (see:
384 ;; https://bugs.launchpad.net/ubuntu/+source/openjade/+bug/1869734).
386 #:parallel-build? #f ;build fails otherwise
387 ;; The test suite fails with diff errors between the actual and
388 ;; expected results, like: (char<? #\a #\A) returning #t rather than
389 ;; #f (see: https://sourceforge.net/p/openjade/bugs/150/).
392 (modify-phases %standard-phases
393 (add-after 'unpack 'replace-deprecated-getopt
394 ;; See: https://sourceforge.net/p/openjade/bugs/140/.
396 (substitute* "msggen.pl"
397 (("use POSIX;") "use POSIX;\nuse Getopt::Std;")
398 (("do 'getopts.pl';") "")
399 (("&Getopts") "getopts"))
401 (add-after 'replace-deprecated-getopt 'fix-locale-lookup
402 ;; See: https://sourceforge.net/p/openjade/bugs/149/.
404 (substitute* "testsuite/expr-lang.dsl"
405 (("\\(language \"EN\" \"US\"\\)")
406 "(language \"EN\" \"US.UTF-8\")"))
408 (add-after 'install 'install-doc
409 (lambda* (#:key outputs #:allow-other-keys)
410 ;; TODO: Generate the manpage from source, with
411 ;; openjade-bootstrap and jadetex. See the file docsrc/Makefile.
412 (let* ((out (assoc-ref outputs "out"))
413 (man1 (string-append out "/share/man/man1")))
414 (install-file "docsrc/openjade.1" man1)
416 (add-after 'install-doc 'install-dtds
417 (lambda* (#:key outputs #:allow-other-keys)
418 (let* ((out (assoc-ref outputs "out"))
419 (dtd (string-append out "/sgml/dtd")))
421 (copy-recursively "dsssl" dtd)
424 (add-after 'install 'check
425 (lambda* (#:key tests? out #:allow-other-keys)
427 (with-directory-excursion "testsuite"
429 (format #t "test suite not run~%"))
432 `(("opensp" ,opensp)))
435 (home-page "http://openjade.sourceforge.net/")
436 (synopsis "ISO/IEC 10179:1996 standard DSSSL language implementation")
437 (description "OpenJade is an implementation of Document Style Semantics
438 and Specification Language (DSSSL), a style language to format SGML or XML
439 documents. It contains backends for various formats such as RTF, HTML, TeX,
440 MIF, SGML2SGML, and FOT.")
441 (license (license:non-copyleft "file://COPYING"
442 "See COPYING in the distribution."))))
444 (define-public perl-graph-readwrite
446 (name "perl-graph-readwrite")
452 "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-"
457 "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh"))))
458 (build-system perl-build-system)
460 `(("perl-graph" ,perl-graph)
461 ("perl-parse-yapp" ,perl-parse-yapp)
462 ("perl-xml-parser" ,perl-xml-parser)
463 ("perl-xml-writer" ,perl-xml-writer)))
464 (home-page "https://metacpan.org/release/Graph-ReadWrite")
465 (synopsis "Modules for reading and writing directed graphs")
466 (description "This is a collection of perl classes for reading and writing
467 directed graphs in a variety of file formats. The graphs are represented in
468 Perl using Jarkko Hietaniemi's @code{Graph} classes.
470 There are two base classes. @code{Graph::Reader} is the base class for classes
471 which read a graph file and create an instance of the Graph class.
472 @code{Graph::Writer} is the base class for classes which take an instance of
473 the @code{Graph} class and write it out in a specific file format.")
474 (license license:perl-license)))
476 (define-public perl-xml-atom
478 (name "perl-xml-atom")
482 (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
483 "XML-Atom-" version ".tar.gz"))
486 "1wa8kfy1w4mg7kzxim4whyprkn48a2il6fap0b947zywknw4c6y6"))))
487 (build-system perl-build-system)
490 (modify-phases %standard-phases
491 (add-before 'check 'set-perl-search-path
494 (string-append (getcwd) ":"
495 (getenv "PERL5LIB")))
498 ;; TODO package: perl-datetime-format-atom
499 `(("perl-html-tagset" ,perl-html-tagset)
500 ("perl-module-build-tiny" ,perl-module-build-tiny)
501 ("perl-module-install" ,perl-module-install)))
503 `(("perl-class-data-inheritable" ,perl-class-data-inheritable)
504 ("perl-datetime" ,perl-datetime)
505 ("perl-datetime-timezone" ,perl-datetime-timezone)
506 ("perl-digest-sha1" ,perl-digest-sha1)
507 ("perl-libwww" ,perl-libwww)
508 ("perl-uri" ,perl-uri)
509 ("perl-xml-libxml" ,perl-xml-libxml)
510 ("perl-xml-xpath" ,perl-xml-xpath)))
511 (home-page "https://metacpan.org/release/XML-Atom")
512 (synopsis "Atom feed and API implementation")
514 "Atom is a syndication, API, and archiving format for weblogs and other data.
515 @code{XML::Atom} implements the feed format as well as a client for the API.")
516 (license license:perl-license)))
518 (define-public perl-xml-descent
520 (name "perl-xml-descent")
524 (uri (string-append "mirror://cpan/authors/id/A/AN/ANDYA/"
525 "XML-Descent-" version ".tar.gz"))
528 "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7"))))
529 (build-system perl-build-system)
531 `(("perl-module-build" ,perl-module-build)))
533 `(("perl-test-differences" ,perl-test-differences)
534 ("perl-xml-tokeparser" ,perl-xml-tokeparser)))
535 (home-page "https://metacpan.org/release/XML-Descent")
536 (synopsis "Recursive descent XML parsing")
538 "The conventional models for parsing XML are either @dfn{DOM}
539 (a data structure representing the entire document tree is created) or
540 @dfn{SAX} (callbacks are issued for each element in the XML).
542 XML grammar is recursive - so it's nice to be able to write recursive
543 parsers for it. @code{XML::Descent} allows such parsers to be created.")
544 (license license:perl-license)))
546 (define-public perl-xml-parser
548 (name "perl-xml-parser")
553 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
557 "0pai3ik47q7rgnix9644c673fwydz52gqkxr9kxwq765j4j36cfk"))))
558 (build-system perl-build-system)
559 (arguments `(#:make-maker-flags
560 (let ((expat (assoc-ref %build-inputs "expat")))
561 (list (string-append "EXPATLIBPATH=" expat "/lib")
562 (string-append "EXPATINCPATH=" expat "/include")))))
563 (inputs `(("expat" ,expat)))
564 (license license:perl-license)
565 (synopsis "Perl bindings to the Expat XML parsing library")
567 "This module provides ways to parse XML documents. It is built on top of
568 XML::Parser::Expat, which is a lower level interface to James Clark's expat
569 library. Each call to one of the parsing methods creates a new instance of
570 XML::Parser::Expat which is then used to parse the document. Expat options
571 may be provided when the XML::Parser object is created. These options are
572 then passed on to the Expat object on each parse call. They can also be given
573 as extra arguments to the parse methods, in which case they override options
574 given at XML::Parser creation time.")
575 (home-page "https://metacpan.org/release/XML-Parser")))
577 (define-public perl-xml-tokeparser
579 (name "perl-xml-tokeparser")
583 (uri (string-append "mirror://cpan/authors/id/P/PO/PODMASTER/"
584 "XML-TokeParser-" version ".tar.gz"))
587 "1hnpwb3lh6cbgwvjjgqzcp6jm4mp612qn6ili38adc9nhkwv8fc5"))))
588 (build-system perl-build-system)
589 (propagated-inputs `(("perl-xml-parser" ,perl-xml-parser)))
590 (home-page "https://metacpan.org/release/XML-TokeParser")
591 (synopsis "Simplified interface to XML::Parser")
593 "@code{XML::TokeParser} provides a procedural (\"pull mode\") interface
594 to @code{XML::Parser} in much the same way that Gisle Aas'
595 @code{HTML::TokeParser} provides a procedural interface to @code{HTML::Parser}.
596 @code{XML::TokeParser} splits its XML input up into \"tokens\", each
597 corresponding to an @code{XML::Parser} event.")
598 (license license:perl-license)))
600 (define-public perl-libxml
607 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
611 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
612 (build-system perl-build-system)
614 `(("perl-xml-parser" ,perl-xml-parser)))
615 (license license:perl-license)
616 (synopsis "Perl modules for working with XML")
618 "libxml-perl is a collection of smaller Perl modules, scripts, and
619 documents for working with XML in Perl. libxml-perl software works in
620 combination with @code{XML::Parser}, PerlSAX, @code{XML::DOM},
621 @code{XML::Grove}, and others.")
622 (home-page "https://metacpan.org/release/libxml-perl")))
624 (define-public perl-xml-libxml
626 (name "perl-xml-libxml")
631 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
632 "XML-LibXML-" version ".tar.gz"))
635 "1ks69xymv6zkj7hvaymjvb78ch81abri7kg4zrwxhdfsqb8a9g7h"))))
636 (build-system perl-build-system)
638 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
639 ("perl-xml-sax" ,perl-xml-sax)))
641 `(("libxml2" ,libxml2)))
642 (home-page "https://metacpan.org/release/XML-LibXML")
643 (synopsis "Perl interface to libxml2")
644 (description "This module implements a Perl interface to the libxml2
645 library which provides interfaces for parsing and manipulating XML files. This
646 module allows Perl programmers to make use of the highly capable validating
647 XML parser and the high performance DOM implementation.")
648 (license license:perl-license)))
650 (define-public perl-xml-libxml-simple
652 (name "perl-xml-libxml-simple")
656 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
657 "XML-LibXML-Simple-" version ".tar.gz"))
660 "0i4ybiqdnvnbfxqslw2y392kvy7i752dl8n99bqiqv5kzk4lbzhl"))))
661 (build-system perl-build-system)
663 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
664 ("perl-xml-libxml" ,perl-xml-libxml)))
665 (home-page "https://metacpan.org/release/XML-LibXML-Simple")
666 (synopsis "XML::LibXML based XML::Simple clone")
668 "This package provides the same API as @code{XML::Simple} but is based on
669 @code{XML::LibXML}.")
670 (license license:perl-license)))
672 (define-public perl-xml-libxslt
674 (name "perl-xml-libxslt")
679 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
680 "XML-LibXSLT-" version ".tar.gz"))
683 "0wyl8klgr65j8y8fzgwz9jlvfjwvxazna8j3dg9gksd2v973fpia"))))
684 (build-system perl-build-system)
686 `(("libxslt" ,libxslt)))
688 `(("perl-xml-libxml" ,perl-xml-libxml)))
689 (home-page "https://metacpan.org/release/XML-LibXSLT")
690 (synopsis "Perl bindings to GNOME libxslt library")
691 (description "This Perl module is an interface to the GNOME project's
693 (license license:perl-license)))
695 (define-public perl-xml-namespacesupport
697 (name "perl-xml-namespacesupport")
702 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
703 "XML-NamespaceSupport-" version ".tar.gz"))
706 "1vz5pbi4lm5fhq2slrs2hlp6bnk29863abgjlcx43l4dky2rbsa7"))))
707 (build-system perl-build-system)
708 (home-page "https://metacpan.org/release/XML-NamespaceSupport")
709 (synopsis "XML namespace support class")
710 (description "This module offers a simple to process namespaced XML
711 names (unames) from within any application that may need them. It also helps
712 maintain a prefix to namespace URI map, and provides a number of basic
714 (license license:perl-license)))
716 (define-public perl-xml-rss
718 (name "perl-xml-rss")
722 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
723 "XML-RSS-" version ".tar.gz"))
726 "03f983l2dnkvcw6iyg1s0xmv5wn793d3kvqlshmhm01ibp7ffvzs"))))
727 (build-system perl-build-system)
729 `(("perl-module-build" ,perl-module-build)
730 ("perl-test-manifest" ,perl-test-manifest)
731 ("perl-test-differences" ,perl-test-differences)
732 ("perl-test-pod" ,perl-test-pod)
733 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
734 ;; XXX: The test which uses this modules does not run, even when it is included
735 ;; it is ignored. ("perl-test-trailingspace" ,perl-test-trailingspace)
737 `(("perl-datetime" ,perl-datetime)
738 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
739 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
740 ("perl-html-parser" ,perl-html-parser)
741 ("perl-xml-parser" ,perl-xml-parser)))
742 (home-page "https://metacpan.org/release/XML-RSS")
743 (synopsis "Creates and updates RSS files")
745 "This module provides a basic framework for creating and maintaining
746 RDF Site Summary (RSS) files. This distribution also contains many examples
747 that allow you to generate HTML from an RSS, convert between 0.9, 0.91, and
748 1.0 version, and more.")
749 (license license:perl-license)))
751 (define-public perl-xml-sax
753 (name "perl-xml-sax")
758 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
759 "XML-SAX-" version ".tar.gz"))
761 (base32 "0am13vnv8qsjafr5ljakwnkhlwpk15sga02z8mxsg9is0j3w61j5"))))
762 (build-system perl-build-system)
764 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
765 ("perl-xml-sax-base" ,perl-xml-sax-base)))
767 `(#:phases (modify-phases %standard-phases
769 'install 'augment-path
770 ;; The install target tries to load the newly-installed
771 ;; XML::SAX module, but can't find it, so we need to tell
772 ;; perl where to look.
773 (lambda* (#:key outputs #:allow-other-keys)
775 (string-append (getenv "PERL5LIB") ":"
776 (assoc-ref outputs "out")
777 "/lib/perl5/site_perl"))
779 (home-page "https://metacpan.org/release/XML-SAX")
780 (synopsis "Perl API for XML")
781 (description "XML::SAX consists of several framework classes for using and
782 building Perl SAX2 XML parsers, filters, and drivers.")
783 (license license:perl-license)))
785 (define-public perl-xml-sax-base
787 (name "perl-xml-sax-base")
792 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
793 "XML-SAX-Base-" version ".tar.gz"))
796 "1l1ai9g1z11ja7mvnfl5mj346r13jyckbg9qlw6c2izglidkbjv6"))))
797 (build-system perl-build-system)
798 (home-page "https://metacpan.org/release/XML-SAX-Base")
799 (synopsis "Base class for SAX Drivers and Filters")
800 (description "This module has a very simple task - to be a base class for
801 PerlSAX drivers and filters. It's default behaviour is to pass the input
802 directly to the output unchanged. It can be useful to use this module as a
803 base class so you don't have to, for example, implement the characters()
805 (license license:perl-license)))
807 (define-public perl-xml-simple
809 (name "perl-xml-simple")
814 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
818 "1y6vh328zrh085d40852v4ij2l4g0amxykswxd1nfhd2pspds7sk"))))
819 (build-system perl-build-system)
821 `(("perl-xml-parser" ,perl-xml-parser)
822 ("perl-xml-sax" ,perl-xml-sax)))
823 (license license:perl-license)
824 (synopsis "Perl module for easy reading/writing of XML files")
826 "The XML::Simple module provides a simple API layer on top of an
827 underlying XML parsing module (either XML::Parser or one of the SAX2
829 (home-page "https://metacpan.org/release/XML-Simple")))
831 (define-public perl-xml-regexp
833 (name "perl-xml-regexp")
838 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
842 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
843 (build-system perl-build-system)
845 `(("perl-xml-parser" ,perl-xml-parser)))
846 (license license:perl-license)
847 (synopsis "Perl regular expressions for XML tokens")
849 "XML::RegExp contains regular expressions for the following XML tokens:
850 BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
851 EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
852 (home-page "https://metacpan.org/release/XML-RegExp")))
854 (define-public perl-xml-dom
856 (name "perl-xml-dom")
861 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
865 "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb"))))
866 (build-system perl-build-system)
868 `(("perl-libwww" ,perl-libwww)
869 ("perl-libxml" ,perl-libxml)
870 ("perl-xml-parser" ,perl-xml-parser)
871 ("perl-xml-regexp" ,perl-xml-regexp)))
872 (license license:perl-license)
874 "Perl module for building DOM Level 1 compliant document structures")
876 "This module extends the XML::Parser module by Clark Cooper. The
877 XML::Parser module is built on top of XML::Parser::Expat, which is a lower
878 level interface to James Clark's expat library. XML::DOM::Parser is derived
879 from XML::Parser. It parses XML strings or files and builds a data structure
880 that conforms to the API of the Document Object Model.")
881 (home-page "https://metacpan.org/release/XML-DOM")))
883 (define-public perl-xml-compile-tester
885 (name "perl-xml-compile-tester")
889 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
890 "XML-Compile-Tester-" version ".tar.gz"))
893 "1drzwziwi96rfkh48qpw4l225mcbk8ppl2157nj92cslcpwwdk75"))))
894 (build-system perl-build-system)
896 `(("perl-log-report" ,perl-log-report)
897 ("perl-test-deep" ,perl-test-deep)))
898 (home-page "https://metacpan.org/release/XML-Compile-Tester")
899 (synopsis "XML::Compile related regression testing")
901 "The @code{XML::Compile} module suite has extensive regression testing.
902 This module provide functions which simplify writing tests for
903 @code{XML::Compile} related distributions.")
904 (license license:perl-license)))
906 (define-public perl-xml-compile
908 (name "perl-xml-compile")
912 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
913 "XML-Compile-" version ".tar.gz"))
916 "0psr5pwsk2biz2bfkigmx04v2rfhs6ybwcfmcrrg7gvh9bpp222b"))))
917 (build-system perl-build-system)
919 `(("perl-carp" ,perl-carp)
920 ("perl-log-report" ,perl-log-report)
921 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
922 ("perl-xml-libxml" ,perl-xml-libxml)
923 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
924 ("perl-test-deep" ,perl-test-deep)
925 ("perl-types-serialiser" ,perl-types-serialiser)))
926 (home-page "https://metacpan.org/release/XML-Compile")
927 (synopsis "Compilation-based XML processing")
929 "@code{XML::Compile} can be used to translate a Perl data-structure into
930 XML or XML into a Perl data-structure, both directions under rigid control by
932 (license license:perl-license)))
934 (define-public perl-xml-compile-cache
936 (name "perl-xml-compile-cache")
940 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
941 "XML-Compile-Cache-" version ".tar.gz"))
944 "181qf1s7ymgi7saph3cf9p6dbxkxyh1ja23na4dchhi8v5mi66sr"))))
945 (build-system perl-build-system)
947 `(("perl-log-report" ,perl-log-report)
948 ("perl-xml-compile" ,perl-xml-compile)
949 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
950 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)))
951 (home-page "https://metacpan.org/release/XML-Compile-Cache")
952 (synopsis "Cache compiled XML translators")
954 "This package provides methods to cache compiled XML translators.")
955 (license license:perl-license)))
957 (define-public perl-xml-compile-soap
959 (name "perl-xml-compile-soap")
963 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
964 "XML-Compile-SOAP-" version ".tar.gz"))
967 "0pkcph562l2ij7rlwlvm58v6y062qsbydfpaz2qnph2ixqy0xfd1"))))
968 (build-system perl-build-system)
970 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
971 ("perl-libwww" ,perl-libwww)
972 ("perl-log-report" ,perl-log-report)
973 ("perl-xml-compile" ,perl-xml-compile)
974 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
975 ("perl-xml-compile-tester" ,perl-xml-compile-tester)))
976 (home-page "https://metacpan.org/release/XML-Compile-SOAP")
977 (synopsis "Base-class for SOAP implementations")
979 "This module provides a class to handle the SOAP protocol. The first
980 implementation is @url{SOAP1.1,
981 http://www.w3.org/TR/2000/NOTE-SOAP-20000508/}, which is still most often
983 (license license:perl-license)))
985 (define-public perl-xml-compile-wsdl11
987 (name "perl-xml-compile-wsdl11")
991 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
992 "XML-Compile-WSDL11-" version ".tar.gz"))
995 "09ayl442hzvn97q4ghn5rz4r82dm9w3l69hixhb29h9xq9ysi7ba"))))
996 (build-system perl-build-system)
998 `(("perl-log-report" ,perl-log-report)
999 ("perl-xml-compile" ,perl-xml-compile)
1000 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
1001 ("perl-xml-compile-soap" ,perl-xml-compile-soap)))
1002 (home-page "https://metacpan.org/release/XML-Compile-WSDL11")
1003 (synopsis "Create SOAP messages defined by WSDL 1.1")
1005 "This module understands WSDL version 1.1. A WSDL file defines a set of
1006 messages to be send and received over SOAP connections. This involves
1007 encoding of the message to be send into XML, sending the message to the
1008 server, collect the answer, and finally decoding the XML to Perl.")
1009 (license license:perl-license)))
1011 (define-public perl-xml-feed
1013 (name "perl-xml-feed")
1017 (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
1018 "XML-Feed-" version ".tar.gz"))
1021 "1z1a88bpy64j42bbyl8acbfl3dn9iaz47gx6clkgy5sbn4kr0kgk"))))
1022 (build-system perl-build-system)
1024 `(("perl-module-build" ,perl-module-build)
1025 ("perl-uri" ,perl-uri)
1026 ("perl-class-data-inheritable" ,perl-class-data-inheritable)))
1028 `(("perl-class-errorhandler" ,perl-class-errorhandler)
1029 ("perl-datetime" ,perl-datetime)
1030 ("perl-datetime-format-flexible" ,perl-datetime-format-flexible)
1031 ("perl-datetime-format-iso8601" ,perl-datetime-format-iso8601)
1032 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
1033 ("perl-datetime-format-natural" ,perl-datetime-format-natural)
1034 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
1035 ("perl-feed-find" ,perl-feed-find)
1036 ("perl-html-parser" ,perl-html-parser)
1037 ("perl-libwww-perl" ,perl-libwww)
1038 ("perl-module-pluggable" ,perl-module-pluggable)
1039 ("perl-uri-fetch" ,perl-uri-fetch)
1040 ("perl-xml-atom" ,perl-xml-atom)
1041 ("perl-xml-libxml" ,perl-xml-libxml)
1042 ("perl-xml-rss" ,perl-xml-rss)))
1043 (home-page "https://metacpan.org/release/XML-Feed")
1044 (synopsis "XML Syndication Feed Support")
1045 (description "@code{XML::Feed} is a syndication feed parser for both RSS and
1046 Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI.
1047 @code{XML::Feed} supports the following syndication feed formats:
1048 RSS 0.91, RSS 1.0, RSS 2.0, Atom")
1049 (license license:perl-license)))
1051 (define-public perl-xml-xpath
1053 (name "perl-xml-xpath")
1057 (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
1058 "XML-XPath-" version ".tar.gz"))
1061 "03yxj7w5a43ibbpiqsvb3lswj2b71dydsx4rs2fw0p8n0l3i3j8w"))))
1062 (build-system perl-build-system)
1064 `(("perl-path-tiny" ,perl-path-tiny)))
1066 `(("perl-xml-parser" ,perl-xml-parser)))
1067 (home-page "https://metacpan.org/release/XML-XPath")
1068 (synopsis "Parse and evaluate XPath statements")
1070 "This module aims to comply exactly to the @url{XPath specification,
1071 https://www.w3.org/TR/xpath} and yet allow extensions to be added in
1072 the form of functions.")
1073 (license license:perl-license)))
1075 (define-public pugixml
1082 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
1083 version "/pugixml-" version ".tar.gz"))
1085 (base32 "0b5apqiisq8yk51x0cwks4h2m0zd2zgjdy0w80qp9h5rccz3v496"))))
1086 (build-system cmake-build-system)
1088 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
1089 #:tests? #f)) ; no tests
1091 `(("pkg-config" ,pkg-config)))
1092 (home-page "https://pugixml.org")
1093 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
1095 "pugixml is a C++ XML processing library, which consists of a DOM-like
1096 interface with rich traversal/modification capabilities, a fast XML parser
1097 which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
1098 implementation for complex data-driven tree queries. Full Unicode support is
1099 also available, with Unicode interface variants and conversions between
1100 different Unicode encodings which happen automatically during
1102 (license license:expat)))
1104 (define-public python-pyxb
1106 (name "python-pyxb")
1110 (uri (pypi-uri "PyXB" version))
1113 "1d17pyixbfvjyi2lb0cfp0ch8wwdf44mmg3r5pwqhyyqs66z601a"))))
1114 (build-system python-build-system)
1115 (home-page "http://pyxb.sourceforge.net/")
1116 (synopsis "Python XML Schema Bindings")
1118 "PyXB (\"pixbee\") is a pure Python package that generates Python source
1119 code for classes that correspond to data structures defined by XMLSchema.")
1120 (license (list license:asl2.0 ; Most files.
1121 license:expat ; pyxb/utils/six.py
1122 license:gpl2 ; bundled jquery in doc is dual MIT/GPL2
1123 license:psfl)))) ; pyxb/utils/activestate.py
1125 (define-public python2-pyxb
1126 (package-with-python2 python-pyxb))
1128 (define-public xmlto
1135 ;; The old source on fedorahosted.org is offline permanently:
1136 ;; <https://bugs.gnu.org/25989>
1137 (uri (string-append "mirror://debian/pool/main/x/xmlto/"
1138 "xmlto_" version ".orig.tar.bz2"))
1139 (file-name (string-append name "-" version ".tar.bz2"))
1142 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
1143 (build-system gnu-build-system)
1145 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
1146 '(#:configure-flags (list (string-append "GETOPT="
1147 (assoc-ref %build-inputs
1151 `(("util-linux" ,util-linux)))
1153 `(("util-linux" ,util-linux) ; for 'getopt'
1154 ("libxml2" ,libxml2) ; for 'xmllint'
1155 ("libxslt" ,libxslt))) ; for 'xsltproc'
1156 (home-page "http://cyberelk.net/tim/software/xmlto/")
1157 (synopsis "Front-end to an XSL toolchain")
1159 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
1160 stylesheet for the conversion you want and applies it using an external
1161 XSL-T processor. It also performs any necessary post-processing.")
1162 (license license:gpl2+)))
1164 (define-public xmlsec
1170 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
1171 "xmlsec1-" version ".tar.gz"))
1174 "09hbbaz2d9hw645q27apkjs1mdr6vd85x5z3c9hzgr1iri9bq44v"))))
1175 (build-system gnu-build-system)
1176 (propagated-inputs ; according to xmlsec1.pc
1177 `(("libxml2" ,libxml2)
1178 ("libxslt" ,libxslt)))
1180 `(("gnutls" ,gnutls)
1181 ("libgcrypt" ,libgcrypt)
1182 ("libltdl" ,libltdl)))
1184 `(("pkg-config" ,pkg-config)))
1185 (home-page "https://www.aleksey.com/xmlsec/")
1186 (synopsis "XML Security Library")
1188 "The XML Security Library is a C library based on Libxml2. It
1189 supports XML security standards such as XML Signature, XML Encryption,
1190 Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
1192 (license (license:x11-style "file://COPYING"
1193 "See 'COPYING' in the distribution."))))
1195 (define-public xmlsec-nss
1196 (package/inherit xmlsec
1200 `(("nss:bin" ,nss "bin") ; for certutil
1201 ,@(package-native-inputs xmlsec)))
1204 ("libltdl" ,libltdl)))
1206 ;; NSS no longer supports MD5 since 3.59, don't attempt to use it.
1207 '(#:configure-flags '("--disable-md5")))
1208 (synopsis "XML Security Library (using NSS instead of GnuTLS)")))
1210 (define-public minixml
1216 (uri (string-append "https://github.com/michaelrsweet/mxml/"
1217 "releases/download/v" version
1218 "/mxml-" version ".tar.gz"))
1221 "0x698ayv00vrjg0yfm20lakpgl7m02x1fk2n09wygwk4973gd55q"))))
1222 (build-system gnu-build-system)
1225 (list (string-append "LDFLAGS=-Wl,-rpath="
1226 (assoc-ref %outputs "out") "/lib"))
1227 #:tests? #f)) ; tests are run during build
1228 (home-page "https://www.msweet.org/mxml/")
1229 (synopsis "Small XML parsing library")
1231 "Mini-XML is a small C library to read and write XML files and strings in
1232 UTF-8 and UTF-16 encoding.")
1233 ;; LGPL 2.0+ with additional exceptions for static linking
1234 (license license:lgpl2.0+)))
1236 ;; TinyXML is an unmaintained piece of software, so the patches and build
1237 ;; system massaging have no upstream potential.
1238 (define-public tinyxml
1244 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
1246 (string-join (string-split version #\.) "_")
1248 (file-name (string-append name "-" version ".tar.gz"))
1251 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
1252 (patches (search-patches "tinyxml-use-stl.patch"))))
1253 (build-system gnu-build-system)
1254 ;; This library is missing *a lot* of the steps to make it usable, so we
1255 ;; have to add them here, like every other distro must do.
1258 (modify-phases %standard-phases
1260 (add-after 'build 'build-shared-library
1262 (invoke "g++" "-Wall" "-O2" "-shared" "-fpic"
1263 "tinyxml.cpp" "tinyxmlerror.cpp"
1264 "tinyxmlparser.cpp" "tinystr.cpp"
1265 "-o" "libtinyxml.so")))
1267 (lambda _ (invoke "./xmltest")))
1269 (lambda* (#:key outputs #:allow-other-keys)
1270 (let* ((out (assoc-ref outputs "out"))
1271 (include (string-append out "/include"))
1272 (lib (string-append out "/lib"))
1273 (pkgconfig (string-append out "/lib/pkgconfig"))
1274 (doc (string-append out "/share/doc")))
1275 ;; Install libs and headers.
1276 (install-file "libtinyxml.so" lib)
1277 (install-file "tinystr.h" include)
1278 (install-file "tinyxml.h" include)
1279 ;; Generate and install pkg-config file.
1281 ;; Software such as Kodi expect this file to be present, but
1282 ;; it's not provided in the source code.
1283 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
1285 (format port "prefix=~a
1286 exec_prefix=${prefix}
1287 libdir=${exec_prefix}/lib
1288 includedir=${prefix}/include
1291 Description: A simple, small, C++ XML parser
1293 Libs: -L${libdir} -ltinyxml
1294 Cflags: -I${includedir}
1299 (copy-recursively "docs" (string-append doc "tinyxml"))
1301 (synopsis "Small XML parser for C++")
1302 (description "TinyXML is a small and simple XML parsing library for the
1303 C++ programming language.")
1304 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
1305 (license license:zlib)))
1307 (define-public tinyxml2
1315 (url "https://github.com/leethomason/tinyxml2")
1317 (file-name (git-file-name name version))
1319 (base32 "0raa8r2hsagk7gjlqjwax95ib8d47ba79n91r4aws2zg8y6ssv1d"))))
1320 (build-system cmake-build-system)
1321 (synopsis "Small XML parser for C++")
1322 (description "TinyXML2 is a small and simple XML parsing library for the
1323 C++ programming language.")
1324 (home-page "http://www.grinninglizard.com/tinyxml2/")
1325 (license license:zlib)))
1327 (define-public xmlstarlet
1334 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1335 version "/xmlstarlet-" version ".tar.gz"))
1338 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1339 (build-system gnu-build-system)
1342 (modify-phases %standard-phases
1343 (add-before 'check 'drop-failing-tests
1345 ;; FIXME: Why are these tests failing.
1346 (substitute* "Makefile"
1347 (("^examples/schema1\\\\") "\\")
1348 (("^examples/valid1\\\\") "\\"))
1350 (add-after 'install 'symlink-xmlstarlet
1351 (lambda* (#:key outputs #:allow-other-keys)
1352 ;; Other distros usually either rename or symlink the `xml' binary
1353 ;; as `xmlstarlet', let's do it as well for compatibility.
1354 (let* ((out (assoc-ref outputs "out"))
1355 (bin (string-append out "/bin")))
1356 (symlink "xml" (string-append bin "/xmlstarlet"))
1359 `(("libxslt" ,libxslt)
1360 ("libxml2" ,libxml2)))
1361 (home-page "http://xmlstar.sourceforge.net/")
1362 (synopsis "Command line XML toolkit")
1363 (description "XMLStarlet is a set of command line utilities which can be
1364 used to transform, query, validate, and edit XML documents. XPath is used to
1365 match and extract data, and elements can be added, deleted or modified using
1367 (license license:x11)))
1369 (define-public html-xml-utils
1371 (name "html-xml-utils")
1377 "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-"
1380 (base32 "0gs3xvdbzhk5k12i95p5d4fgkkaldnlv45sch7pnncb0lrpcjsnq"))))
1381 (build-system gnu-build-system)
1382 (home-page "https://www.w3.org/Tools/HTML-XML-utils/")
1383 (synopsis "Command line utilities to manipulate HTML and XML files")
1384 (description "HTML-XML-utils provides a number of simple utilities for
1385 manipulating and converting HTML and XML files in various ways. The suite
1386 consists of the following tools:
1389 @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} entities
1390 @item @command{xml2asc} convert from @code{&#nnn;} entities to @code{UTF-8}
1391 @item @command{hxaddid} add IDs to selected elements
1392 @item @command{hxcite} replace bibliographic references by hyperlinks
1393 @item @command{hxcite} mkbib - expand references and create bibliography
1394 @item @command{hxclean} apply heuristics to correct an HTML file
1395 @item @command{hxcopy} copy an HTML file while preserving relative links
1396 @item @command{hxcount} count elements and attributes in HTML or XML files
1397 @item @command{hxextract} extract selected elements
1398 @item @command{hxincl} expand included HTML or XML files
1399 @item @command{hxindex} create an alphabetically sorted index
1400 @item @command{hxmkbib} create bibliography from a template
1401 @item @command{hxmultitoc} create a table of contents for a set of HTML files
1402 @item @command{hxname2id} move some @code{ID=} or @code{NAME=} from A
1403 elements to their parents
1404 @item @command{hxnormalize} pretty-print an HTML file
1405 @item @command{hxnsxml} convert output of hxxmlns back to normal XML
1406 @item @command{hxnum} number section headings in an HTML file
1407 @item @command{hxpipe} convert XML to a format easier to parse with Perl or AWK
1408 @item @command{hxprintlinks} number links and add table of URLs at end of an HTML file
1409 @item @command{hxprune} remove marked elements from an HTML file
1410 @item @command{hxref} generate cross-references
1411 @item @command{hxselect} extract elements that match a (CSS) selector
1412 @item @command{hxtoc} insert a table of contents in an HTML file
1413 @item @command{hxuncdata} replace CDATA sections by character entities
1414 @item @command{hxunent} replace HTML predefined character entities to @code{UTF-8}
1415 @item @command{hxunpipe} convert output of pipe back to XML format
1416 @item @command{hxunxmlns} replace \"global names\" by XML Namespace prefixes
1417 @item @command{hxwls} list links in an HTML file
1418 @item @command{hxxmlns} replace XML Namespace prefixes by \"global names\"
1421 (license license:expat)))
1423 (define-public xlsx2csv
1431 (url "https://github.com/dilshod/xlsx2csv")
1433 (file-name (git-file-name name version))
1435 (base32 "168dm6p7w6pvgd87yb9hcxv9y0liv6mxgril202nfva68cp8y939"))))
1436 (build-system python-build-system)
1438 `(#:python ,python-2 ; use python-2 for the test script
1440 (modify-phases %standard-phases
1443 (substitute* "test/run"
1444 ;; Run tests with `python' only.
1445 (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
1446 (invoke "test/run"))))))
1447 (home-page "https://github.com/dilshod/xlsx2csv")
1448 (synopsis "XLSX to CSV converter")
1450 "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
1451 XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
1452 files. It is designed to be fast and to handle large input files.")
1453 (license license:gpl2+)))
1455 (define-public python-defusedxml
1457 (name "python-defusedxml")
1462 (uri (pypi-uri "defusedxml" version))
1465 "1xbp8fivl3wlbyg2jrvs4lalaqv1xp9a9f29p75wdx2s2d6h717n"))))
1466 (build-system python-build-system)
1467 (home-page "https://bitbucket.org/tiran/defusedxml")
1468 (synopsis "XML bomb protection for Python stdlib modules")
1470 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1471 (license license:psfl)))
1473 (define-public python2-defusedxml
1474 (package-with-python2 python-defusedxml))
1476 (define-public freexl
1482 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1483 "freexl-" version ".tar.gz"))
1486 "08pwj17l0lgp6zms9nmpawdxpvhzrslklbd53s4b430k7mxbbs1x"))))
1487 (build-system gnu-build-system)
1488 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1489 (synopsis "Read Excel files")
1491 "FreeXL is a C library to extract valid data from within an Excel (.xls)
1493 ;; Any of these licenses may be picked.
1494 (license (list license:gpl2+
1498 (define-public xerces-c
1504 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1505 "xerces-c-" version ".tar.xz"))
1508 "0jf1khvlssg31vkxbc25dxjxcxm56xb8nywj1sypj6hxzjlrkz0j"))))
1509 (build-system gnu-build-system)
1511 (let ((system (or (%current-target-system)
1512 (%current-system))))
1513 (if (string-prefix? "x86_64" system)
1515 '(#:configure-flags '("--disable-sse2")))))
1518 (home-page "https://xerces.apache.org/xerces-c/")
1519 (synopsis "Validating XML parser library for C++")
1520 (description "Xerces-C++ is a validating XML parser written in a portable
1521 subset of C++. Xerces-C++ makes it easy to give your application the ability
1522 to read and write XML data. A shared library is provided for parsing,
1523 generating, manipulating, and validating XML documents using the DOM, SAX, and
1525 (license license:asl2.0)))
1527 (define-public xlsxio
1535 (url "https://github.com/brechtsanders/xlsxio")
1537 (file-name (git-file-name name version))
1539 (base32 "0jr6ggzhd8aakdvppcl8scy9j9jafg82zbzr4ih996sz8lrj90fn"))))
1543 ("minizip" ,minizip)
1545 (build-system gnu-build-system)
1548 (modify-phases %standard-phases
1552 (lambda* (#:key outputs #:allow-other-keys)
1553 (invoke "make" "install"
1555 "PREFIX=" (assoc-ref outputs "out"))))))))
1556 (synopsis "C library for reading and writing .xlsx files")
1557 (description "XLSX I/O aims to provide a C library for reading and writing
1558 .xlsx files. The .xlsx file format is the native format used by Microsoft(R)
1559 Excel(TM) since version 2007.")
1560 (home-page "https://github.com/brechtsanders/xlsxio")
1561 (license license:expat)))
1563 (define-public java-simple-xml
1565 (name "java-simple-xml")
1569 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
1573 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))
1574 (patches (search-patches "java-simple-xml-fix-tests.patch"))))
1575 (build-system ant-build-system)
1577 `(#:build-target "build"
1578 #:test-target "test"
1580 (modify-phases %standard-phases
1581 (replace 'install (install-jars "jar")))))
1583 `(("unzip" ,unzip)))
1584 (home-page "http://simple.sourceforge.net/")
1585 (synopsis "XML serialization framework for Java")
1586 (description "Simple is a high performance XML serialization and
1587 configuration framework for Java. Its goal is to provide an XML framework
1588 that enables rapid development of XML configuration and communication systems.
1589 This framework aids the development of XML systems with minimal effort and
1590 reduced errors. It offers full object serialization and deserialization,
1591 maintaining each reference encountered.")
1592 (license license:asl2.0)))
1594 (define-public perl-xml-xpathengine
1596 (name "perl-xml-xpathengine")
1600 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1601 "XML-XPathEngine-" version ".tar.gz"))
1604 "0r72na14bmsxfd16s9nlza155amqww0k8wsa9x2a3sqbpp5ppznj"))))
1605 (build-system perl-build-system)
1606 (home-page "https://metacpan.org/release/XML-XPathEngine")
1607 (synopsis "Re-usable XPath engine for DOM-like trees")
1609 "This module provides an XPath engine, that can be re-used by other
1610 modules/classes that implement trees.
1612 In order to use the XPath engine, nodes in the user module need to mimic DOM
1613 nodes. The degree of similitude between the user tree and a DOM dictates how
1614 much of the XPath features can be used. A module implementing all of the DOM
1615 should be able to use this module very easily (you might need to add the
1616 @code{cmp} method on nodes in order to get ordered result sets).")
1617 (license license:perl-license)))
1619 (define-public perl-tree-xpathengine
1621 (name "perl-tree-xpathengine")
1625 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1626 "Tree-XPathEngine-" version ".tar.gz"))
1629 "1vbbw8wxm79r3xbra8narw1dqvm34510q67wbmg2zmj6zd1k06r9"))))
1630 (build-system perl-build-system)
1631 (home-page "https://metacpan.org/release/Tree-XPathEngine")
1632 (synopsis "Re-usable XPath engine")
1634 "This module provides an XPath engine, that can be re-used by other
1635 module/classes that implement trees. It is designed to be compatible with
1636 @code{Class::XPath}, ie it passes its tests if you replace @code{Class::XPath}
1637 by @code{Tree::XPathEngine}.")
1638 (license license:perl-license)))
1640 (define-public perl-xml-filter-buffertext
1642 (name "perl-xml-filter-buffertext")
1647 (uri (string-append "mirror://cpan/authors/id/R/RB/RBERJON/"
1648 "XML-Filter-BufferText-" version ".tar.gz"))
1651 "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg"))))
1652 (build-system perl-build-system)
1654 `(("perl-xml-sax-base" ,perl-xml-sax-base)))
1655 (home-page "https://metacpan.org/release/XML-Filter-BufferText")
1656 (synopsis "Filter to put all characters() in one event")
1657 (description "This is a very simple filter. One common cause of
1658 grief (and programmer error) is that XML parsers aren't required to provide
1659 character events in one chunk. They can, but are not forced to, and most
1660 don't. This filter does the trivial but oft-repeated task of putting all
1661 characters into a single event.")
1662 (license license:perl-license)))
1664 (define-public perl-xml-sax-writer
1666 (name "perl-xml-sax-writer")
1671 "mirror://cpan/authors/id/P/PE/PERIGRIN/"
1672 "XML-SAX-Writer-" version ".tar.gz"))
1675 "1w1cd1ybxdvhmnxdlkywi3x5ka3g4md42kyynksjc09vyizd0q9x"))))
1676 (build-system perl-build-system)
1678 `(("perl-libxml" ,perl-libxml)
1679 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1680 ("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
1681 ("perl-xml-sax-base" ,perl-xml-sax-base)))
1682 (home-page "https://metacpan.org/release/XML-SAX-Writer")
1683 (synopsis "SAX2 XML Writer")
1685 "This is an XML writer that understands SAX2. It is based on
1686 @code{XML::Handler::YAWriter}.")
1687 (license license:perl-license)))
1689 (define-public perl-xml-handler-yawriter
1691 (name "perl-xml-handler-yawriter")
1696 (uri (string-append "mirror://cpan/authors/id/K/KR/KRAEHE/"
1697 "XML-Handler-YAWriter-" version ".tar.gz"))
1700 "11d45a1sz862va9rry3p2m77pwvq3kpsvgwhc5ramh9mbszbnk77"))))
1701 (build-system perl-build-system)
1703 `(("perl-libxml" ,perl-libxml)))
1704 (home-page "https://metacpan.org/release/XML-Handler-YAWriter")
1705 (synopsis "Yet another Perl SAX XML Writer")
1706 (description "YAWriter implements Yet Another @code{XML::Handler::Writer}.
1707 It provides a flexible escaping technique and pretty printing.")
1708 (license license:perl-license)))
1710 (define-public perl-xml-twig
1712 (name "perl-xml-twig")
1716 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1717 "XML-Twig-" version ".tar.gz"))
1720 "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy"))))
1721 (build-system perl-build-system)
1723 `(("expat" ,expat)))
1725 `(("perl-html-tidy" ,perl-html-tidy)
1726 ("perl-html-tree" ,perl-html-tree)
1727 ("perl-io-captureoutput" ,perl-io-captureoutput)
1728 ("perl-io-string" ,perl-io-string)
1729 ("perl-io-stringy" ,perl-io-stringy)
1730 ("perl-libxml" ,perl-libxml)
1731 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1732 ("perl-xml-handler-yawriter" ,perl-xml-handler-yawriter)
1733 ("perl-xml-parser" ,perl-xml-parser)
1734 ("perl-xml-sax-writer" ,perl-xml-sax-writer)
1735 ("perl-xml-simple" ,perl-xml-simple)
1736 ("perl-xml-xpathengine" ,perl-xml-xpathengine)
1737 ("perl-test-pod" ,perl-test-pod)
1738 ("perl-tree-xpathengine" ,perl-tree-xpathengine)))
1739 (home-page "https://metacpan.org/release/XML-Twig")
1740 (synopsis "Perl module for processing huge XML documents in tree mode")
1741 (description "@code{XML::Twig} is an XML transformation module. Its
1742 strong points: can be used to process huge documents while still being in tree
1743 mode; not bound by DOM or SAX, so it is very perlish and offers a very
1744 comprehensive set of methods; simple to use; DWIMs as much as possible.
1746 What it doesn't offer: full SAX support (it can export SAX, but only reads
1747 XML), full XPath support (unless you use @code{XML::Twig::XPath}), nor DOM
1749 (license license:perl-license)))
1751 ;; TODO: Debian builds several jars out of this: jaxp-1.4.jar,
1752 ;; xml-apis.jar and xml-apis-1.4.01.jar.
1753 (define-public java-jaxp
1760 (uri (string-append "mirror://apache/xerces/xml-commons/source/"
1761 "xml-commons-external-" version "-src.tar.gz"))
1763 (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk"))))
1764 (build-system ant-build-system)
1766 `(#:jar-name "jaxp.jar"
1769 #:tests? #f)); no tests
1770 (home-page "http://xerces.apache.org/xml-commons/")
1771 (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)")
1772 (description "Jaxp from the Apache XML Commons project is used by
1773 the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs:
1776 @item Document Object Model (DOM)
1777 @item Simple API for XML (SAX)
1778 @item Java APIs for XML Processing (JAXP)
1779 @item Transformation API for XML (TrAX)
1780 @item Document Object Model (DOM) Load and Save
1781 @item JSR 206 Java API for XML Processing
1783 (license (list license:asl2.0
1784 license:w3c ;; Files under org.w3c
1785 license:public-domain)))) ;; org.xml.sax
1787 (define-public java-apache-xml-commons-resolver
1789 (name "java-apache-xml-commons-resolver")
1794 (uri (string-append "mirror://apache/xerces/xml-commons/"
1795 "xml-commons-resolver-" version ".tar.gz"))
1797 (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm"))
1798 (modules '((guix build utils)))
1801 (for-each delete-file (find-files "." ".*\\.(jar|zip)"))
1803 (build-system ant-build-system)
1805 `(#:jar-name (string-append "xml-resolver.jar")
1806 #:tests? #f)); no tests
1808 `(("java-junit" ,java-junit)))
1809 (home-page "http://xerces.apache.org/xml-commons/")
1810 (synopsis "Catalog-based entity and URI resolution")
1811 (description "The resolver class implements the full semantics of OASIS Technical
1812 Resolution 9401:1997 (Amendment 2 to TR 9401) catalogs and the 06 Aug
1813 2001 Committee Specification of OASIS XML Catalogs.
1815 It also includes a framework of classes designed to read catalog files
1816 in a number of formats:
1819 @item The plain-text flavor described by TR9401.
1820 @item The XCatalog XML format defined by John Cowan
1821 @item The XML Catalog format defined by the OASIS Entity Resolution
1822 Technical Committee.
1824 (license license:asl2.0)))
1826 ;; Jaxen requires java-dom4j and java-xom that in turn require jaxen.
1827 ;; This package is a bootstrap version without dependencies on dom4j and xom.
1828 (define java-jaxen-bootstrap
1830 (name "java-jaxen-bootstrap")
1834 ;; No release on github
1835 (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/"
1836 version "/jaxen-" version "-sources.jar"))
1839 "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx"))))
1840 (build-system ant-build-system)
1842 `(#:jar-name "jaxen.jar"
1844 #:tests? #f; no tests
1846 (modify-phases %standard-phases
1847 (add-before 'build 'remove-dom4j
1849 (delete-file-recursively "src/org/jaxen/dom4j")
1850 (delete-file-recursively "src/org/jaxen/xom")
1853 `(("java-jdom" ,java-jdom)))
1854 (home-page "https://github.com/jaxen-xpath/jaxen")
1855 (synopsis "XPath library")
1856 (description "Jaxen is an XPath library written in Java. It is adaptable
1857 to many different object models, including DOM, XOM, dom4j, and JDOM. It is
1858 also possible to write adapters that treat non-XML trees such as compiled
1859 Java byte code or Java beans as XML, thus enabling you to query these trees
1861 (license license:bsd-3)))
1863 (define-public java-jaxen
1865 (inherit java-jaxen-bootstrap)
1868 `(("java-jdom" ,java-jdom)
1869 ("java-xom" ,java-xom)
1870 ("java-dom4j" ,java-dom4j)))))
1872 (define-public java-xom
1879 (url "https://github.com/elharo/xom")
1880 (commit (string-append "XOM_" version))))
1881 (file-name (git-file-name name version))
1884 "1jh6y03g5zzdhsb5jm6ms1xnamr460qmn96y3w6aw0ikfwqlg0bq"))
1885 (modules '((guix build utils)))
1888 (for-each delete-file
1889 (find-files "." "\\.jar$"))
1891 (build-system ant-build-system)
1893 `(#:jar-name "xom.jar"
1895 #:tests? #f ; no tests
1897 (modify-phases %standard-phases
1898 (add-after 'unpack 'make-git-checkout-writable
1900 (for-each make-file-writable (find-files "."))
1902 (add-before 'configure 'fix-tagsoup-dep
1904 ;; FIXME: Where is tagsoup source?
1905 (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java")
1908 `(("java-jdom" ,java-jdom)
1909 ("java-junit" ,java-junit)
1910 ("java-classpathx-servletapi" ,java-classpathx-servletapi)
1911 ("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
1912 ("java-xerces" ,java-xerces)))
1913 (home-page "https://xom.nu/")
1914 (synopsis "XML Object Model")
1915 (description "XOM is a new XML Object Model for processing XML with Java
1916 that strives for correctness and simplicity.")
1918 (license license:lgpl2.1)))
1920 (define-public java-xsdlib
1922 (name "java-xsdlib")
1926 (uri (string-append "https://repo1.maven.org/maven2/com/sun/msv/"
1927 "datatype/xsd/xsdlib/" version "/xsdlib-"
1928 version "-sources.jar"))
1931 "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim"))))
1932 (build-system ant-build-system)
1934 `(#:tests? #f; no tests
1935 #:jar-name "xsdlib.jar"
1938 `(("java-xerces" ,java-xerces)))
1939 (home-page (string-append "https://web.archive.org/web/20161127144537/"
1940 "https://msv.java.net//"))
1941 (synopsis "Sun Multi-Schema Validator")
1942 (description "Xsdlib contains an implementation of sun.com.msv, an XML
1944 (license license:bsd-2)))
1946 (define-public java-xpp3
1952 (uri (string-append "http://www.extreme.indiana.edu/dist/"
1953 "java-repository/xpp3/distributions/xpp3-"
1954 version "_src.tgz"))
1957 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
1958 (modules '((guix build utils)))
1960 '(begin ;; Delete bundled jar archives.
1961 (for-each delete-file (find-files "." ".*\\.jar"))
1963 (build-system ant-build-system)
1965 `(#:tests? #f; no tests
1966 #:build-target "jar"
1968 (modify-phases %standard-phases
1969 (replace 'install (install-jars "build")))))
1970 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
1971 (synopsis "Streaming pull XML parser")
1972 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
1973 parser and should be used when there is a need to process quickly and
1974 efficiently all input elements (for example in SOAP processors). This
1975 package is a stable XmlPull parsing engine that is based on ideas from XPP
1976 and in particular XPP2 but completely revised and rewritten to take the best
1977 advantage of JIT JVMs.")
1978 (license (license:non-copyleft "file://LICENSE.txt"))))
1980 (define-public java-xmlpull2
1982 (name "java-xmlpull2")
1986 (uri (string-append "http://www.extreme.indiana.edu/xgws/xsoap/"
1987 "PullParser/PullParser" version ".tgz"))
1990 "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md"))
1991 (modules '((guix build utils)))
1993 '(begin ;; Delete bundled jar archives.
1994 (for-each delete-file (find-files "." ".*\\.jar"))
1996 (build-system ant-build-system)
1998 `(#:tests? #f; no tests
1999 #:build-target "impl"
2001 (modify-phases %standard-phases
2002 (replace 'install (install-jars "build/lib")))))
2003 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
2004 (synopsis "Streaming pull XML parser")
2005 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
2006 parser and should be used when there is a need to process quickly and
2007 efficiently all input elements (for example in SOAP processors). This
2008 package is in maintenance mode.")
2009 (license (license:non-copyleft "file:///LICENSE.txt"))))
2011 (define-public java-dom4j
2018 (url "https://github.com/dom4j/dom4j")
2019 (commit (string-append "version-" version))))
2020 (file-name (git-file-name name version))
2023 "0q907srj9v4hwicpcrn4slyld5npf2jv7hzchsgrg29q2xmbwkdl"))
2024 (modules '((guix build utils)))
2026 '(begin ;; Delete bundled jar archives.
2027 (for-each delete-file (find-files "." ".*\\.jar"))
2029 (build-system ant-build-system)
2031 `(#:jar-name "dom4j.jar"
2033 #:source-dir "src/main/java"
2034 ;; FIXME: Requires xalan, but xalan depends on java-cup which has a
2035 ;; dependency on itself through jflex.
2038 (modify-phases %standard-phases
2039 (add-before 'build 'copy-jaxen-sources
2040 ;; java-jaxen-bootstrap is not enough. These files have a circular
2041 ;; dependency and there is no subset of dom4j that would allow
2042 ;; breaking the circle.
2043 (lambda* (#:key inputs #:allow-other-keys)
2044 (mkdir-p "jaxen-sources")
2045 (with-directory-excursion "jaxen-sources"
2046 (system* "jar" "xf" (assoc-ref inputs "java-jaxen-sources")))
2047 (mkdir-p "src/main/java/org/jaxen/dom4j")
2048 (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java"
2049 "src/main/java/org/jaxen/dom4j/DocumentNavigator.java")
2050 (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java"
2051 "src/main/java/org/jaxen/dom4j/Dom4jXPath.java")
2053 (add-before 'build 'fix-old-xpp2
2055 ;; This package normally depends on xpp2 2.0, but version 2.1.10
2056 ;; is the only version whose source code is published.
2057 (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java"
2058 (("public void resetStartTag")
2059 "public boolean removeAttributeByRawName(String name) {\n
2062 public boolean removeAttributeByName(String name, String name2) {\n
2064 }\n\npublic void resetStartTag")
2065 (("Atttribute") "Attribute"))
2068 `(("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
2069 ("java-jaxen-sources" ,(package-source java-jaxen-bootstrap))
2070 ("java-xmlpull2" ,java-xmlpull2)
2071 ("java-xpp3" ,java-xpp3)
2072 ("java-xsdlib" ,java-xsdlib)))
2074 `(("java-testng" ,java-testng)
2075 ("java-xerces" ,java-xerces)))
2076 (home-page "https://dom4j.github.io/")
2077 (synopsis "Flexible XML framework for Java")
2078 (description "Dom4j is a flexible XML framework for Java. DOM4J works
2079 with DOM, SAX, XPath, and XSLT. It can parse large XML documents with very
2080 low memory footprint.")
2081 ;; some BSD-like 5-clause license
2082 (license (license:non-copyleft "file://LICENSE"))))
2084 (define-public java-kxml2
2091 (url "https://github.com/stefanhaustein/kxml2")
2092 (commit (string-append "v" version))))
2093 (file-name (git-file-name name version))
2096 "0g6d8c9r9sh3x04sf4wdpgwvhkqvk11k3kq9skx91i60h4vn01hg"))))
2097 (build-system ant-build-system)
2099 `(#:jar-name "kxml2.jar"
2100 #:source-dir "src/main/java"
2101 #:test-include (list "TestWb.java")
2102 ;; Test failure: it was expected to get an XML entity but got the
2103 ;; equivalent Unicode character instead.
2106 (modify-phases %standard-phases
2107 (add-after 'unpack 'make-git-checkout-writable
2109 (for-each make-file-writable (find-files "."))
2111 (add-before 'build 'copy-resources
2113 (copy-recursively "src/main/resources" "build/classes")
2116 `(("java-xpp3" ,java-xpp3)))
2118 `(("java-junit" ,java-junit)))
2119 (home-page "http://kxml.org")
2120 (synopsis "XML pull parser")
2121 (description "kXML is a small XML pull parser, specially designed for
2122 constrained environments such as Applets, Personal Java or devices compliant
2123 with the Mobile Information Device Profile (MIDP).")
2124 (license license:expat)))
2126 (define-public java-stax
2132 (uri (string-append "https://repo1.maven.org/maven2/stax/stax/"
2133 version "/stax-" version "-sources.jar"))
2136 "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z"))))
2137 (build-system ant-build-system)
2139 `(#:jar-name "stax.jar"
2140 #:tests? #f; no tests
2142 (modify-phases %standard-phases
2143 (add-before 'configure 'fix-utf8
2145 ;; This file is ISO-8859-1 but java expects UTF-8.
2146 ;; Remove special characters in comments.
2147 (with-fluids ((%default-port-encoding "ISO-8859-1"))
2148 (substitute* "src/com/wutka/dtd/Scanner.java"
2151 (home-page "https://repo1.maven.org/maven2/stax/stax/")
2152 (synopsis "Streaming API for XML")
2153 (description "This package provides the reference implementation of the
2154 @dfn{Streaming API for XML} (StAX). It is used for streaming XML data to
2155 and from a Java application. It provides a standard pull parser interface.")
2156 (license license:asl2.0)))
2158 (define-public java-jettison
2160 (name "java-jettison")
2165 (url "https://github.com/codehaus/jettison")
2166 (commit (string-append "jettison-" version))))
2167 (file-name (git-file-name name version))
2170 "15sydmi5chdh4126qc7v8bsrp7fp4ldaya8a05iby4pq2324q0qw"))))
2171 (build-system ant-build-system)
2173 `(#:jar-name "jettison.jar"
2174 #:source-dir "src/main/java"
2175 #:test-exclude (list "**/Abstract*.java"
2178 "**/BadgerFishDOMTest.java"
2179 "**/MappedDOMTest.java")))
2181 `(("java-junit" ,java-junit)))
2182 (home-page "https://github.com/codehaus/jettison")
2183 (synopsis "StAX implementation for JSON")
2184 (description "Jettison is a Java library for converting XML to JSON and
2185 vice-versa with the help of the @dfn{Streaming API for XML} (StAX). It
2186 implements @code{XMLStreamWriter} and @code{XMLStreamReader} and supports
2187 @code{Mapped} and @code{BadgerFish} conventions.")
2188 (license license:asl2.0)))
2190 (define-public java-jdom2
2197 (url "https://github.com/hunterhacker/jdom")
2198 (commit (string-append "JDOM-" version))))
2199 (file-name (git-file-name name version))
2202 "14vv1kxrsdvwi4cz3rx6r48w5y6fvk9cymil8qhvxwp56xxrgxiq"))))
2203 (build-system ant-build-system)
2205 `(#:build-target "package"
2206 #:tests? #f ; tests are run as part of the build process
2208 (modify-phases %standard-phases
2210 (install-jars "build")))))
2211 (home-page "http://jdom.org/")
2212 (synopsis "Access, manipulate, and output XML data")
2213 (description "Jdom is a Java-based solution for accessing, manipulating, and
2214 outputting XML data from Java code.")
2215 (license license:bsd-4)))
2217 (define-public java-xstream
2219 (name "java-xstream")
2225 (url "https://github.com/x-stream/xstream")
2226 (commit (string-append
2228 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
2230 (file-name (git-file-name name version))
2232 (base32 "1178qryrjwjp44439pi5dxzd32896r5zs429z1qhlc09951r7mi9"))))
2233 (build-system ant-build-system)
2235 `(#:jar-name "xstream.jar"
2236 ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system.
2239 #:source-dir "xstream/src/java"))
2241 `(("java-jdom" ,java-jdom)
2242 ("java-jdom2" ,java-jdom2)
2243 ("java-cglib" ,java-cglib)
2244 ("java-joda-time" ,java-joda-time)
2245 ("java-jettison" ,java-jettison)
2246 ("java-xom" ,java-xom)
2247 ("java-xpp3" ,java-xpp3)
2248 ("java-dom4j" ,java-dom4j)
2249 ("java-stax2-api" ,java-stax2-api)
2250 ("java-woodstox-core" ,java-woodstox-core)
2251 ("java-kxml2" ,java-kxml2)
2252 ("java-stax" ,java-stax)))
2253 (home-page "https://x-stream.github.io")
2254 (synopsis "XML serialization library")
2255 (description "XStream is a simple library to serialize Java objects to XML
2257 (license license:bsd-3)))
2259 (define-public xmlrpc-c
2265 (uri (string-append "mirror://sourceforge/xmlrpc-c/Xmlrpc-c%20Super%20Stable/"
2266 version "/xmlrpc-c-" version ".tgz"))
2269 "18zwbj6i2hpcn5riiyp8i6rml0sfv60dd7phw1x8g4r4lj2bbxf9"))))
2270 (build-system gnu-build-system)
2274 `(;; For tools, if ever needed.
2277 `(#:make-flags ; Add $libdir to the RUNPATH of all the executables.
2278 (list (string-append "LDFLAGS_PERSONAL=-Wl,-rpath=" %output "/lib"))
2280 (modify-phases %standard-phases
2281 (add-after 'unpack 'fix-/bin/sh-in-tests
2283 (substitute* "GNUmakefile"
2284 (("#! /bin/sh") (which "sh")))
2286 (home-page "http://xmlrpc-c.sourceforge.net/")
2287 (synopsis "Lightweight RPC library based on XML and HTTP")
2289 "XML-RPC is a quick-and-easy way to make procedure calls over the Internet.
2290 It converts the procedure call into an XML document, sends it to a remote
2291 server using HTTP, and gets back the response as XML. This library provides a
2292 modular implementation of XML-RPC for C and C++.")
2293 (license (list license:psfl license:expat))))
2295 (define-public opensp
2301 (uri (string-append "mirror://sourceforge/openjade/opensp/"
2302 version "/OpenSP-" version ".tar.gz"))
2305 "1khpasr6l0a8nfz6kcf3s81vgdab8fm2dj291n5r2s53k228kx2p"))))
2306 (outputs '("out" "doc"))
2307 (build-system gnu-build-system)
2309 `(("docbook-xml" ,docbook-xml-4.1.2)
2310 ("docbook-xsl" ,docbook-xsl)
2311 ("libxml2" ,libxml2) ;for XML_CATALOG_DIR
2313 ;; Dependencies to regenerate the 'configure' script.
2314 ("autoconf" ,autoconf)
2315 ("automake" ,automake)
2316 ("gettext" ,gettext-minimal)
2317 ("libtool" ,libtool)))
2319 `( ;; Note: we cannot use '--enable-full-doc-build' as this would require
2320 ;; Openjade, which in turn requires this package.
2322 ;; Skip the tests that are known to fail (see:
2323 ;; https://sourceforge.net/p/openjade/mailman/message/6182316/)
2324 #:make-flags '("TESTS_THAT_FAIL=")
2326 (modify-phases %standard-phases
2327 (add-after 'unpack 'patch-docbook-paths
2328 (lambda* (#:key inputs #:allow-other-keys)
2329 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
2330 "/xml/dtd/docbook"))
2331 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
2332 "/xml/xsl/docbook-xsl-"
2333 ,(package-version docbook-xsl))))
2334 (substitute* (find-files "docsrc" "\\.xml$")
2335 (("/usr/share/sgml/docbook/xml-dtd-4.1.2") xmldoc)
2336 (("http://.*/docbookx\\.dtd")
2337 (string-append xmldoc "/docbookx.dtd")))
2339 (add-after 'patch-docbook-paths 'delete-configure
2340 ;; The configure script in the release was made with an older
2341 ;; Autoconf and lacks support for the `--docdir' option.
2343 (delete-file "configure")
2345 (add-after 'delete-configure 'honor-docdir
2346 ;; docdir is not honored due to being hardcoded in the various
2347 ;; Makefile.am (see: https://sourceforge.net/p/openjade/bugs/147/).
2349 (substitute* '("Makefile.am" "doc/Makefile.am" "docsrc/Makefile.am")
2350 (("^docdir = .*") "docdir = @docdir@\n"))
2352 (add-after 'delete-configure 'fix-tests-makefile.am
2353 ;; Remove the trailing $(SHELL) from the TESTS_ENVIRONMENT variable
2354 ;; definition. Otherwise, when targets are built using
2355 ;; "$(am__check_pre) $(LOG_DRIVER) [...]", there would be two
2356 ;; $(SHELL) expansion which fails the build.
2358 (substitute* "tests/Makefile.am"
2359 (("^\tOSGMLNORM=`echo osgmlnorm\\|sed '\\$\\(transform\\)'`\\\\")
2360 "\tOSGMLNORM=`echo osgmlnorm|sed '$(transform)'`")
2361 (("^\t\\$\\(SHELL\\)\n") ""))
2363 ;; $SGML_CATALOG_FILES lists 'catalog' or 'CATALOG' or '*.cat' files found
2364 ;; under the 'sgml' sub-directory of any given package.
2365 (native-search-paths (list (search-path-specification
2366 (variable "SGML_CATALOG_FILES")
2369 (file-pattern "^catalog$|^CATALOG$|^.*\\.cat$")
2370 (file-type 'regular))))
2371 (home-page "http://openjade.sourceforge.net/")
2372 (synopsis "Suite of SGML/XML processing tools")
2373 (description "OpenSP is an object-oriented toolkit for SGML parsing and
2374 entity management. It is a fork of James Clark's SP suite. The tools it
2375 contains can be used to parse, validate, and normalize SGML and XML files.
2376 The central program included in this package is @code{onsgmls}, which replaces
2377 @code{sgmls}, @code{ospam}, @code{ospent}, @code{osgmlnorm}, and @code{osx}.")
2379 ;; expat license with added clause regarding advertising
2380 (license:non-copyleft
2382 "See COPYING in the distribution."))))
2384 (define-public python-elementpath
2386 (name "python-elementpath")
2391 (uri (pypi-uri "elementpath" version))
2394 "15h7d41v48q31hzjay7qzixdv531hnga3h35hksk7x52pgqcrkz7"))))
2395 (build-system python-build-system)
2397 "https://github.com/sissaschool/elementpath")
2399 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
2401 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
2402 for Python's ElementTree XML data structures, both for the standard
2403 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
2405 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
2406 because lxml.etree already has it's own implementation of XPath 1.0.")
2407 (license license:expat)))
2409 (define-public python-lxml
2411 (name "python-lxml")
2416 (uri (pypi-uri "lxml" version))
2418 (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg"))))
2419 (build-system python-build-system)
2421 `(#:phases (modify-phases %standard-phases
2424 (invoke "make" "test"))))))
2426 `(("libxml2" ,libxml2)
2427 ("libxslt" ,libxslt)))
2428 (home-page "https://lxml.de/")
2429 (synopsis "Python XML processing library")
2431 "The lxml XML toolkit is a Pythonic binding for the C libraries
2432 libxml2 and libxslt.")
2433 (license license:bsd-3))) ; and a few more, see LICENSES.txt
2435 (define-public python2-lxml
2436 (package-with-python2 python-lxml))
2438 (define-public python-xmlschema
2440 (name "python-xmlschema")
2443 ;; Unit tests are not distributed with the PyPI archive.
2446 (url "https://github.com/sissaschool/xmlschema")
2447 (commit (string-append "v" version))))
2448 (file-name (git-file-name name version))
2451 "03bz5mp45y4shmlc1gxq1h69vjx60z1acg9cy4kq7fczgx8qg9jw"))))
2452 (build-system python-build-system)
2455 (modify-phases %standard-phases
2457 (lambda* (#:key (tests? #t) #:allow-other-keys)
2460 (setenv "PYTHONPATH"
2461 (string-append "./build/lib:"
2462 (getenv "PYTHONPATH")))
2463 (invoke "python" "-m" "unittest" "-v"))
2464 (format #t "test suite not run~%"))
2467 `(("python-lxml" ,python-lxml))) ;for tests
2469 `(("python-elementpath" ,python-elementpath)))
2470 (home-page "https://github.com/sissaschool/xmlschema")
2471 (synopsis "XML Schema validator and data conversion library")
2473 "The @code{xmlschema} library is an implementation of
2474 @url{https://www.w3.org/2001/XMLSchema, XML Schema} for Python. It has
2475 full support for the XSD 1.0 and 1.1 standards, an XPath-based API for
2476 finding schema's elements and attributes; and can encode and decode
2477 XML data to JSON and other formats.")
2478 (license license:expat)))
2480 (define-public python-xmltodict
2482 (name "python-xmltodict")
2487 (uri (pypi-uri "xmltodict" version))
2490 "08cadlb9vsb4pmzc99lz3a2lx6qcfazyvgk10pcqijvyxlwcdn2h"))))
2491 (build-system python-build-system)
2493 `(("python-coverage" ,python-coverage)
2494 ("python-nose" ,python-nose)))
2495 (home-page "https://github.com/martinblech/xmltodict")
2496 (synopsis "Work with XML like you are working with JSON")
2497 (description "This package provides a Python library to convert XML to
2498 @code{OrderedDict}.")
2499 (license license:expat)))