Nina:

I didn't see a reply to your post.  I'm relatively new to Cocoon but
can relate to your question and was considering this tonight.

Yes, if you're new to this environment it's going to be intimidating to
figure this out since yes, it's straightforward to do ith with a
relational db and servlet (I've done this).

Most of the experts on this board will probably tell you it's easy to
do this in Cocoon but of course they know how to do it.  What they mean
is it can be done with a few lines of code!  There's a difference
between easy and short.

Technically, I believe the answer entails a pipeline that scours the
directory for the file names, converting these to XML; next step in the
pipeline scours each file and extracts JUST the street element; next
step does the searching.  That's the highlevel approach.  You'll have
to spend a couple of hours learning what a pipeline is and matchers.

If you have thousands of files then for performance reasons you'd
probably want to batch (daily, hourly, whatever depending upon the
currency you need) the process of the first two steps above, and put
the results into a file that would look like this:

<mydocs>
 <file name="foo1.xml" street="elm"/>
 <file name="foo2.xml" street="maple"/>
 ...
</mydocs>

then you would only have to search this file each time.  

This is just my thinking, from limited experience, but thought I'd put
my two cents in.  Like most things in Cocoon, seems there are numerous
solutions to each problem.

(I would have posted this to get others' feedback but I'm in the midst
of moving my list subscription to another email address so it was
difficult to do that.)

David







 
--- Nina Juliadotter <[EMAIL PROTECTED]> wrote:
> Hi everyone,
> 
> Is there an obvious and reasonable simple way to search a XML
> repository (= a bunch
> of XML documents) using POST parameters supplied to by the user?
> 
> What I have is an HTML form where the user can enter some search
> criteria and submit
> this, and get back all xml documents matching this (the documents all
> conform to a
> certain XML schema, so the elements in it are known). For example,
> there is an
> <input type="text" name="street"> where the user can enter the street
> name, and get
> back all XML documents that have a "street" element with the same
> value as the one
> supplied by the user.
> 
> In a "normal" servlet/jdbc environment (relational database), this is
> so straight
> forward, but how would I ideally go about doing this in Cocoon? I've
> glanced at
> Xindice and Cocoon's Lucene, but it all seems so complicated that I'm
> starting to
> think I'm not looking in the right direction.
> 
> Has anybody done something similar and can point me in the right
> direction?
> 
> 
> Thanks,
> Nina
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



        
                
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to