cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nina Juliadotter" <nvjul...@it.uts.edu.au>
Subject Re: Xindice 1.1b4 (dev-sorry), Cocoon 2.1.4 (dev - sorry), Tomcat 5.019
Date Sat, 17 Apr 2004 02:28:09 GMT
Hi Mark,

Thanks for your attempts to solve my problem.
I don't think I will try and get the embedded mode work, seems to be simpler to use
standalone mode.

Maybe I wasn't clear before, but of course I did go through the steps a, b and c below.
And I wish it was as simple as my documents not being well-formed. But the trouble
is that they are well formed, and the command line query

xindice xpath -c xmldb:xindice://localhost:8080/db/testcol -q "/restaurant"

works fine and gives me the correct result, but the URL

http://localhost:8080/cocoon/nina/remote/restaurant

gives me the "XML document must have a top level element." error. So there must be
something in Cocoon that's not configured properly.

For standalone mode, the only cofigurations I can find for Xindice are the following:

1. In the root sitemap, line 199-203:

<map:transformer logger="sitemap.transformer.xmldb" name="xmldb"
src="org.apache.cocoon.transformation.XMLDBTransformer">
      <driver>org.apache.xindice.client.xmldb.embed.DatabaseImpl</driver>
      <base>xmldb:xindice-embed:///db</base>
    </map:transformer>
</map:transformers>

Now, since I am running it in standalone mode, should this be changed to

<map:transformer logger="sitemap.transformer.xmldb" name="xmldb"
src="org.apache.cocoon.transformation.XMLDBTransformer">
      <driver>org.apache.xindice.client.xmldb.DatabaseImpl</driver>
      <base>xmldb:xindice://localhost:8080/db</base>
    </map:transformer>
</map:transformers>

?

2. The other configuration snippet would be the sitemap for the specific folder in
question, in my case one called "nina", located just under the main Cocoon folder.
This is the snippet that matches the url:

<map:pipeline>
    <map:match pattern="remote/**">
      <map:match type="request-parameter"
        pattern="xpath">
        <map:generate src="xmldb:xindice://localhost:8080/db/testcol/{../1}#{1}"/>
        <map:serialize type="xml"/>
      </map:match>
      <map:generate
        src="xmldb:xindice://localhost:8080/db/testcol/{1}"/>
      <map:serialize type="xml"/>
    </map:match>
  </map:pipeline>


Still, with these sitemaps, it still doesn't work (I've tried both versions of the
main sitemp).

I'm thinking of giving up using Xindice through Cocoon, it seems impossible to get
it to work :( But it would be such a neat solution if I only could get them to talk
to eachother. The more I understand of the sitemap configurations, the less I
understand what I have done wrong I why I can't get it to work.

Anyway, if anyone can think of any other configurations for standalone mode to
fiddle with... would be greatly appreciated. And thank you Mark for your efforts.

Nina


> Nina,
>
> First of all, you're very welcome.  I was (and am) writing this on the
> Fedora Core 1 side of my machine, so I used mostly UNIX information.
> Let me see if I can't translate this into Windows/2000 specific
> information.
>
> First of all, my environment variables need translating.  When I say
> $TOMCAT_HOME, in Windows/2000 I should say %TOMCAT_HOME%.  Also, with
> Tomcat 4.1x and 5.x, the environment variable has been changed to
> %CATALINA_HOME%, although some of the Apache documentation is
> inconsistent on this point.
>
> Now to the particulars:
>
> a) In step 3, uncomment the following, since you're on Windows/2000 and
> not UNIX:
>
> <map:match pattern="~*/**">
>       <!-- win32 -->
>  <map:mount
>   check-reload="yes"
>   src="/Documents and Settings/{1}/My Documents/My Website"
>   uri-prefix="~{1}"/>
> </map:match>
>
> b) In step 6, create the My Website folder under your My Documents
> folder.  An easy way to do this is to open My Documents on the desktop,
> right mouse click, select New--->Folder, and name the folder My
> Website.  Please note that it may already be there.
>
> c) In step 7, open the My Website folder and create another folder
> called xsl.  An easy way to do this is to open My Website in My
> Documents on the desktop, right mouse click, select New--->Folder, and
> name the folder xsl.
>
> Now, some potential comments about your documents in the Xindice
> database.  I apologize if you already understand xml document structure,
> so please bare with me.
>
> All xml documents must start with something like the following:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> The encoding doesn't have to be specified, but you must have at least:
>
> <?xml version="1.0"?>
>
> at the beginning of each document.  That is probably the source of your
> "The XML document must have a top element" error.
>
> Also, your XML document must be well-formed.  Basically, all tags must
> be closed (<tagname> . . . . </tagname> or <tagname/>) and properly
> nested.
>
> Xindice has two basic clients (I'm not sure if the managed driver counts
> as a client) - xindice, and xindice-embed.  The xindice client actually
> calls the real client, xindice-xmlrpc, which works either on local
> network-available Xindice databases.  xindice-embed only works for
> embedded databases within the same Java VM.
>
> When you use your URL xmldb:xindice://localhost:8080/db, you are
> actually using xmldb:xindice-xmlrpc://localhost:8080/db.
>
> Using a specific embedded Xindice database with Tomcat and Cocoon is
> somewhat of a pain on Windows/2000.  You've probably installed Tomcat to
> run as a service on Windows/2000.  There are two consequences of doing
> this.
>
> 1) Trying to start Tomcat with catalina.bat start will silently fail
> since Tomcat is already running as a service.
>
> 2) Changes to catalina.bat will NOT be reflected in your Tomcat that
> runs as a service.
>
> Using an embedded Xindice database gets a little messy, and I can write
> this up as a separate mail message if you wish.  Basically, you have to
> stop the Tomcat service, change the registry information, create an
> appropriate system.xml file for your embedded Xindice database, and then
> start the Tomcat service again.
>
> I am hoping that somewhere buried in the Cocoon code are some hints that
> will allow you to change Cocoon's web.xml to tell Cocoon about an
> embedded Xindice database.  That way, multiple Cocoon applications (in
> different contexts) could use different embedded Xindice databases.  I
> haven't found that information yet, but I've not looked that hard
> either.
>
> Once again, this is a rather lengthy mail message . . .
>
> I hope that clears some things up.
>
> /mde/
> just my two cents . . . .
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message