You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Thorsten Scherler <th...@apache.org> on 2005/10/06 12:31:00 UTC

Re: using DirectoryGenerator (Was: Using XML db as the source of xml files)

El jue, 06-10-2005 a las 12:19 +0200, Miroslav Mocek escribió:
> >>I've put this 3 lines in my sitemap.xmap. (found in 
> >>http://cocoon.zones.apache.org/demos/release/docs/userdocs/generators/directory-generator.html)
> >><map:match pattern="my*">
> >>   <map:generate src="my"/>
> >>   </map:match>
> >>    
> >>
> >
> >That is not what the page tells you to do.
> >Anyway, see below.
> >
> >  
> >
> ok, I used exact syntax from the page
> <map:match pattern="my">
> <map:generate type="directory" src="my">
>     <map:parameter name="depth" value="2"/>
>   </map:generate>    
>    </map:match>
> 

No serializer!

<map:match pattern="my">
  <map:generate type="directory" src="my">
    <map:parameter name="depth" value="2"/>
  </map:generate>  
  <map:serialize type="xml" />  
</map:match>

HTH
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: using DirectoryGenerator (Was: Using XML db as the source of xml files)

Posted by Miroslav Mocek <mm...@seznam.cz>.
Yeah, it was not. ('I've created subdir "my" in content/xdocs and put 2 
files in it ')

It's working now.
Thanks
Mirek


Thorsten Scherler wrote:

>Make sure that the "my" dir is in the same level like the sitemap.
>
>like:
>.
>|-- my
>|-- content
>|   |-- locationmap.xml
>|   `-- xdocs
>...
>|       |-- tabs.xml
>|       `-- ...
>|-- resources
>|   |-- schema
>|   |   `-- catalog.xcat
>|   |-- stylesheets
>|   `-- templates
>|-- sitemap.xmap
>|-- skinconf.xml
>`-- translations
>
>Another example:
>http://svn.apache.org/viewcvs.cgi/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/output.xmap?view=markup
> <map:pipeline>
>    <map:match pattern="ls.contracts">
>      <map:generate type="directory" src="resources/templates">
>        <map:parameter name="depth" value="1"/>
>        <!-- sorted alphabetically -->
>      	<map:parameter name="reverse" value="false"/>
>      </map:generate>
>      <map:serialize type="xml"/>
>    </map:match>
>  </map:pipeline>
>
>salu2
>  
>


Re: using DirectoryGenerator (Was: Using XML db as the source of xml files)

Posted by Thorsten Scherler <th...@apache.org>.
El jue, 06-10-2005 a las 12:45 +0200, Miroslav Mocek escribió:
> Even with serializer, the same error.
> 
> I'm trying now to svn up and start again.
> Mirek
> 
> 
> ><map:match pattern="my">
> >  <map:generate type="directory" src="my">
> >    <map:parameter name="depth" value="2"/>
> >  </map:generate>  
> >  <map:serialize type="xml" />  
> ></map:match>
> >

Make sure that the "my" dir is in the same level like the sitemap.

like:
.
|-- my
|-- content
|   |-- locationmap.xml
|   `-- xdocs
...
|       |-- tabs.xml
|       `-- ...
|-- resources
|   |-- schema
|   |   `-- catalog.xcat
|   |-- stylesheets
|   `-- templates
|-- sitemap.xmap
|-- skinconf.xml
`-- translations

Another example:
http://svn.apache.org/viewcvs.cgi/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/output.xmap?view=markup
 <map:pipeline>
    <map:match pattern="ls.contracts">
      <map:generate type="directory" src="resources/templates">
        <map:parameter name="depth" value="1"/>
        <!-- sorted alphabetically -->
      	<map:parameter name="reverse" value="false"/>
      </map:generate>
      <map:serialize type="xml"/>
    </map:match>
  </map:pipeline>

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: using DirectoryGenerator (Was: Using XML db as the source of xml files)

Posted by Miroslav Mocek <mm...@seznam.cz>.
Even with serializer, the same error.

I'm trying now to svn up and start again.
Mirek


><map:match pattern="my">
>  <map:generate type="directory" src="my">
>    <map:parameter name="depth" value="2"/>
>  </map:generate>  
>  <map:serialize type="xml" />  
></map:match>
>
>HTH
>  
>