You can certainly pass the pid in automatically in a disseminator, in your
BDef - by defining a parameter named, for example, pid, and in the method
properties setting the default value to $PID.

I'd suggest that what you could do is, instead of having a QUERY datastream
with your RDF query, instead construct a QUERY disseminator that creates the
query on the fly.

You could use XSLT (eg Fedora-supplied Saxon) to actually do the transform.
It would be similar in principle to the examples in 7.2 in Tutorial 2.

The disseminator would need to take as inputs
- your XSLT to construct the RDF query
- the PID

And would then output the RDF query for the specific object.

I'm not sure how you would get Saxon to pick up the PID as a parameter; so
an alternative would be to bind to the DC datastream, and the XSLT could
then extract the pid from <dc:identifier>.

Obviously you'll have to modify the disseminator that executes the query to
reference your new QUERY disseminator.

-----Original Message-----
From: arne anka [mailto:[EMAIL PROTECTED] 
Sent: 06 November 2008 16:33
To: [email protected]
Subject: [Fedora-commons-developers] RDF Query: dynamically insertcollection
id?


hi,
i am about to create several collections of basically the same objects  
(images with metadata, the collections bundle those with the same motifs,  
ie all with a crown, all with an eagle, ...).
according to richard green's great tutorial i will add a disseminator to  
each collection object that does a query for all implicit members.

the demo:SmilyStuff defines a query like below:

select $collTitle $collDesc $member $memberTitle $memberDesc
 from   <#ri>
where  <info:fedora/demo:SmileyStuff> <dc:title>                    
$collTitle
and    <info:fedora/demo:SmileyStuff> <dc:description>              
$collDesc
and    $member                        <fedora-rels-ext:isMemberOf>  
<info:fedora/demo:SmileyStuff>
and    $member                        <dc:title>                    
$memberTitle
and    $member                        <dc:description>              
$memberDesc


my 50 something collections will share literally the same query, except  
the id.
there's 3 times <info:fedora/demo:SmileyStuff> -- is there a way to  
dynamically insert the id of the current collection when calling the  
disseminator? if so, i need only one query for all collections. or do i
really need to create 50+ files (one for each collection)?

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes Grand prize is a trip for two to an Open Source event anywhere in the
world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers

Reply via email to