You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mark Lundquist <ml...@comcast.net> on 2005/02/25 23:59:35 UTC

XpathDirectoryGenerator too weak, so...?

Sorry, I couldn't think of a better title for this post... I guess it's 
better than "oh bother..." :-)

Anyway, here's What I'm Trying To Do:

I've got a directory structure that looks like this

	projects/
		foo.page/
			source.xml
		bar.page/
			source.xml
		static/

projects/foo.page/source.xml gets transformed in the pipeline that 
serves "projects/foo".  The source documents contain a title (pretend 
it's <html/head/title>... it's not really, but — same idea).

So I want to generate this markup:

	<a href="foo">new and improved foo page</a>
	<a href="bar">all you ever wanted to know about bar</a>


It seems like this ought to be easy enough to do, but... I'm having 
trouble putting all the pieces together.  I don't think 
XpathDirectoryGenerator by itself is enough, because it can only look 1 
level deep.  I had a feeling that XMLFileInputModule could maybe help 
somehow, but... I'm not seeing it.  (I'm not at the top of my game 
today though... tired brain :-).

I'm thinking of adding a 'recursive' parameter to 
XpathDirectoryGenerator.  But am I missing some other way to do it?

thx,
—ml—

NOT! (Re: XpathDirectoryGenerator too weak, so...?)

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Feb 25, 2005, at 3:32 PM, Irv Salisbury wrote:

> The plain DirectoryGenerator has a depth parameter you can pass.  If
> you dont' need the features of the XPathDirectoryGenerator, you could
> just use the DirectoryGenerator.
>

d'oh... yeah, I just figured it out :-)  XPathDirectoryGenerator 
extends DirectoryGenerator, so it has 'depth' too.  It's working now 
:-)

—ml—


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


Re: XpathDirectoryGenerator too weak, so...?

Posted by Irv Salisbury <ir...@gmail.com>.
The plain DirectoryGenerator has a depth parameter you can pass.  If
you dont' need the features of the XPathDirectoryGenerator, you could
just use the DirectoryGenerator.

Irv


On Fri, 25 Feb 2005 14:59:35 -0800, Mark Lundquist
<ml...@comcast.net> wrote:
> Sorry, I couldn't think of a better title for this post... I guess it's
> better than "oh bother..." :-)
> 
> Anyway, here's What I'm Trying To Do:
> 
> I've got a directory structure that looks like this
> 
>         projects/
>                 foo.page/
>                         source.xml
>                 bar.page/
>                         source.xml
>                 static/
> 
> projects/foo.page/source.xml gets transformed in the pipeline that
> serves "projects/foo".  The source documents contain a title (pretend
> it's <html/head/title>... it's not really, but — same idea).
> 
> So I want to generate this markup:
> 
>         <a href="foo">new and improved foo page</a>
>         <a href="bar">all you ever wanted to know about bar</a>
> 
> It seems like this ought to be easy enough to do, but... I'm having
> trouble putting all the pieces together.  I don't think
> XpathDirectoryGenerator by itself is enough, because it can only look 1
> level deep.  I had a feeling that XMLFileInputModule could maybe help
> somehow, but... I'm not seeing it.  (I'm not at the top of my game
> today though... tired brain :-).
> 
> I'm thinking of adding a 'recursive' parameter to
> XpathDirectoryGenerator.  But am I missing some other way to do it?
> 
> thx,
> —ml—
> 
>

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