On Fri, 2013-12-27 at 09:20 +0000, e-letter wrote:
> Xpath1 specification ยง 4.2 string functions
> (http://www.w3.org/TR/xpath/#section-String-Functions) describes a
> "contains" function, but this was not found in xpath2; 

Better to use the XPath 2 Functions and Operators spec, which does
indeed list fn:contains().

In XQuery you might need to call it fn:contains() rather than
contains(), depending on options.

> Is it possible to remove the xml elements from the output file?

Change return $x to return $x/text() maybe

> An alternative xquery was attempted:
> 
> ...<p>
>       {
>               let $x := 
> fn:doc("xmldatabasefile.xml")/bookstore/book/title/text()
>               return $x
>       }
> </p>...

> Is it possible to select a specific title text with this xquery syntax?

Yes. E.g. ......bookstore/book/title[fn:contains(., 'Learning XML')]

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to