You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by hg...@cswebmail.com on 2003/03/18 20:27:27 UTC
XPathDirectoryGenerator - need help
Maybe I do not understand the XPathDirectoryGenerator:
Also tried:
.... KNO\#/azkno:knowledgeobject/dc:title/text()
Same, tag content is not displayed !?
Any help is appreciated !!
Holger
On Thu, 13 Mar 2003, hgadm@cswebmail.com wrote:
>
> Thanks Jens and Jeff !
>
> Itried the XPathDirectoryGenerator. Sitemap fragment:
>
> ...
>
> <map:match pattern="kno-index">
> <map:generate type="xpathdirectory"
> src="C:\Documents and Settings\Owner\My
>
Documents\Projects\XML\KNO\#/azkno:knowledgeobject/dc:title"/>
> <map:serialize type="xml"/>
> </map:match>
>
> ...
>
> Which yields an XML file with the current fragment:
>
> ...
>
> <dir:file name="microdialysis1.xml"
> lastModified="1046298926956" date="26/02/03 22:35"
> size="9449">
> <dir:xpath docid="microdialysis1.xml"
> query="/azkno:knowledgeobject/dc:title" />
> </dir:file>
>
> ...
>
> Obviously this has produced XML output identifying
> files that comply having this tag but the query wasn't
> executed, i.e. I haven't got the content of this tag
> (which I need).
>
> Any Ideas ??
>
> Holger
>
>
> senderDateInfo
>
> >
> > On Tue, Mar 11, 2003 at 05:11:30AM -0800,
> > hgadm@cswebmail.com wrote:
> > > Dear all,
> > >
> > > I would like to dynamically generate an RSS feed
> from
> > > currently available XML files in a folder on my
> > > webserver to be displayed in the Cocoon portal.
> > >
> > > I have a set of equally structured XML files in a
> > > folder and new files are added to this folder
> > regularly.
> > >
> > > Now I want to generate the RSS feed dynamically
when
> > > the respective coplet displays the RSS in the
> portal.
> > >
> > > The RSS file should reflect the title of these XML
> > > files (which is in the dc:title tag of each file)
> and
> > > the URI (the path + filename).
> > >
> > > Any ideas are greatly appreciated, hope someone
has
> > > done similar things before - otherwise I would
need
> to
> > > start from scratch.
> >
> > If you're using Cocoon 2.1, the
> XPathDirectoryGenerator
> > might be useful.
> > It lets you extract XPath-specified nodes from every
> > file in a directory.
> >
> > For example, to generate
> > <a
> href="<a
href="http://mail.cswebmail.com/jump/http://aft.sourceforge.net/examples/index.html">http://aft.sourceforge.net/examples/index.html</a>">http://mail.cswebmail.com/jump/http://aft.sourceforge.net/examples/index.html">http://aft.sourceforge.net/examples/index.html</a></a>;
> > I used:
> >
> > <map:match pattern="examples/index.xml">
> > <map:generate type="xpathdirectory"
> >
> >
>
src="content/xdocs/examples#/project/description/text()"/>
> > <map:transform
> >
>
src="resources/stylesheets/antdirectory2document.xsl"/>
> > <map:serialize type="xml"/>
> > </map:match>
> >
> >
> > --Jeff
> >
> > > Kind regards,
> > >
> > > Holger
> > >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail:
> > cocoon-users-help@xml.apache.org
>
> ___________________________________________________
> The ALL NEW CS2000 from CompuServe
> Better! Faster! More Powerful!
> 250 FREE hours! Sign-on Now!
> <a
href="http://mail.cswebmail.com/jump/http://www.compuserve.com/trycsrv/cs2000/webmail">http://www.compuserve.com/trycsrv/cs2000/webmail</a>/
>
>
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
___________________________________________________
The ALL NEW CS2000 from CompuServe
Better! Faster! More Powerful!
250 FREE hours! Sign-on Now!
http://www.compuserve.com/trycsrv/cs2000/webmail/
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: XPathDirectoryGenerator - need help
Posted by Jeff Turner <je...@apache.org>.
On Tue, Mar 18, 2003 at 11:27:27AM -0800, hgadm@cswebmail.com wrote:
> Maybe I do not understand the XPathDirectoryGenerator:
>
> Also tried:
>
> .... KNO\#/azkno:knowledgeobject/dc:title/text()
>
> Same, tag content is not displayed !?
Probably because XPathDirectoryGenerator doesn't provide a way to
register namespace-prefix mappings. Instead, try:
...#/*[local-name()='knowledgeobject']/*[local-name()='title']/text()
--Jeff
> Any help is appreciated !!
>
> Holger
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org