install.rdf extension id extraction namespace and attribute/child problems

RESOLVED INVALID

Status

addons.mozilla.org Graveyard
Add-on Validation
RESOLVED INVALID
6 years ago
2 years ago

People

(Reporter: Till Maas, Unassigned)

Tracking

Details

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1
Build ID: 20120616215704

Steps to reproduce:

I wanted to get the extension ID of several extensions as described in
http://kb.mozillazine.org/Determine_extension_ID


Actual results:

This does not work for all extensions from AMO, because extensions tend to use incompatible formats for install.rdf. This fails for at least two reasons:

1) Sometimes em:id is not a child node of <rdf:Description> but an attribute of <rdf:Description>
2) Sometimes the "about" attribute of <rdf:Description> is not in no namespace but in the "rdf" namespace.


Expected results:

There should be one easy way to get the extension ID from install.rdf via xpath. For this to work a proper format of install.rdf for all extensions provided by AMO should be enforced as part of the validation process. For example there should be a test with one xpath expression that must return the extension id for the extension to be accepted.

Comment 1

6 years ago
XPath is not a viable tool for extracting information from RDF. Instead, use a library like rdflib (for Python; there are others for other languages).

If you need an example, please see:

https://github.com/mozilla/amo-validator/blob/master/validator/rdf.py#L69
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → INVALID
(Assignee)

Updated

2 years ago
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.