You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by news <ne...@gefra.biz> on 2004/06/11 11:53:08 UTC

questions about lenya

hallo list,

i try to create a publication out from the default publication .

the frist problem i have:
my index page is generated in the sitemap but i can't get the lenya-menu
and the content on the site. i tried many ways, here is the best result
(no content is shown :-)

<map:pipeline>
  <map:match pattern="*/index.html">
  <map:aggregate element="lenya">
    <!-- fake-generation for testing -->
      <map:part src="content/authoring/news.xml" element="cmsbody"/>
    </map:aggregate>

    <map:transform src="xslt/news2xhtml.xsl" />
    <map:transform
src="cocoon://lenya-page/{page-envelope:publication-id}/{page-envelope:area}/index.xml"/>
    <map:transform src="xslt/page2xhtml.xsl" />
    <map:serialize type="html"/>
  </map:match>
</map:pipeline>

btw. i have all my doctypes proper configured and they work, when i
create them via menu (so that a xml-file is created in content/) ... can
i use this function for a stream like above? 


generation of leafnodes:
i'd like to create leafnodes for some pages on my site. so i registered
the DefaultLeafCreator for the approperiate doctype... a leaf is then
created, but the sitetree is updated in the branch-style.

is it because i use the standard input-form and this form passes some
parent-node parameters?



userdefined sourcecode:
i saw in other sampe-publications that sourcecode is placed under a
"java" directory. is this source automatically compiled or to i need to
compile and placeit under WEB-INF/classes ?


any help would be appreciated
thank you
christian klingler


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


Re: questions about lenya

Posted by Andreas Hartmann <an...@apache.org>.
news wrote:

[...]

> btw. if i use
> log.debug("something") in my classes, where to find the output?

If you set enable.log4j=true in your build.properties,
you'll find them in

WEB-INF/logs/log4j.log

-- Andreas


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


Re: questions about lenya

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Tue, 15 Jun 2004, news wrote:

> but ... there is one other thing i'm wondering about. i created a custom
> branchcreator that generate a file based on date. i implemented:
>
> getChildFileName( File, String, String )
> transformXML( Document, String, short, String, Map )
>
> the files are created in right place, but are wrong registered in
> sitetree.xml. where can i find this values ? btw. if i use

Not sure on this.  Hopefully someone else can answer.


> log.debug("something") in my classes, where to find the output?

You need to check three things:

1) What category logger you declared for your transformer in the
   sitemap.xmap file.

2) What file and level of logging you declared in
   WEB-INF/logkit.conf for that category.

3) Normally, logging output will go to WEB-INF/logs/<category>.log.

-- 
JP


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


Re: questions about lenya

Posted by news <ne...@gefra.biz>.
hallo jean pierre,

> I'm sorry but I don't understand what you are trying to achieve.
> Can you send an example of what you are trying to generate?
oh, i solved this (in a longer night) ... it was a problem with
namespaces ... the xsl of my doctype put a wrong namespace around the
<div id="body"> element and so ...


> Take a look at the Cocoon session management:
>   http://cocoon.apache.org/2.1/developing/webapps/session.html
thank you for this hint, i think that will help me.

but ... there is one other thing i'm wondering about. i created a custom
branchcreator that generate a file based on date. i implemented:

getChildFileName( File, String, String )
transformXML( Document, String, short, String, Map )

the files are created in right place, but are wrong registered in
sitetree.xml. where can i find this values ? btw. if i use
log.debug("something") in my classes, where to find the output?


i'am not sure if it would be a better way, to work with the create.xsp
files. if i understand correctly i could create a usecase.xmap for my
publication an create.xsp files for my doctypes, parameterize the
defaultbranchcreator with values from xsp's ?

CK




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


Re: questions about lenya

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Sat, 12 Jun 2004, news wrote:

> > If I understand correctly, once you have your document properly
> > aggregated, what you now need to do is pass control to the pipeline
> > that I referenced above.  This will add the lenya menu to your
> > document.  Passing control to a pipeline is done with the "cocoon:/"
> > protocol as follows:
> >
> >   <map:generate src="cocoon:/lenyabody-edit/...>
> >
> > See the default publication's publication-sitemap.xmap for an
> > example.
>
> sorry, i still don't get it ... maybe i missed a point somewhere.
> lets say i put this lines inside the publication-sitemap:
>
> ... snip ...
>
> ... without success :-)
> can anyone give me a focus on the point that i missed?

I'm sorry but I don't understand what you are trying to achieve.
Can you send an example of what you are trying to generate?



> and yet another problem encountered:
> i need for one of my client-scripts a session-id ... what is the correct
> way to get it?

Take a look at the Cocoon session management:

  http://cocoon.apache.org/2.1/developing/webapps/session.html

-- 
JP



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


Re: questions about lenya

Posted by news <ne...@gefra.biz>.
> If I understand correctly, once you have your document properly
> aggregated, what you now need to do is pass control to the pipeline
> that I referenced above.  This will add the lenya menu to your
> document.  Passing control to a pipeline is done with the "cocoon:/"
> protocol as follows:
> 
>   <map:generate src="cocoon:/lenyabody-edit/...>
> 
> See the default publication's publication-sitemap.xmap for an
> example.

sorry, i still don't get it ... maybe i missed a point somewhere.
lets say i put this lines inside the publication-sitemap:

<map:pipeline>
  <map:match pattern="*/news/index.html">
    <map:generate
src="cocoon:/lenyabody-edit/{page-envelope:publication-id}/{page-envelope:area}/{page-envelope:document-type}/newsoverview.xml"/>
    <map:serialize type="xml"/>
  </map:match>
      
  <map:match pattern="*/newsoverview.xml">
    <map:aggregate element="lenya" label="aggregation">
      <map:part type="file" src="content/authoring/news.xml"
element="cmsbody"/>
     </map:aggregate>
     <map:serialize type="xml"/>
   </map:match>
</map:pipeline>

the aggregation is just for testing purpose, this should later
dynamically created. at present it returns:

<lenya>
  <cmsbody>
    <allnews xmns="http://steinbacher.at/xml/news">
      <news>
        <titel>newstitle 1</titel>
        <date>newsdate 1</date>
	<newstext>newstext 1</newstext>
      </news>
      ...

???
i tried also to transform the page this way:

<map:match pattern="*/news/index.html">
    <map:generate src="cocoon:/newsoverview.xml"/>
    <map:transform src="xslt/news2xhtml.xsl"/>
    <map:transform src="xslt/page2xhtml.xsl"/>
    <map:serialize type="html"/>
</map:match>

... without success :-)
can anyone give me a focus on the point that i missed?


and yet another problem encountered:
i need for one of my client-scripts a session-id ... what is the correct
way to get it?


thank you for being patient


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


Re: questions about lenya

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Fri, 11 Jun 2004, news wrote:

> Am Fre, den 11.06.2004 schrieb Jean Pierre LeJacq um 17:25:
>
> i put the above pipeline in inside the publication-sitemap.xmap of my
> publication (matching is shown in sitemap.log). it's purpos is to
> intercept requests for index.html and generate a xml-stream from
> news-files inside a directory called "news" .... that works so far, so
> my result looks like:
>
> the question is now, how can i use the defined doctype-schemas to
> transform this to the beauty lenya-menu.
>
>
> > In the default publication, the pipeline that adds the lenya
> > authoring menu has this matcher:
> >
> >   <map:match pattern="lenyabody-*/*/*/*/**">
> yes, i saw this, but i'm uncertain where to how to get the needed
> parameters with my above schema.

If I understand correctly, once you have your document properly
aggregated, what you now need to do is pass control to the pipeline
that I referenced above.  This will add the lenya menu to your
document.  Passing control to a pipeline is done with the "cocoon:/"
protocol as follows:

  <map:generate src="cocoon:/lenyabody-edit/...>

See the default publication's publication-sitemap.xmap for an
example.


> > > generation of leafnodes:
> > > i'd like to create leafnodes for some pages on my site. so i registered
> > > the DefaultLeafCreator for the approperiate doctype... a leaf is then
> > > created, but the sitetree is updated in the branch-style.
>
> yes and i don't want the "somwhat/index_en.xml" structure for one area
> on my publication.
>
>
> >   If so, you'll have to extend the logic provide in the
> > default publication.
> i hoped i can achieve on modifieing the sitemap and create my one
> Creators, that simply calculate a filename from date and save the files
> to my "news" directory.

Yes, that's correct.  You'll need to define your own creator
function.  You'll also need to look at the lenya menu code to
disable the create new document entry when a user has selected a
leaf node.

-- 
JP



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


Re: questions about lenya

Posted by news <ne...@gefra.biz>.
Am Fre, den 11.06.2004 schrieb Jean Pierre LeJacq um 17:25:
> On Fri, 11 Jun 2004, news wrote:
> 
> > i try to create a publication out from the default publication .
> >
> > the frist problem i have:
> > my index page is generated in the sitemap but i can't get the lenya-menu
> > and the content on the site. i tried many ways, here is the best result
> > (no content is shown :-)
> >
> > <map:pipeline>
> >   <map:match pattern="*/index.html">
> >
> > ... snip ...
> 
> I difficult to see what pipeline processing is occurring here.  If
> you haven't already, I suggest you increase the logging level for
> sitemap processing to DEBUG in WEB-INF/logkit.conf and track the
> processing in the file WEB-INF/logs/sitemap.log.

i put the above pipeline in inside the publication-sitemap.xmap of my
publication (matching is shown in sitemap.log). it's purpos is to
intercept requests for index.html and generate a xml-stream from
news-files inside a directory called "news" .... that works so far, so
my result looks like:

<lenya>
 <cmsbody>
  <allnews xmns="http://somewhere/xml/news">
   <news>
    ...
   </news>
  </allnews>
 </cmsbody>
</lenya>

the question is now, how can i use the defined doctype-schemas to
transform this to the beauty lenya-menu.


> In the default publication, the pipeline that adds the lenya
> authoring menu has this matcher:
> 
>   <map:match pattern="lenyabody-*/*/*/*/**">
yes, i saw this, but i'm uncertain where to how to get the needed
parameters with my above schema.


> > generation of leafnodes:
> > i'd like to create leafnodes for some pages on my site. so i registered
> > the DefaultLeafCreator for the approperiate doctype... a leaf is then
> > created, but the sitetree is updated in the branch-style.
> >
> > is it because i use the standard input-form and this form passes some
> > parent-node parameters?
> 
> I don't quite follow the problem here.  What is the difference
> between a leaf and a branch?  In a leaf, do you want to prevent
> child nodes?
yes and i don't want the "somwhat/index_en.xml" structure for one area
on my publication.


>   If so, you'll have to extend the logic provide in the
> default publication.
i hoped i can achieve on modifieing the sitemap and create my one
Creators, that simply calculate a filename from date and save the files
to my "news" directory.



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


Re: questions about lenya

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Jean Pierre LeJacq wrote:

>>userdefined sourcecode:
>>i saw in other sampe-publications that sourcecode is placed under
>>a "java" directory. is this source automatically compiled or to i
>>need to compile and placeit under WEB-INF/classes ?
> 
> 
> I don't believe this is automatically compiled but that is easy to
> check.  In any case, the resulting compiled code needs to be in
> WEB-INF/classes or in WEB-INF/libs as a jar file.

the build takes care of it. it is compiled automatically.


-- 
Gregor J. Rothfuss
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://wyona.com                   http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com                       gregor@apache.org

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


Re: questions about lenya

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Fri, 11 Jun 2004, news wrote:

> i try to create a publication out from the default publication .
>
> the frist problem i have:
> my index page is generated in the sitemap but i can't get the lenya-menu
> and the content on the site. i tried many ways, here is the best result
> (no content is shown :-)
>
> <map:pipeline>
>   <map:match pattern="*/index.html">
>
> ... snip ...

I difficult to see what pipeline processing is occurring here.  If
you haven't already, I suggest you increase the logging level for
sitemap processing to DEBUG in WEB-INF/logkit.conf and track the
processing in the file WEB-INF/logs/sitemap.log.

In the default publication, the pipeline that adds the lenya
authoring menu has this matcher:

  <map:match pattern="lenyabody-*/*/*/*/**">


> btw. i have all my doctypes proper configured and they work, when
> i create them via menu (so that a xml-file is created in content/)
> ... can i use this function for a stream like above?

Yes.


> generation of leafnodes:
> i'd like to create leafnodes for some pages on my site. so i registered
> the DefaultLeafCreator for the approperiate doctype... a leaf is then
> created, but the sitetree is updated in the branch-style.
>
> is it because i use the standard input-form and this form passes some
> parent-node parameters?

I don't quite follow the problem here.  What is the difference
between a leaf and a branch?  In a leaf, do you want to prevent
child nodes?  If so, you'll have to extend the logic provide in the
default publication.


> userdefined sourcecode:
> i saw in other sampe-publications that sourcecode is placed under
> a "java" directory. is this source automatically compiled or to i
> need to compile and placeit under WEB-INF/classes ?

I don't believe this is automatically compiled but that is easy to
check.  In any case, the resulting compiled code needs to be in
WEB-INF/classes or in WEB-INF/libs as a jar file.

-- 
JP



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