https://bugzilla.wikimedia.org/show_bug.cgi?id=45805
Web browser: ---
Bug ID: 45805
Summary: The format of the data parameter conflicts with xpath
Product: MediaWiki extensions
Version: REL1_19 branch
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: ExternalData
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Mobile Platform: ---
Given this snippet of XML:
<PROP name="cors" val="valox"/>
<PROP name="spec" val="DAS"/>
The following XPath should select the value 'valid':
//PROP[@name='cors']/@val
You can confirm this using xmlstarlet:
# gives 'valox'
xmlstarlet sel -t -v "//PROP[@name='cors']/@val" -n snippet.xml
However, the = sign in the XPath messes with the way the data parameter takes
values, namely as key=value pairs separated by commas. i.e. here is how my call
looks:
{{#get_web_data:url=http://www.dasregistry.org/das/sources
|format=XML
|use xpath
|data=title=//@title,description=//@description,sourcesDoc=//PROP[@name='sourcesDoc']/@value
}}
I'm seeing 'external_values' for the title and description local variables, but
not the sourcesDoc (which shows up 'blank').
--
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l