Last modified: 2012-03-21 20:44:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29775, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27775 - namespace should have it's own XML tag
namespace should have it's own XML tag
Status: RESOLVED FIXED
Product: Datasets
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Ariel T. Glenn
: analytics, patch, patch-need-review
Depends on:
Blocks: 27772
  Show dependency treegraph
 
Reported: 2011-02-28 00:16 UTC by Diederik van Liere
Modified: 2012-03-21 20:44 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
This patch adds a new tag <ns> to a <page> tag. (701 bytes, patch)
2011-08-22 20:53 UTC, Diederik van Liere
Details

Description Diederik van Liere 2011-02-28 00:16:44 UTC
Currently, the namespace and article title are merged into a single tag, but it would make life easier to have a separate <namespace> tag.
Comment 1 Diederik van Liere 2011-04-05 16:15:29 UTC
I will briefly expand on this. Right now if you want to determine whether an article belongs to the main namespace, you need to rule out that it does not belong to any other namespace. So, you iterate over all the local names of the namespace and make sure that the title of the article does not match to the namespace. If none of the namespaces match then you can conclude the article belongs to the main namespace. So this is a lot of extra work and a separate <namespace>0</namespace> tag would be ideal.
Comment 2 Andrew Dunbar 2011-08-19 12:20:39 UTC
I agree. The text matching currently necessary doesn't have to be there. But besides the suggested <namespace> tag I would suggest also the more concise <ns> tag, or even better, just add an attribute either "ns" or "namespace" to the <title> tag.
Comment 3 Diederik van Liere 2011-08-22 20:53:00 UTC
Created attachment 8963 [details]
This patch adds a new tag <ns> to a <page> tag.
Comment 4 Andrew Dunbar 2011-08-23 12:03:24 UTC
Just a note to say please make sure that the XML dump version number is bumped at the same time a dump feature is added so that dump parsers that need to work with all dump versions can enable support for features based on the version number. It can make the code faster and the version number wasn't changed when the <redirect> tag was added.
Comment 5 Sumana Harihareswara 2011-09-30 16:00:41 UTC
Added the "patch" and "need-review" keywords; Mark hopes to get someone to review the patch soon.
Comment 6 Ariel T. Glenn 2011-10-02 07:38:42 UTC
This patch looks ok to me.  

Bear in mind that it's possible for the namespaces to change in the middle of a run, for example if a custom namespace is added to accomodate content that the community wishes to move out of the main namespace.  That won't happen often but dump users will probably get bitten by it once in awhile.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links