Thank you so much for your extensive and step-by-step reply.

Scroll down to read on...


> I have this combination working on both Fedora Core 1
> and  Windows/2000 Professional.  A quick step by step
> guide is given below, along with some sample
> pipelines.
>
> 1. Grab cocoon-2.1.4 and build it with either
> ./build.sh war (Linux) or build war (Windows/2000).  I
> do not exclude anything.
>
> 2. Deploy the resulting war in Tomcat.  I usually
> browse to the war file via the Manager Application and
> load it that way.
>
> 3. Verify that cocoon works.
>
> 4. Download Xindice 1.1b4
>
> 5. Run either ./build.sh (Linux) or build
> (Windows/2000) to build the jar and war.
>
> 6. Note that the the resulting war file in
> $XINDICE_HOME/dist is xindice-1.1b4-dev.war.  Copy
> that to xindice.war.
>
> 7. Use the Tomcat Manager Application to load the
> xindice.war file.
>
> 8. Verify that it works by browsing to
> localhost:8080/xindice/.  You should get the ugly
> debug tool.
>
> 9. Now, create a collection in the database running
> under Tomcat.  You can do that by using the command
> line application.  The "trick" is using the correct
> URL to talk to the Tomcat-supported Xindice database.
>
> For example:
>
> xindice \
>   ac -c xmldb:xindice://localhost:8080/db -n testcol
>
> will create a new collection called testcol
>
> 10. Verify that the collection is there with both the
> command line and the ugly debug tool.  The command
> line would look like:
>
> xindice \
>   lc -c xmldb:xindice://localhost:8080/db
>
> 11. Add some documents so you'll have something to
> play with.  I made an entire directory of xml
> documents by creating one, the writing a Perl script
> to change some information and create a new document.
>
> 12. Add the documents to your testcol collection with
> a command like the following
>
> xindice \
>  addmultiple -c \
>  xmldb:xindice://localhost:8080/db/testcol \
>  -f data -e xml
>
> (if your documents are in the directory data and they
> end with .xml)
>
> 13.  Now check that the documents made it in via the
> command line and the ugly debug tool.  The command
> line looks like:
>
> xindice \
>  ld -c xmldb:xindice://localhost:8080/db/testcol
>
> 14. Shut down Cocoon using the Tomcat Manager
> Application.
>
> Now you'll need to do several things:
>
> a) Update the Cocoon jars with the jars from Xindice
> b) Modify the sitemap.xmap to activate the "user
>    directory" feature for Cocoon.  This is handy for
>    testing.
> c) Create the appropriate public_html directory
> d) Create an appropriate sitemap.xmap file.
>
> 1. In $XINDICE_HOME/java/lib there are a bunch of jar
> files.  Copy the following jar files to
> $TOMCAT_HOME/webapps/cocoon/WEB-INF/lib
>
> xml-apis.jar
> xmldb-api-20030701.jar
> xmldb-common-20030701.jar
> xmldb-xupdate-20040205.jar
> xmlrpc-1.1.jar
>
> The versions should match between your Xindice servlet
> and Cocoon.
>
> 2. In $XINDICE_HOME/dist, you'll find a jar file.
> Mine has the -dev on it since I haven't upgraded yet.
> Copy xindice-1.1b4-dev.jar to
> $TOMCAT_HOME/webapps/cocoon/WEB-INF/lib
>
> 3. In $TOMCAT_HOME/webapps/cocoon/sitemap.xmap,
> uncomment the appropriate "user directory" feature.
> For example on Fedcora Core 1 I have:
>
> <map:match pattern="~*/**">
> <!-- unix -->
> <map:mount check-reload="yes"
>   src="/home/{1}/public_html/" uri-prefix="~{1}"/>
> </map:match>
>
> 4. Start up the Cocoon application using the Tomcat
> Application Manager
>
> 5. Verify that
> http://localhost:8080/cocoon/samples/xmldb/welcome
> and samples work.
>
> 6. Create your public_html directory
>
> 7. In that directory, create an xsl subdirectory.
>
> 8. Copy
>
> $TOMCAT_HOME/webapps/cocoon/samples/xmldb/xmldb2samples.xsl
>
> and
>
> $TOMCAT_HOME/webapps/cocoon/samples/common/style/xsl/html/simple-samples2html.xsl
>
>  to that new subdirectory.
>
> 9. In your public_html directory, create the following
> simple sitemap.xmap
> <?xml version="1.0" encoding="UTF-8"?>
>
> <map:sitemap
> xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
>
> <!-- ===== Pipelines ======== -->
>   <map:pipelines>
>
> <!-- ====== remote database with styling ====== -->
>   <map:pipeline>
>     <map:match pattern="styleremote/**">
>       <map:match type="request-parameter"
>          pattern="xpath">
>       <map:generate
> src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>       <map:transform src="xsl/xmldb2samples.xsl"/>
>       <map:transform
>         src="xsl/simple-samples2html.xsl">
>         <map:parameter name="contextPath"
>            value="{request:contextPath}"/>
>       </map:transform>
>       <map:serialize/>
>       </map:match>
>       <map:generate
>         src="xmldb:xindice://localhost:8080/db/{1}"/>
>       <map:transform src="xsl/xmldb2samples.xsl"/>
>       <map:transform
>         src="xsl/simple-samples2html.xsl">
>         <map:parameter name="contextPath"
>           value="{request:contextPath}"/>
>       </map:transform>
>       <map:serialize/>
>     </map:match>
>   </map:pipeline>
>
> <!-- === remote database without styling ======= -->
>   <map:pipeline>
>     <map:match pattern="remote/**">
>       <map:match type="request-parameter"
>         pattern="xpath">
>         <map:generate
> src="xmldb:xindice://localhost:8080/db/{../1}#{1}"/>
>         <map:serialize type="xml"/>
>       </map:match>
>       <map:generate
>         src="xmldb:xindice://localhost:8080/db/{1}"/>
>       <map:serialize type="xml"/>
>     </map:match>
>   </map:pipeline>
>
>   </map:pipelines>
> </map:sitemap>
>
> I apologize for the ugly formatting, but you should
> get the idea.
>
> Now, browse to:
>
> http://localhost:8080/cocoon/~user/styleremote/
>

I'm up to here now, but have some troubles with Windows 2000 and permissions. When I
go to my url:

http://localhost:8080/cocoon/~nvjuliad/styleremote

I get the following error:

Resource not found.

org.apache.cocoon.ResourceNotFoundException: Resource not found.:
org.apache.excalibur.source.SourceNotFoundException: file:/C:/Documents and
Settings/nvjuliad/My Documents/My Website/ doesn't exist.

cause: java.io.FileNotFoundException: \Documents and Settings\nvjuliad\My
Documents\My Website (Access is denied)

If I move it from this location, the "(Access is denied)" bit is changed to "(The
system cannot find the path specified)", so we know it finds it, but can't get
access to it. I've right-clicked on the My Website folder and under
Properties/Sharing chosen to "Share this folder", but that didn't make any
difference. Does anyone know how to get around this?


> (where ~user should be your user id), and you should
> see the same type of page that you saw for the Cocoon
> xmldb sample.  The differences will be that the
> collection list will show your remote
> (Tomcat-supported) collections and the Collection
> label should be:
>
> xmldb:xindice://localhost:8080/db/.
>
>
> Please change your port number to reflect where you're
> running Tomcat.  I'm using the default 8080 port.
>
> If you wish to access the stand-alone Xindice server
> running under Jetty, do the following:
>
> 1. Start up xindice with xindice start
>
> 2. Change port references in your
> public_html/sitemap.xmap from 8080 to 8888, which is
> the new default port for Xindice running under Jetty.
>
> I am in the process of learning enough
> Woody/Flowscript so that I can bind a form to a
> verified XML document and then stuff that into
> Xindice.  I haven't gotten that far yet, but I hope to
> get around to it again next week.
>
> I realize that this is a bit long, but I hope it
> helps.  I have not addressed an embedded Xindice in
> this mail message.  I have it working as well, but I
> am not happy with the way I have to do this.
>
> You actually have to set a -Dxindice.configuration in
> catalina.sh (or modify the Windows/2000 registry) in
> order to tell Tomcat and Cocoon where to find
> system.xml.  I would hope that I could have multiple
> embedded Xindice databases specified by multiple
> system.xml files . . . but I'm not sure how to
> accomplish that.
>

How do I actually do this? I mean, trying to execute -Dxindice.configuration in
Windows commandline doesn't work. I had a look at the registry ("regedit"), but
wouldn't know what to do where or how. I'm not very good with these things in
Windows.

> Hope this helps.
>
> /mde/
> just my two cents . . . .
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online by April 15th
> http://taxes.yahoo.com/filing.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

Thanks so much for the help,
Nina



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

Reply via email to