Yes indeed; you van only use pf:attribute as on the NFI branch I installed (same holds for caching); and on the current HEAD and on the soon to be released November branch.

In the past the value index was not complete and would return the root node for nonindexed values. When I activated the value index for automatic use, I made it to be complete such that this does not happen anymore.

On Nov 9, 2009, at 15:42, "Floris Ouwendijk (DT)" <floris@holmes.nl> wrote:

Thanks for the reply, Jennie.
When I use the the example, adapted for the document I'm using, I get
the entire document (also if I'm using attribute names/values that do
not exist in the document). In this situation I'm running the May SP2
release, do you know whether there were fixes in the last release that
will solve the problem?

Kind regards,
Floris


-----Original Message-----
From: Ying Zhang [mailto:Y.Zhang@cwi.nl]
Sent: maandag 9 november 2009 12:47
To: Communication channel for MonetDB users
Subject: Re: [MonetDB-users] Pf:attribute syntax

Hello Floris,

pf:attribute has two signatures:

pf:attribute (node()*, string) as node()* pf:attribute (node()*,
string1, string2, string3, string4, string5) as
node()*

I'm not sure about the syntax of the first signature, the syntax of the
second one is:

node: the XML node in which you want to search, e.g., a document node
string1: the Namespace of the element node,
string2: the local name of the element node
string3: the Namespace of the attribute,
string4: the local name of the attribute,
string5: value of the attribute,

An example:

pf:attribute(doc("xmark.xml"),"","seller","","person","person10")

which means: in the given xmark.xml doc, search for all "seller"
elements (empty namespace for the element, with local name 'seller'),
that have a "person" attribute (empty namespace for the attribute, with
local name "person"), whose value is "person10".
Thus, it will return all "seller" elements that have an attribute
'person="person10"'.

Hope this helps.


Regards,

Jennie


On Mon, Nov 09, 2009 at 10:55:01AM +0100, Floris Ouwendijk (DT) wrote:
Hi,

Can anybody shed some light on the pf:attribute syntax? I have some
straightforward queries that match on a unique attribute but do not
perform as desired. I'm hoping that using pf:attribute the
corresponding element can directly be located.

Kind regards,
Floris

----------------------------------------------------------------------
-------- Let Crystal Reports handle the reporting - Free Crystal
Reports 2008 30-Day trial. Simplify your report design, integration
and deployment - and focus on what you do best, core application
coding. Discover what's new with Crystal Reports now.  
http://p.sf.net/sfu/bobj-july
_______________________________________________
MonetDB-users mailing list
MonetDB-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monetdb-users

------------------------------------------------------------------------
------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day trial. Simplify your report design, integration and deployment -
and focus on what you do best, core application coding. Discover what's
new with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MonetDB-users mailing list
MonetDB-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monetdb-users

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MonetDB-users mailing list
MonetDB-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monetdb-users