1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#18170: XML: ExtractValue(): XPath expression can't use QNames (colon in names)

Problem source:
Qualified names (aka QName) didn't work as tag names and attribute names,
because the parser lacked a real rule to scan QName, so it understood
only non-qualified names without prefixes.

Solution:
New rule was added to check both "ident" and "ident:ident" sequences.
This commit is contained in:
bar@mysql.com
2006-04-17 11:49:20 +05:00
parent 6f5999e9b5
commit faee72a936
3 changed files with 42 additions and 1 deletions

View File

@@ -641,3 +641,12 @@ CALL p2();
EXTRACTVALUE(p,'/Ñ/r')
A
DROP PROCEDURE p2;
select extractValue('<ns:element xmlns:ns="myns"/>','count(ns:element)');
extractValue('<ns:element xmlns:ns="myns"/>','count(ns:element)')
1
select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element');
extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element')
a
select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns');
extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns')
myns