[PATCH] gnu: Add xlink-xsd.

  • Open
  • quality assurance status badge
Details
2 participants
  • gemmaro
  • Bruno Victal
Owner
unassigned
Submitted by
gemmaro
Severity
normal
G
G
gemmaro wrote on 22 Jul 13:59 +0200
(address . guix-patches@gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
b518796dd0ac1d568e4a322cf48b6c0188d072d2.1721649541.git.gemmaro.dev@gmail.com
* gnu/packages/xml.scm (xlink-xsd): New variable.

Change-Id: If18f2018bd205134ea7d7d627b0d09c87c108415
---
gnu/packages/xml.scm | 44 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)

Toggle diff (63 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 85edcf0f7d..3c14a677af 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -85,7 +85,8 @@ (define-module (gnu packages xml)
#:use-module (guix deprecation)
#:use-module (guix utils)
#:use-module (gnu packages linux)
- #:use-module (gnu packages pkg-config))
+ #:use-module (gnu packages pkg-config)
+ #:use-module (ice-9 regex))
(define-public libxmlb
(package
@@ -1993,3 +1994,44 @@ (define-public xml-namespace-xsd
schema language defined by the XML Schema Recommendation Second Edition of 28 October
2004.")
(license license:w3c)))
+
+(define-public xlink-xsd
+ (package
+ (name "xlink-xsd")
+ (version "1.1-2008-06")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (let* ((matches (string-match
+ "[0-9]+.[0-9]+-([0-9]{4})-([0-9]{2})" version))
+ (year (match:substring matches 1))
+ (month (match:substring matches 2)))
+ (string-append "https://www.w3.org/XML/" year "/" month
+ "/xlink.xsd")))
+ (sha256
+ (base32 "0jpjha5iiq4rf4hx3qfnmyya9cf17ysxz0rbhsffn5nwgxnghgf8"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan #~'(("xlink.xsd" "/xml/dtd/xlink/xlink.xsd")
+ ("catalog.xml" "/xml/dtd/xlink/catalog.xml"))
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'install 'create-catalog
+ (lambda _
+ (invoke "xmlcatalog"
+ "--noout"
+ "--create"
+ "--add"
+ "uri"
+ "http://www.w3.org/1999/xlink.xsd"
+ "xlink.xsd"
+ "catalog.xml"))))))
+ (native-inputs (list libxml2))
+ (home-page "https://www.w3.org/TR/xlink/")
+ (synopsis "XML Schema for XML Linking language")
+ (description
+ "This package provides an XML Schema document and its catalog file for
+the XML Linking Language (XLink). It provides the XLink-1.1 specific
+declarations and definitions for use in defining linking elements
+which conform to the XLink specification.")
+ (license license:w3c)))

base-commit: e5c0b62debc6f48a32a65736d9ba3da0b1e59cb9
--
2.45.2
B
B
Bruno Victal wrote on 22 Jul 16:36 +0200
(name . gemmaro)(address . gemmaro.dev@gmail.com)(address . 72243@debbugs.gnu.org)
65b5c438-b3a7-44bd-a072-78d81691e850@makinata.eu
Hi gemmaro,

On 2024-07-22 12:59, gemmaro wrote:

Toggle quote (14 lines)
> +(define-public xlink-xsd
> + (package
> + (name "xlink-xsd")
> + (version "1.1-2008-06")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (let* ((matches (string-match
> + "[0-9]+.[0-9]+-([0-9]{4})-([0-9]{2})" version))
> + (year (match:substring matches 1))
> + (month (match:substring matches 2)))
> + (string-append "https://www.w3.org/XML/" year "/" month
> + "/xlink.xsd")))

Perhaps something like:

Toggle snippet (7 lines)
(define-public …
(let* ((year …)
(month …)
(version (string-join (list "1.1" year month) "-")))
(package …)))

would be more readable instead of matching the version string with regex?

Toggle quote (3 lines)
> + #:install-plan #~'(("xlink.xsd" "/xml/dtd/xlink/xlink.xsd")
> + ("catalog.xml" "/xml/dtd/xlink/catalog.xml"))

I'd prefer to place these under "/xml/xsd/xlink/{xlink.xsd,catalog.xml}"
instead since these are not DTD files.


Cheers,

--
Bruno
G
G
gemmaro wrote on 23 Jul 00:11 +0200
[PATCH v2] gnu: Add xlink-xsd.
(address . 72243@debbugs.gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
0bec120534a03a9db5b613cd12119158001355b4.1721686313.git.gemmaro.dev@gmail.com
* gnu/packages/xml.scm (xlink-xsd): New variable.

Change-Id: If18f2018bd205134ea7d7d627b0d09c87c108415
---
gnu/packages/xml.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 85edcf0f7d..b73172c048 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -1993,3 +1993,42 @@ (define-public xml-namespace-xsd
schema language defined by the XML Schema Recommendation Second Edition of 28 October
2004.")
(license license:w3c)))
+
+(define-public xlink-xsd
+ (let* ((year "2008")
+ (month "06"))
+ (package
+ (name "xlink-xsd")
+ (version (string-join (list "1.1" year month) "-"))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.w3.org/XML/" year "/" month
+ "/xlink.xsd"))
+ (sha256
+ (base32 "0jpjha5iiq4rf4hx3qfnmyya9cf17ysxz0rbhsffn5nwgxnghgf8"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan #~'(("xlink.xsd" "/xml/xsd/xlink/xlink.xsd")
+ ("catalog.xml" "/xml/xsd/xlink/catalog.xml"))
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'install 'create-catalog
+ (lambda _
+ (invoke "xmlcatalog"
+ "--noout"
+ "--create"
+ "--add"
+ "uri"
+ "http://www.w3.org/1999/xlink.xsd"
+ "xlink.xsd"
+ "catalog.xml"))))))
+ (native-inputs (list libxml2))
+ (home-page "https://www.w3.org/TR/xlink/")
+ (synopsis "XML Schema for XML Linking language")
+ (description
+ "This package provides an XML Schema document and its catalog file for
+the XML Linking Language (XLink). It provides the XLink-1.1 specific
+declarations and definitions for use in defining linking elements
+which conform to the XLink specification.")
+ (license license:w3c))))

base-commit: e5c0b62debc6f48a32a65736d9ba3da0b1e59cb9
--
2.45.2
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 72243@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72243
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch