Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

String Functions that Use Pattern Matching in XQuery

MichaelSApr 26 2007 — edited Apr 27 2007
I can't get those »String Functions that Use Pattern Matching« get to work which are referenced in

XQuery 1.0 and XPath 2.0 Functions and Operators.

Are they not (yet) supported or am I doing simply something wrong?:
SQL> SELECT *
  FROM XMLTABLE('for $i in matches("abracadabra", "bra")
                 return $i')
*
Error at line 3
ORA-19112: error raised during evaluation: oracle.xquery.XQException: XP0017: It is a static error if the expanded QName and number of arguments in a function call do not match the name and arity of an in-scope function in the static context.
Detail: unknown function 'matches'

SQL> SELECT *
  FROM XMLTABLE('for $i in tokenize("The cat sat on the mat", "\s+") 
                 return $i')
                                                         *
Error at line 2
ORA-19112: error raised during evaluation: oracle.xquery.XQException: XP0017: It is a static error if the expanded QName and number of arguments in a function call do not match the name and arity of an in-scope function in the static context.
Detail: unknown function 'tokenize'

SQL> SELECT *
  FROM XMLTABLE('for $i in replace("abracadabra", "bra", "*") 
                 return $i')
                                                         *
Error at line 2
ORA-19112: error raised during evaluation: oracle.xquery.XQException: XP0017: It is a static error if the expanded QName and number of arguments in a function call do not match the name and arity of an in-scope function in the static context.
Detail: unknown function 'replace'
Regards,
Michael
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 25 2007
Added on Apr 26 2007
6 comments
1,790 views