Metalink schema

36 views
Skip to first unread message

Anthony Bryan

unread,
Mar 1, 2010, 2:51:27 PM3/1/10
to Metalink Discussion
we have an XSD for metalink3

http://www.metalinker.org/schema/3.0/metalink.xsd

and a Relax NG compact schema in the ID / metalink4

http://tools.ietf.org/html/draft-bryan-metalink-28#appendix-B

could someone produce XSD for metalink4?

--
(( Anthony Bryan ... Metalink [ http://www.metalinker.org ]
)) Easier, More Reliable, Self Healing Downloads

Tatsuhiro Tsujikawa

unread,
Mar 2, 2010, 7:24:47 AM3/2/10
to metalink-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

trang does the job.

trang metalink4.rnc metalink4.xsd

trang reported some warnings.

metalink4.rnc:192:8: warning: cannot represent required wildcard
attribute; approximating
metalink4.rnc:194:5: warning: choice between attributes and children
cannot be represented; approximating
metalink4.rnc:204:4: warning: cannot represent required wildcard
attribute; approximating
metalink4.rnc:212:8: warning: choice between attributes and children
cannot be represented; approximating
metalink4.rnc:219:8: warning: choice between attributes and children
cannot be represented; approximating

Anthony Bryan wrote:
> we have an XSD for metalink3
>
> http://www.metalinker.org/schema/3.0/metalink.xsd
>
> and a Relax NG compact schema in the ID / metalink4
>
> http://tools.ietf.org/html/draft-bryan-metalink-28#appendix-B
>
> could someone produce XSD for metalink4?
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkuNA48ACgkQfoQD1dZzw2YdKQCgsZ52Ay6G1x3qqtnCCYzXGvbt
wIMAnjS3hRptlGpaPZQy4w7lnceIujjl
=F/UW
-----END PGP SIGNATURE-----

metalink4.rnc
metalink4.xsd

David Huard

unread,
Mar 28, 2019, 5:57:28 PM3/28/19
to Metalink Discussion
Newbie here, 

What should be in local.xsd ? 

XMLSchemaParseError: Element '{http://www.w3.org/2001/XMLSchema}attributeGroup', attribute 'ref': The QName value 'local' does not resolve to a(n) attribute group definition., line 206

Cheers, 

David

Bram Neijt

unread,
Apr 3, 2019, 4:29:23 PM4/3/19
to Metalink Discussion
I don't really understand the question enough, could you maybe give some background on the problem you are having?

Greetings,
Bram

--
You received this message because you are subscribed to the Google Groups "Metalink Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metalink-discus...@googlegroups.com.
To post to this group, send email to metalink-...@googlegroups.com.
Visit this group at https://groups.google.com/group/metalink-discussion.
For more options, visit https://groups.google.com/d/optout.

David Huard

unread,
Apr 3, 2019, 5:17:30 PM4/3/19
to metalink-...@googlegroups.com
I want to use the metalink4.xsd file to validate a metalink file I'm creating. When I load the schema using lxml.etree.XMLSchema, I get errors that I interpret (again, newbie) as being due to the fact that the metalink.xsd has a reference to a local.xsd file that is undefined. 

<xsd:import schemaLocation="local.xsd"/>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>

In other words, the validator tries to import this "local.xsd", looks up in the local directory, finds nothing and reports an error. 

So my question is, what is this "local.xsd" file ? Where can I find it or how do I define it ? 

Thanks !

--
David Huard, PhD
Spécialiste Scénarios et services climatiques, Ouranos

Bram Neijt

unread,
Apr 4, 2019, 2:44:40 AM4/4/19
to Metalink Discussion
The metalink rfc refers to an empty local in

This is probably used for local definitions you might have in the default xml namespace.

I think that stems from 

But I must admit that I'm not an XML expert.

My best guess is that it's there to allow you to define your own local xsd mixin, so either create an empty (but valid) xsd file called local.xsd or remove the line from the xsd for now.

You can find an example of an empty xsd here:

Greetings,

Bram

David Huard

unread,
Apr 4, 2019, 10:22:42 AM4/4/19
to metalink-...@googlegroups.com
Thanks !

So for reference, I had to remove four lines in metalink4.xsd:

<xsd:import schemaLocation="local.xsd"/>
<xsd:group ref="metalink:extensionElement"/> 2x
<xsd:attributeGroup ref="local"/>

Then it validates and I can use it to validate an xml. 

Thanks for your help ! Really appreciated. 

Reply all
Reply to author
Forward
0 new messages