Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon XML Schema (metadata.xsd) is invalid #25234

Open
petrkutalek opened this issue May 19, 2024 · 2 comments
Open

Addon XML Schema (metadata.xsd) is invalid #25234

petrkutalek opened this issue May 19, 2024 · 2 comments
Labels
Ignored rules issue that does not follow the rules (no template, missing debug log, ...) Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it

Comments

@petrkutalek
Copy link

petrkutalek commented May 19, 2024

I wanted to validate the XML definition of the addon I am working on

<addonxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/xbmc/xbmc/master/addons/xbmc.addon/metadata.xsd"
>

Nevertheless, in doing so I came across an error in the XSD file describing the addon XML schema definition (metadata.xsd), it seems to me that it is invalid.

https://raw.githubusercontent.com/xbmc/xbmc/master/addons/xbmc.addon/metadata.xsd
src-resolve: Cannot resolve the name 'nonEmptyStringCapped' to a(n) 'type definition' component.

In addition, the XSD does not seem to reflect the structure required by the latest versions.

@xbmc-gh-bot xbmc-gh-bot bot added Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it Ignored rules issue that does not follow the rules (no template, missing debug log, ...) labels May 19, 2024
@xbmc-gh-bot
Copy link

xbmc-gh-bot bot commented May 19, 2024

Thank you for using Kodi and our issue tracker. This is your friendly Kodi GitHub bot 😉

It seems that you have not followed the template we provide and require for all bug reports (or have opened a roadmap item by accident). Please understand that following the template is mandatory and required for the team to be able handle the volume of open issues efficiently.

Please edit your issue message to follow our template and make sure to fill in all fields appropriately. The issue will be closed after one week has passed without satisfactory follow-up from your side.

This is an automatically generated message. If you believe it was sent in error, please say so and a team member will remove the "Ignored rules" label.

@fuzzard
Copy link
Contributor

fuzzard commented May 25, 2024

Try the following diff to fix the nonEmptyStringCapped failure. ive no idea if our addon xmls are actually meant to validate though, so thats a question for someone else

diff --git a/addons/xbmc.addon/metadata.xsd b/addons/xbmc.addon/metadata.xsd
index 86a867e919..e0f62da71f 100644
--- a/addons/xbmc.addon/metadata.xsd
+++ b/addons/xbmc.addon/metadata.xsd
@@ -82,4 +82,10 @@
   <xs:simpleType name="platformList">
     <xs:list itemType="platformType"/>
   </xs:simpleType>
+  <xs:simpleType name="nonEmptyStringCapped">
+      <xs:restriction base="xs:string">
+          <xs:minLength value="1"/>
+          <xs:whiteSpace value="collapse"/>
+      </xs:restriction>
+  </xs:simpleType>
 </xs:schema>

Seems to validate what @AlwinEsch intended with the original implementation in #18286
Im guessing he just forgot to add an element to define nonEmptyStringCapped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ignored rules issue that does not follow the rules (no template, missing debug log, ...) Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it
Projects
None yet
Development

No branches or pull requests

2 participants