[PATCH] gnu: Add xml-namespace-xsd.

  • Done
  • quality assurance status badge
Details
2 participants
  • gemmaro
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
gemmaro
Severity
normal
G
G
gemmaro wrote on 11 Jul 15:13 +0200
(address . guix-patches@gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
1283f8098d3a7ea7d81fbbdff5816bb678bd7320.1720703597.git.gemmaro.dev@gmail.com
* gnu/packages/xml.scm (xml-namespace-xsd): New variable.

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

Toggle diff (52 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index c6ddae50ae..dee2b3287b 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -1953,3 +1953,40 @@ (define-public python-xmltodict
(description "This package provides a Python library to convert XML to
@code{OrderedDict}.")
(license license:expat)))
+
+(define-public xml-namespace-xsd
+ (package
+ (name "xml-namespace-xsd")
+ (version "2009-01")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "https://www.w3.org/2009/01/xml.xsd")
+ (sha256
+ (base32 "0agqmxbhk2q9xa38m02z7ggbb124z6avnqyhz8k43iicqhv1fw6c"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan #~'(("xml.xsd" "/xml/dtd/namespace/xml.xsd"))
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'install 'create-catalog
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((out (string-append #$output "/xml/dtd/namespace")))
+ (mkdir-p out)
+ (invoke (search-input-file inputs "/bin/xmlcatalog")
+ "--noout"
+ "--create"
+ "--add"
+ "uri"
+ "http://www.w3.org/2001/xml.xsd"
+ (string-append out "/xml.xsd")
+ (string-append out "/catalog.xml"))))))))
+ (native-inputs (list libxml2))
+ (home-page "https://www.w3.org/XML/1998/namespace")
+ (synopsis "XML Schema for XML namespace")
+ (description
+ "This package provides an XML Schema fragment and its catalog. The schema
+constrains the syntax of @code{xml:lang}, @code{xml:spec}, @code{xml:base}, and
+@code{xml:id} in the schema language defined by the XML Schema Recommendation Second
+Edition of 28 October 2004.")
+ (license license:w3c)))

base-commit: af4c90dc736295b19fda88cd8652f67f138409a1
prerequisite-patch-id: 89c3b2360d6de55e0ffcf0e9fd2bd04c0674be62
prerequisite-patch-id: 62fc54ed554df985530503c8e8c5b718c16b709b
prerequisite-patch-id: c22785847e70bf2f4c94547dd7851ad7de06b92a
--
2.45.2
G
G
gemmaro wrote on 12 Jul 14:50 +0200
[PATCH v2] gnu: Add xml-namespace-xsd.
(address . 72060@debbugs.gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
0771c5bdac599f05154969c2ec23f95d546dbeb5.1720788607.git.gemmaro.dev@gmail.com
* gnu/packages/xml.scm (xml-namespace-xsd): New variable.

Change-Id: Iec2d68f1d9190ba9e1723ca10adf1de0dfd2d722
---
I forgot to add copy-build-system in the first revision.

gnu/packages/xml.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (67 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index c6ddae50ae..71344dea0f 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
+;;; Copyright © 2024 gemmaro <gemmaro.dev@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -76,6 +77,7 @@ (define-module (gnu packages xml)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
@@ -1953,3 +1955,40 @@ (define-public python-xmltodict
(description "This package provides a Python library to convert XML to
@code{OrderedDict}.")
(license license:expat)))
+
+(define-public xml-namespace-xsd
+ (package
+ (name "xml-namespace-xsd")
+ (version "2009-01")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "https://www.w3.org/2009/01/xml.xsd")
+ (sha256
+ (base32 "0agqmxbhk2q9xa38m02z7ggbb124z6avnqyhz8k43iicqhv1fw6c"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan #~'(("xml.xsd" "/xml/dtd/namespace/xml.xsd"))
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'install 'create-catalog
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((out (string-append #$output "/xml/dtd/namespace")))
+ (mkdir-p out)
+ (invoke (search-input-file inputs "/bin/xmlcatalog")
+ "--noout"
+ "--create"
+ "--add"
+ "uri"
+ "http://www.w3.org/2001/xml.xsd"
+ (string-append out "/xml.xsd")
+ (string-append out "/catalog.xml"))))))))
+ (native-inputs (list libxml2))
+ (home-page "https://www.w3.org/XML/1998/namespace")
+ (synopsis "XML Schema for XML namespace")
+ (description
+ "This package provides an XML Schema fragment and its catalog. The schema
+constrains the syntax of @code{xml:lang}, @code{xml:spec}, @code{xml:base}, and
+@code{xml:id} in the schema language defined by the XML Schema Recommendation Second
+Edition of 28 October 2004.")
+ (license license:w3c)))

base-commit: 2d6a3799fcda5c017f653c6e96b91964b07a7ee0
prerequisite-patch-id: 62fc54ed554df985530503c8e8c5b718c16b709b
prerequisite-patch-id: c22785847e70bf2f4c94547dd7851ad7de06b92a
--
2.45.2
L
L
Liliana Marie Prikler wrote on 12 Jul 22:01 +0200
3235b7e1b2d19ffe5f7429e1f3190ebad09ba185.camel@gmail.com
Am Freitag, dem 12.07.2024 um 21:50 +0900 schrieb gemmaro:
Toggle quote (43 lines)
> * gnu/packages/xml.scm (xml-namespace-xsd): New variable.
>
> Change-Id: Iec2d68f1d9190ba9e1723ca10adf1de0dfd2d722
> ---
> I forgot to add copy-build-system in the first revision.
>
>  gnu/packages/xml.scm | 39 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
>
> diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
> index c6ddae50ae..71344dea0f 100644
> --- a/gnu/packages/xml.scm
> +++ b/gnu/packages/xml.scm
> @@ -33,6 +33,7 @@
>  ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
>  ;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
>  ;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
> +;;; Copyright © 2024 gemmaro <gemmaro.dev@gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -76,6 +77,7 @@ (define-module (gnu packages xml)
>    #:use-module (guix download)
>    #:use-module (guix git-download)
>    #:use-module (guix build-system cmake)
> +  #:use-module (guix build-system copy)
>    #:use-module (guix build-system gnu)
>    #:use-module (guix build-system meson)
>    #:use-module (guix build-system perl)
> @@ -1953,3 +1955,40 @@ (define-public python-xmltodict
>      (description "This package provides a Python library to convert
> XML to
>  @code{OrderedDict}.")
>      (license license:expat)))
> +
> +(define-public xml-namespace-xsd
> +  (package
> +    (name "xml-namespace-xsd")
> +    (version "2009-01")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri "https://www.w3.org/2009/01/xml.xsd")
It's a good idea to formulate URI in terms of version. In this case,
replacing the dash with a slash.
Toggle quote (15 lines)
> +       (sha256
> +        (base32
> "0agqmxbhk2q9xa38m02z7ggbb124z6avnqyhz8k43iicqhv1fw6c"))))
> +    (build-system copy-build-system)
> +    (arguments
> +     (list
> +      #:install-plan #~'(("xml.xsd" "/xml/dtd/namespace/xml.xsd"))
> +      #:phases #~(modify-phases %standard-phases
> +                   (add-before 'install 'create-catalog
> +                     (lambda* (#:key inputs #:allow-other-keys)
> +                       (let ((out (string-append #$output
> "/xml/dtd/namespace")))
> +                         (mkdir-p out)
> +                         (invoke (search-input-file inputs
> "/bin/xmlcatalog")
You can probably invoke the command by command name. Otherwise you'd
need to go through (or native-inputs inputs)
Toggle quote (8 lines)
> +                                 "--noout"
> +                                 "--create"
> +                                 "--add"
> +                                 "uri"
> +                                 "http://www.w3.org/2001/xml.xsd"
> +                                 (string-append out "/xml.xsd")
> +                                 (string-append out
> "/catalog.xml"))))))))
Don't forget that you can write to the local directory. You should
also do so and reflect the added file in the install-plan.
Toggle quote (5 lines)
> +    (native-inputs (list libxml2))
> +    (home-page "https://www.w3.org/XML/1998/namespace")
> +    (synopsis "XML Schema for XML namespace")
> +    (description
> +     "This package provides an XML Schema fragment and its catalog.
An XML Schema fragment?
Toggle quote (7 lines)
>   The schema
> +constrains the syntax of @code{xml:lang}, @code{xml:spec},
> @code{xml:base}, and
> +@code{xml:id} in the schema language defined by the XML Schema
> Recommendation Second
> +Edition of 28 October 2004.")
> +    (license license:w3c)))
Cheers
G
G
gemmaro wrote on 13 Jul 01:02 +0200
[PATCH v3] gnu: Add xml-namespace-xsd.
(address . 72060@debbugs.gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
988633b7bbd55e073600950f4737ab8dabe90ef3.1720825354.git.gemmaro.dev@gmail.com
* gnu/packages/xml.scm (xml-namespace-xsd): New variable.

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

Toggle diff (68 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index c6ddae50ae..85edcf0f7d 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
+;;; Copyright © 2024 gemmaro <gemmaro.dev@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -76,6 +77,7 @@ (define-module (gnu packages xml)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
@@ -1953,3 +1955,41 @@ (define-public python-xmltodict
(description "This package provides a Python library to convert XML to
@code{OrderedDict}.")
(license license:expat)))
+
+(define-public xml-namespace-xsd
+ (package
+ (name "xml-namespace-xsd")
+ (version "2009-01")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.w3.org/"
+ (string-replace-substring version "-" "/")
+ "/xml.xsd"))
+ (sha256
+ (base32 "0agqmxbhk2q9xa38m02z7ggbb124z6avnqyhz8k43iicqhv1fw6c"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan #~'(("xml.xsd" "/xml/dtd/namespace/xml.xsd")
+ ("catalog.xml" "/xml/dtd/namespace/catalog.xml"))
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'install 'create-catalog
+ (lambda _
+ (invoke "xmlcatalog"
+ "--noout"
+ "--create"
+ "--add"
+ "uri"
+ "http://www.w3.org/2001/xml.xsd"
+ "xml.xsd"
+ "catalog.xml"))))))
+ (native-inputs (list libxml2))
+ (home-page "https://www.w3.org/XML/1998/namespace")
+ (synopsis "XML Schema for XML namespace")
+ (description
+ "This package provides an XML Schema and its catalog. The schema constrains the
+syntax of @code{xml:lang}, @code{xml:spec}, @code{xml:base}, and @code{xml:id} in the
+schema language defined by the XML Schema Recommendation Second Edition of 28 October
+2004.")
+ (license license:w3c)))

base-commit: ff82e0f7b48cd0d4dd906f5d52ba5d4940222086
prerequisite-patch-id: 62fc54ed554df985530503c8e8c5b718c16b709b
prerequisite-patch-id: c22785847e70bf2f4c94547dd7851ad7de06b92a
--
2.45.2
G
G
gemmaro wrote on 21 Jul 04:46 +0200
Re: [PATCH v2] gnu: Add xml-namespace-xsd.
(address . 72060@debbugs.gnu.org)
87le1va2d1.fsf@mac.gemmaro.name
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (88 lines)
> Am Freitag, dem 12.07.2024 um 21:50 +0900 schrieb gemmaro:
>> * gnu/packages/xml.scm (xml-namespace-xsd): New variable.
>>
>> Change-Id: Iec2d68f1d9190ba9e1723ca10adf1de0dfd2d722
>> ---
>> I forgot to add copy-build-system in the first revision.
>>
>>  gnu/packages/xml.scm | 39 +++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 39 insertions(+)
>>
>> diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
>> index c6ddae50ae..71344dea0f 100644
>> --- a/gnu/packages/xml.scm
>> +++ b/gnu/packages/xml.scm
>> @@ -33,6 +33,7 @@
>>  ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
>>  ;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
>>  ;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
>> +;;; Copyright © 2024 gemmaro <gemmaro.dev@gmail.com>
>>  ;;;
>>  ;;; This file is part of GNU Guix.
>>  ;;;
>> @@ -76,6 +77,7 @@ (define-module (gnu packages xml)
>>    #:use-module (guix download)
>>    #:use-module (guix git-download)
>>    #:use-module (guix build-system cmake)
>> +  #:use-module (guix build-system copy)
>>    #:use-module (guix build-system gnu)
>>    #:use-module (guix build-system meson)
>>    #:use-module (guix build-system perl)
>> @@ -1953,3 +1955,40 @@ (define-public python-xmltodict
>>      (description "This package provides a Python library to convert
>> XML to
>>  @code{OrderedDict}.")
>>      (license license:expat)))
>> +
>> +(define-public xml-namespace-xsd
>> +  (package
>> +    (name "xml-namespace-xsd")
>> +    (version "2009-01")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri "https://www.w3.org/2009/01/xml.xsd")
> It's a good idea to formulate URI in terms of version. In this case,
> replacing the dash with a slash.
>> +       (sha256
>> +        (base32
>> "0agqmxbhk2q9xa38m02z7ggbb124z6avnqyhz8k43iicqhv1fw6c"))))
>> +    (build-system copy-build-system)
>> +    (arguments
>> +     (list
>> +      #:install-plan #~'(("xml.xsd" "/xml/dtd/namespace/xml.xsd"))
>> +      #:phases #~(modify-phases %standard-phases
>> +                   (add-before 'install 'create-catalog
>> +                     (lambda* (#:key inputs #:allow-other-keys)
>> +                       (let ((out (string-append #$output
>> "/xml/dtd/namespace")))
>> +                         (mkdir-p out)
>> +                         (invoke (search-input-file inputs
>> "/bin/xmlcatalog")
> You can probably invoke the command by command name. Otherwise you'd
> need to go through (or native-inputs inputs)
>> +                                 "--noout"
>> +                                 "--create"
>> +                                 "--add"
>> +                                 "uri"
>> +                                 "http://www.w3.org/2001/xml.xsd"
>> +                                 (string-append out "/xml.xsd")
>> +                                 (string-append out
>> "/catalog.xml"))))))))
> Don't forget that you can write to the local directory. You should
> also do so and reflect the added file in the install-plan.
>> +    (native-inputs (list libxml2))
>> +    (home-page "https://www.w3.org/XML/1998/namespace")
>> +    (synopsis "XML Schema for XML namespace")
>> +    (description
>> +     "This package provides an XML Schema fragment and its catalog.
> An XML Schema fragment?
>>   The schema
>> +constrains the syntax of @code{xml:lang}, @code{xml:spec},
>> @code{xml:base}, and
>> +@code{xml:id} in the schema language defined by the XML Schema
>> Recommendation Second
>> +Edition of 28 October 2004.")
>> +    (license license:w3c)))
> Cheers

Thank you for your review.
I sent revision 3 [1].

I may have forgotten to include your email address in X-Debbugs-Cc.
If that is the case, I apologise for the inconvenience.


Regards,
gemmaro.
L
L
Liliana Marie Prikler wrote on 21 Jul 12:04 +0200
Re: [bug#72060] [PATCH v2] gnu: Add xml-namespace-xsd.
378cf121a55a7edd6e15aceafdcfc483405ad9ee.camel@gmail.com
Am Sonntag, dem 21.07.2024 um 11:46 +0900 schrieb gemmaro:
Toggle quote (7 lines)
> Thank you for your review.
> I sent revision 3 [1].
>
> I may have forgotten to include your email address in X-Debbugs-Cc.
> If that is the case, I apologise for the inconvenience.
>
> [1] https://issues.guix.gnu.org/72060#3
Thanks for the hint. I've pushed v3 just now.

Cheers
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 72060
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