GNU bug report logs - #72243
[PATCH] gnu: Add xlink-xsd.

Previous Next

Package: guix-patches;

Reported by: gemmaro <gemmaro.dev <at> gmail.com>

Date: Mon, 22 Jul 2024 12:02:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 72243 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#72243; Package guix-patches. (Mon, 22 Jul 2024 12:02:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to gemmaro <gemmaro.dev <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 22 Jul 2024 12:02:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: gemmaro <gemmaro.dev <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: gemmaro <gemmaro.dev <at> gmail.com>
Subject: [PATCH] gnu: Add xlink-xsd.
Date: Mon, 22 Jul 2024 20:59:01 +0900
* gnu/packages/xml.scm (xlink-xsd): New variable.

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

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





Information forwarded to guix-patches <at> gnu.org:
bug#72243; Package guix-patches. (Mon, 22 Jul 2024 14:37:03 GMT) Full text and rfc822 format available.

Message #8 received at 72243 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: gemmaro <gemmaro.dev <at> gmail.com>
Cc: 72243 <at> debbugs.gnu.org
Subject: Re: [bug#72243] [PATCH] gnu: Add xlink-xsd.
Date: Mon, 22 Jul 2024 15:36:45 +0100
Hi gemmaro,

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

> +(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:

--8<---------------cut here---------------start------------->8---
(define-public …
  (let* ((year …)
         (month …)
         (version (string-join (list "1.1" year month) "-")))
    (package …)))
--8<---------------cut here---------------end--------------->8---

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

> +      #: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





Information forwarded to mirai <at> makinata.eu, guix-patches <at> gnu.org:
bug#72243; Package guix-patches. (Mon, 22 Jul 2024 22:14:01 GMT) Full text and rfc822 format available.

Message #11 received at 72243 <at> debbugs.gnu.org (full text, mbox):

From: gemmaro <gemmaro.dev <at> gmail.com>
To: 72243 <at> debbugs.gnu.org
Cc: gemmaro <gemmaro.dev <at> gmail.com>
Subject: [PATCH v2] gnu: Add xlink-xsd.
Date: Tue, 23 Jul 2024 07:11:53 +0900
* gnu/packages/xml.scm (xlink-xsd): New variable.

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

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





This bug report was last modified 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.