RE: Regular Expressions in XQuery 1.0 and XPath 2.0?

> In XQuery 1.0 / XPath 2.0 can a regular expression, for example, be
used
> as an argument to the function xf:contains()?

No.  The regular expressions supported in the specifications currently
can only be used via the xf:matches function described in Section 6.3.15
xf:matches of 
http://www.w3.org/TR/xquery-operators/#func-matches

>I would be grateful if someone could clarify for me whether 
>the seeming omission in the TEXT use cases has a corresponding 
>deficiency of regular expression support in XQuery 1.0 and 
>XPath 2.0.

This is a good question.  Recently the XQuery WG agreed to make changes
to the Use Cases document to clarify that the TEXT use case is NOT about
full-text searching but only about "string searching".  The revised
document will be published in Nov.  

In addition the XML Query and XSL WGs have a joint task force that is
looking into full-text searching requirements and solutions for XPath
and XQuery.

/paulc
Chair, XML Query WG

Paul Cotton, Microsoft Canada 
17 Eleanor Drive, Nepean, Ontario K2E 6A3 
Tel: (613) 225-5445 Fax: (425) 936-7329 
<mailto:pcotton@microsoft.com> 


> -----Original Message-----
> From: Svgdeveloper@aol.com [mailto:Svgdeveloper@aol.com]
> Sent: Thursday, October 24, 2002 8:08 AM
> To: public-qt-comments@w3.org
> Subject: Regular Expressions in XQuery 1.0 and XPath 2.0?
> 
> 
> 
> 
> 
> This may be one of those cases where I am not picking up the key piece
of
> information across the multiple documents but at present I am unclear
> about
> what regular expression support is or is not present in XQuery 1.0
(and
> XPath
> 1.0).
> 
> I note that XSLT 2.0 has recently added the <xsl:analyze-string>
element
> to
> provide some regular expression support.
> 
> In XQuery 1.0 / XPath 2.0 can a regular expression, for example, be
used
> as
> an argument to the function xf:contains()?
> 
> I also notice that the "TEXT" section in the Use Cases WD makes no
mention
> of
> using regular expressions in full text searches. That seems, to me at
> least,
> a significant omission in the TEXT use cases. In fact, the Use Cases
> document
> seems totally to omit the notion of using regular expressions.
> 
> I would be grateful if someone could clarify for me whether the
seeming
> omission in the TEXT use cases has a corresponding deficiency of
regular
> expression support in XQuery 1.0 and XPath 2.0.
> 
> Andrew Watt
> 

Received on Thursday, 24 October 2002 12:10:34 UTC