Oracle XQuery Extensions

Oracle XML DB provides some useful XQuery extension functions, which are summarized in Table 8-1.

All of these functions have the XML DB namespace http://xmlns.oracle.com/xdb defined with the ora prefix. Let’s review their functionality in this section.

Function Name

Description

ora:contains(input_text, text_query, [policy_name][,policy_owner]) Returns positive number if input_text has full-text matches of text_query.
ora:matches(target_string, match_pattern [, match_parameter]) Uses regular expressions to match text similar to the SQL REGEXP_LIKE condition. The function returns true if target_string matches the regular expression match_pattern. Otherwise, it returns false.
ora:replace(target_string, match_pattern, ...

Get Oracle Database 11g Building Oracle XML DB Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.