Re: [bdbxml] Beginners question with Perl

Peter Hickman <[email protected]>
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
I've created the following script

setVerbose 0 0

preload books.dbxml

query '
for $collection in collection("books.dbxml")/collection return <link 
class="collectiontitle" title="{$collection/@title/text()}" 
idref="{$collection/@id/text()}" />
'
print

quit

Which when run produces

[Bible]$ dbxml -s test.xquery
<link class="collectiontitle" title="analects" idref="b4"/>
<link class="collectiontitle" title="Bhagavad-Gita" idref="b3"/>
<link class="collectiontitle" title="bible" idref="b1"/>
<link class="collectiontitle" title="koran" idref="b2"/>
[Bible]$

However in the perl script I cannot get away with giving anything less 
than the full path to the data, ie 
/Users/peterhickman/Work/Bible/books.dbxml.

Michael O\\\\\\\\\\\\\\\'Sullivan wrote:

>Hi Peter,
>Have you verified that the query behaves as you would like?
>I'd recommend, running the dbxml shell, opening the container and adding the
>document and then using the query method from the shell to debug your XQuery
>statement. Once you know it works you can add it into your perl script.
>
>michael.
>
>
>
>
>
>------------------------------------------
>To remove yourself from this list, send an
>email to [email protected]
>
>
>  
>



------------------------------------------
To remove yourself from this list, send an
email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.