You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jerome Iffrig <je...@anitesystems.de> on 2002/09/30 12:24:03 UTC

== Database driven website with Cocoon ==

Hi all,

I went trough Leigh Dodds’ “Database driven website” tutorial (very
interesting) and I have now a question on a slightly different architecture:

My content is NOT stored within a database – Only the PATHs to the content
is stored therein –
I cannot figure out (and this for a couple of weeks now) how to build a
transformers chain for them to to lookup for the PATH of the XML docs
(document content) and of the XSL (styles to be applied to the different
contents) within the database and then fetch both files on the filesystem
for then generate the final HTML document from this.

Any opinion welcome !

Thanks

Re: == Database driven website with Cocoon ==

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 30.Sep.2002 -- 01:02 PM, Christian Haul wrote:
>
> Another one would be to retrieve the path using one of the
> DatabaseSelectActions and use the InputModule-substitution in sitemap
> to read that file. (available in 2.1 (cvs) for interpreted sitemap and
> 2.0.4 (cvs) for compiled sitemap)

InputModule-substitution is not needed because the result will be
placed in sitemap parameters anyway.

So, this boils down to: Use anyone of the DatabaseSelectActions and
use the returned sitemap parameter for your path.

So, off my head:

<map:match pattern="*">
  <map:act type="findPath">
     <map:generate src="{documents.path[0]}"/>
     <map:serialize/>
  </map:act>
  <map:redirect-to uri="file-not-found"/>
</map:match>

given that everything is setup properly before.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: == Database driven website with Cocoon ==

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 30.Sep.2002 -- 12:24 PM, Jerome Iffrig wrote:
> Hi all,
> 
> I went trough Leigh Dodds’ “Database driven website” tutorial (very
> interesting) and I have now a question on a slightly different architecture:
> 
> My content is NOT stored within a database – Only the PATHs to the content
> is stored therein –
> I cannot figure out (and this for a couple of weeks now) how to build a
> transformers chain for them to to lookup for the PATH of the XML docs
> (document content) and of the XSL (styles to be applied to the different
> contents) within the database and then fetch both files on the filesystem
> for then generate the final HTML document from this.

This first idea (which is not always the best) that comes to mind
would be to retrieve the path e.g. using esql and use the
util:include-uri or friends to include the document.

Another one would be to retrieve the path using one of the
DatabaseSelectActions and use the InputModule-substitution in sitemap
to read that file. (available in 2.1 (cvs) for interpreted sitemap and
2.0.4 (cvs) for compiled sitemap)

	Chris.

Please follow up summarizing your problem and which suggested solution
/ information worked for you when you consider your problem
solved. Add "SUMMARY: " to the subject line. This will make FAQ
generation and searching the list easier. In addition, it makes
helping you more fun. Thank you.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: == Database driven website with Cocoon ==

Posted by Reinhard Poetz <re...@gmx.net>.
Jerome,

Here a suggestion without knowing Leigh Dodds' tutorial ...

I would write an action that puts the path as a variable into the sitemap.

<map:pipeline>
	<map:match pattern="blabla">
		<map:act type="your-action">
			<map:generate src="{your-path}"/>
			...
			<map:serialize/>
		</map:act>
	</map:match>
</map:pipeline>

Your action has to return a map with the key "your-path" and the value.

Regards,
Reinhard

-----Original Message-----
From: Jerome Iffrig [mailto:jerome.iffrig@anitesystems.de]
Sent: Monday, September 30, 2002 12:24 PM
To: cocoon-users@xml.apache.org
Subject: == Database driven website with Cocoon ==
Sensitivity: Personal


Hi all,

I went trough Leigh Dodds’ “Database driven website” tutorial (very
interesting) and I have now a question on a slightly different architecture:

My content is NOT stored within a database – Only the PATHs to the content
is stored therein –
I cannot figure out (and this for a couple of weeks now) how to build a
transformers chain for them to to lookup for the PATH of the XML docs
(document content) and of the XSL (styles to be applied to the different
contents) within the database and then fetch both files on the filesystem
for then generate the final HTML document from this.

Any opinion welcome !

Thanks


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>