Per https://bugzilla.wikimedia.org/show_bug.cgi?id=24781 , the XML output returned by the API has a namespace since 1.18.
1.17: <api> 1.18: <api xmlns="http://www.mediawiki.org/xml/api/">
Apparently this breaks for some people using XPATH expressions, although comments on Bugzilla indicated this shouldn't be the case, and since I don't know anything about XML namespaces I trusted my fellow MW devs who said it wouldn't be a problem :)
Roan
_______________________________________________ Mediawiki-api-announce mailing list Mediawiki-api-announce@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
Hi Roan,
Thanks for the infos. As I pointed out in an other thread, it's completely breaking my own tool.
XPath expressions with or without default namespaces are completely different, and I don't find a way to deal properly with both 1.17 and 1.18 API. Googling for "XPath default namespace" returns a lot of pages where it's explained that code has to be modified to parse XML documents with a default namespace, and the parsing is different if you don't have a default namespace.
Nico
On Thu, Oct 6, 2011 at 1:47 PM, Roan Kattouw roan.kattouw@gmail.com wrote:
Per https://bugzilla.wikimedia.org/show_bug.cgi?id=24781 , the XML output returned by the API has a namespace since 1.18.
1.17: <api> 1.18: <api xmlns="http://www.mediawiki.org/xml/api/">
Apparently this breaks for some people using XPATH expressions, although comments on Bugzilla indicated this shouldn't be the case, and since I don't know anything about XML namespaces I trusted my fellow MW devs who said it wouldn't be a problem :)
Roan
Mediawiki-api-announce mailing list Mediawiki-api-announce@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
On Thu, Oct 6, 2011 at 1:47 PM, Roan Kattouw roan.kattouw@gmail.com wrote:
Per https://bugzilla.wikimedia.org/show_bug.cgi?id=24781 , the XML output returned by the API has a namespace since 1.18.
Per the discussion on the bug, this list, and elsewhere, I have reverted the unconditional addition of the XML namespace. Once r99135 [1] has been deployed, the API will no longer output an XML namespace unless the includexmlnamespace has been set.
Bryan
[1] https://www.mediawiki.org/wiki/Special:Code/MediaWiki/99135
On Thu, Oct 6, 2011 at 10:14 PM, Bryan Tong Minh bryan.tongminh@gmail.comwrote:
On Thu, Oct 6, 2011 at 1:47 PM, Roan Kattouw roan.kattouw@gmail.com wrote:
Per https://bugzilla.wikimedia.org/show_bug.cgi?id=24781 , the XML output returned by the API has a namespace since 1.18.
Per the discussion on the bug, this list, and elsewhere, I have reverted the unconditional addition of the XML namespace. Once r99135 [1] has been deployed, the API will no longer output an XML namespace unless the includexmlnamespace has been set.
Thanks a lot !
Any estimation for the delay before r99135 will be deployed ? It's to know if it's useful for me to make changes in my tool to deal with the new namespace.
Nico
On Thu, Oct 6, 2011 at 10:24 PM, Nicolas Vervelle nvervelle@gmail.com wrote:
Any estimation for the delay before r99135 will be deployed ? It's to know if it's useful for me to make changes in my tool to deal with the new namespace.
I'm deploying it right now.
Roan
newbie here, I used the hack described here for php to not have to worry about the namespaces:
http://www.php.net/manual/en/domxpath.query.php#103461
it involves registering a custom namespace, then modifying your query to always use it. instead of the preg_replace you could just put your namespace in your expression manually.
Is there a plan to turn the namespacing default-on and use a parameter to turn it off instead in the future?
- Finlay
On Thu, Oct 6, 2011 at 4:43 PM, Roan Kattouw roan.kattouw@gmail.com wrote:
On Thu, Oct 6, 2011 at 10:24 PM, Nicolas Vervelle nvervelle@gmail.com wrote:
Any estimation for the delay before r99135 will be deployed ? It's to know if it's useful for me to make changes in my tool to deal with the new namespace.
I'm deploying it right now.
Roan
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Forwarding to the announce list. Apologies to the mediawiki-api list for double-posting.
---------- Forwarded message ---------- From: Bryan Tong Minh bryan.tongminh@gmail.com Date: Thu, Oct 6, 2011 at 10:14 PM Subject: Re: [Mediawiki-api] [Mediawiki-api-announce] API XML output now has a namespace To: mediawiki-api@lists.wikimedia.org Cc: MediaWiki API announcements & discussion mediawiki-api-announce@lists.wikimedia.org
On Thu, Oct 6, 2011 at 1:47 PM, Roan Kattouw roan.kattouw@gmail.com wrote:
Per https://bugzilla.wikimedia.org/show_bug.cgi?id=24781 , the XML output returned by the API has a namespace since 1.18.
Per the discussion on the bug, this list, and elsewhere, I have reverted the unconditional addition of the XML namespace. Once r99135 [1] has been deployed, the API will no longer output an XML namespace unless the includexmlnamespace has been set.
Bryan
[1] https://www.mediawiki.org/wiki/Special:Code/MediaWiki/99135
_______________________________________________ Mediawiki-api-announce mailing list Mediawiki-api-announce@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
mediawiki-api@lists.wikimedia.org