You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Lars Geldner <ge...@gmx.net> on 2009/03/12 17:59:53 UTC

share sites between publications

Dear lenya users and developers,

we have two publications. How can we integrate a site of one publication into another publication?
For example, we want to have a link in the site tree of the first publication. When the user clicks that link, a site of another publication should be opened in that way, that only the site's content is displayed (within the frame of this publication) but not the site tree of the second publication.

Thanks in advance!

Regards,

Lars Geldner
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01

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


Re: share sites between publications

Posted by Andreas Hartmann <an...@apache.org>.
Hi Lars,

Lars Geldner schrieb:
> Hi Andreas,
> 
> * I added a new page to my publication called "includetest".
> 
> * In the body of that page I added only one div element:
>   <div id="refsea"></div>
> 
> * In the XSLT stylesheet webapps/lenya/lenya/pubs/mypub/xslt/page2xhtml.xsl I added the following template:
>  <xsl:template match="xhtml:div[@id = 'refsea']">
>     <ci:include src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"/>
>  </xsl:template>
> (In the first step I only want to test including a page of the same publication, therefore the parameter "pub" is missing. The referenced document is in the same publication.)
> 
> * When I open the page "includetest", this page is empty. The HTML source code of that page looks like:
> <!-- ... -->
> <div id="main">
>   <div id="body">
>     <include xmlns="http://apache.org/cocoon/include/1.0" src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml" />
>   </div>
> </div>
> That means, Lenya has not transformed the include element.
> 
> * IMHO I have to add an include transformer to the publication sitemap, is it right?

Yes, this is correct.

> But when I add something like that
> <map:pipeline>
>   <map:match pattern="**/includetest.html">
>     <map:transform type="cinclude"/>
>   </map:match>
> </map:pipeline>
> Lenya says "Must set a generator before adding transformer 'cinclude'
> ". I think, I'm on the right way, but can you please provide my a hint of how to transform the include element?

You have to add the include transformation step to an existing pipeline 
that already processes the document. You could for instance use this 
pipeline in the sitemap of the default publication:

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

The position of the transformation step depends on the steps you want to 
execute before/after the inclusion, but it should certainly be 
positioned before the uuid2url transformer.

BTW, it will become a bit tricky to rewrite the links in the included 
document. If it contains internal links without the pub parameter, the 
uuid2url transformer will try to resolve them in the current 
publication, which will lead to errors. You could extend the link 
resolver so that it looks in other publications if the document is not 
found in the current publication.

HTH,

-- Andreas

> 
> Thanks in advance!
> 
> Lars
> 
>> Datum: Thu, 12 Mar 2009 21:43:49 +0100
>> Von: Andreas Hartmann <an...@apache.org>
>> An: user@lenya.apache.org
>> Betreff: Re: share sites between publications
> 
>> Hi Lars,
>>
>> Lars Geldner schrieb:
>>> Dear lenya users and developers,
>>>
>>> we have two publications. How can we integrate a site of one
>>> publication into another publication?
>> with the term "site", are you referring to a single page (i.e., Lenya 
>> document), or to a subsite (i.e., sub-sitetree)?
>>
>>> For example, we want to have a
>>> link in the site tree of the first publication. When the user clicks
>>> that link, a site of another publication should be opened in that
>>> way, that only the site's content is displayed (within the frame of
>>> this publication) but not the site tree of the second publication.
>> If you want to include a page, you can just call it using the 
>> lenya-document: protocol or using the site: protocol, appending the 
>> format parameter for the format you need:
>>
>> <i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>
>>
>> It is important to include the pub parameter because otherwise the 
>> lenya-document source factory will look for the document only in the 
>> current publication.
>>
>> HTH,
>>
>> -- Andreas
>>
>>
>> -- 
>> Andreas Hartmann, CTO
>> BeCompany GmbH
>> http://www.becompany.ch
>> Tel.: +41 (0) 43 818 57 01
> 


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


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


Re: share sites between publications

Posted by Lars Geldner <ge...@gmx.net>.
Hi Andreas,

we have 5 publications and the problem occurs in all (4 other) publications regardless of which pages of them I'm referencing.

If I click Hilfe (Help) => Über Apache Lenya (About Apache Lenya) it says
"Apache Lenya 2.0 (Revision: xxx)".

I will report a bug.
Can you please provide me the qualified class name of the link resolver. Maybe I can take a look into the code by my own.

Best regards,

Lars

-------- Original-Nachricht --------
> Datum: Fri, 13 Mar 2009 10:42:48 +0100
> Von: Andreas Hartmann <an...@apache.org>
> An: user@lenya.apache.org
> Betreff: Re: share sites between publications

> Hi Lars,
> 
> Lars Geldner schrieb:
> > Hi Andreas,
> > 
> > * Ok, if I delete the pattern for "includetest.html" and add the
> transformer
> > <map:transform type="cinclude"/>
> > to the pattern
> > <map:match pattern="lenyabody-*/*/*/*/**">
> > then it works fine when including pages of the same publication! Thanks!
> 
> alright, you've been quicker than me :)
> 
> > But if I'm changing the referenced UUID to a page of another publication
> like that
> > <xsl:template match="xhtml:div[@id = 'refsea']">
> >   <ci:include
> src="lenya-document:d9e80e00-7373-11dd-8142-93a30b5c925c,pub=robotronsea?format=xhtml"/>
> > </xsl:template>
> > Lenya says "LinkException: The target doesn't exist!".
> 
> This is strange. Which version of Lenya are you using? This sounds like 
> a bug, maybe the link resolver doesn't take the pub parameter into 
> account. Would you mind filing a bug report? TIA!
> 
> Would it be an option for you to use the debugger to trace the problem?
> 
> -- Andreas
> 
> 
> 
> > 
> > -------- Original-Nachricht --------
> >> Datum: Fri, 13 Mar 2009 10:07:56 +0100
> >> Von: "Lars Geldner" <ge...@gmx.net>
> >> An: user@lenya.apache.org
> >> Betreff: Re: share sites between publications
> > 
> >> Hi Andreas,
> >>
> >> * I added a new page to my publication called "includetest".
> >>
> >> * In the body of that page I added only one div element:
> >>   <div id="refsea"></div>
> >>
> >> * In the XSLT stylesheet
> >> webapps/lenya/lenya/pubs/mypub/xslt/page2xhtml.xsl I added the
> following template:
> >>  <xsl:template match="xhtml:div[@id = 'refsea']">
> >>     <ci:include
> >>
> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"/>
> >>  </xsl:template>
> >> (In the first step I only want to test including a page of the same
> >> publication, therefore the parameter "pub" is missing. The referenced
> document is
> >> in the same publication.)
> >>
> >> * When I open the page "includetest", this page is empty. The HTML
> source
> >> code of that page looks like:
> >> <!-- ... -->
> >> <div id="main">
> >>   <div id="body">
> >>     <include xmlns="http://apache.org/cocoon/include/1.0"
> >> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"
> />
> >>   </div>
> >> </div>
> >> That means, Lenya has not transformed the include element.
> >>
> >> * IMHO I have to add an include transformer to the publication sitemap,
> is
> >> it right? But when I add something like that
> >> <map:pipeline>
> >>   <map:match pattern="**/includetest.html">
> >>     <map:transform type="cinclude"/>
> >>   </map:match>
> >> </map:pipeline>
> >> Lenya says "Must set a generator before adding transformer 'cinclude'
> >> ". I think, I'm on the right way, but can you please provide my a hint
> of
> >> how to transform the include element?
> >>
> >> Thanks in advance!
> >>
> >> Lars
> >>
> >>> Datum: Thu, 12 Mar 2009 21:43:49 +0100
> >>> Von: Andreas Hartmann <an...@apache.org>
> >>> An: user@lenya.apache.org
> >>> Betreff: Re: share sites between publications
> >>> Hi Lars,
> >>>
> >>> Lars Geldner schrieb:
> >>>> Dear lenya users and developers,
> >>>>
> >>>> we have two publications. How can we integrate a site of one
> >>>> publication into another publication?
> >>> with the term "site", are you referring to a single page (i.e., Lenya 
> >>> document), or to a subsite (i.e., sub-sitetree)?
> >>>
> >>>> For example, we want to have a
> >>>> link in the site tree of the first publication. When the user clicks
> >>>> that link, a site of another publication should be opened in that
> >>>> way, that only the site's content is displayed (within the frame of
> >>>> this publication) but not the site tree of the second publication.
> >>> If you want to include a page, you can just call it using the 
> >>> lenya-document: protocol or using the site: protocol, appending the 
> >>> format parameter for the format you need:
> >>>
> >>> <i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>
> >>>
> >>> It is important to include the pub parameter because otherwise the 
> >>> lenya-document source factory will look for the document only in the 
> >>> current publication.
> >>>
> >>> HTH,
> >>>
> >>> -- Andreas
> >>>
> >>>
> >>> -- 
> >>> Andreas Hartmann, CTO
> >>> BeCompany GmbH
> >>> http://www.becompany.ch
> >>> Tel.: +41 (0) 43 818 57 01
> >> -- 
> >> Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem für nur 
> >> 17,95 ¿/mtl. + 1 Monat gratis!*
> >> http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> >> For additional commands, e-mail: user-help@lenya.apache.org
> > 
> 
> 
> -- 
> Andreas Hartmann, CTO
> BeCompany GmbH
> http://www.becompany.ch
> Tel.: +41 (0) 43 818 57 01
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org

-- 
Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem für nur 
17,95 ¿/mtl. + 1 Monat gratis!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a

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


Re: share sites between publications

Posted by Andreas Hartmann <an...@apache.org>.
Hi Lars,

Lars Geldner schrieb:
> do I need that format=xhtml parameter? Because it looks also fine without that parameter (also Lenya 2.0).

that depends on your usage scenario.

If you omit the format=xhtml parameter, the include transformer includes 
the raw document. That might be (kind-of) OK if the document contains 
plain XHTML, but won't work if the document uses a custom schema.

If you append the format=xhtml parameter, the document's resource type 
sitemap takes care of pre-rendering the document in the XHTML format, so 
it should be fine to include it in other XHTML pages (with some 
post-processing to extract the XHTML body markup).

 > Best regards and thanks for your support!

You're very welcome :)

It's good to see that someone leverages these inclusion and formatting 
features, IMO this is an area where Lenya 2.0.x really shines.

-- Andreas

> 
> Lars
> 
> 
> -------- Original-Nachricht --------
>> Datum: Fri, 13 Mar 2009 15:33:59 +0100
>> Von: Andreas Hartmann <an...@apache.org>
>> An: user@lenya.apache.org
>> Betreff: Re: share sites between publications
> 
>> Hi Lars,
>>
>> Lars Geldner schrieb:
>>> in the meanwhile I installed Lenya 2.0.2 with two simple pubs. Including
>> pages between the pubs works fine (also with format parameter).
>>> Then I created two new pubs in our Lenya 2.0 production system. The
>> tests failed.
>>> => There could be an bug in Lenya 2.0 or our production system is
>> influenced in another manner...
>>
>> yes, it's a bug in Lenya 2.0. Thanks for testing!
>>
>> -- Andreas
>>
>>
>>
>>> -------- Original-Nachricht --------
>>>> Datum: Fri, 13 Mar 2009 10:59:13 +0100
>>>> Von: Andreas Hartmann <an...@apache.org>
>>>> An: user@lenya.apache.org
>>>> Betreff: Re: share sites between publications
>>>> Hi Lars,
>>>>
>>>> Andreas Hartmann schrieb:
>>>>> Hi Lars,
>>>>>
>>>>> Lars Geldner schrieb:
>>>>>> Hi Andreas,
>>>>>>
>>>>>> * Ok, if I delete the pattern for "includetest.html" and add the 
>>>>>> transformer
>>>>>> <map:transform type="cinclude"/>
>>>>>> to the pattern
>>>>>> <map:match pattern="lenyabody-*/*/*/*/**">
>>>>>> then it works fine when including pages of the same publication!
>>>> Thanks!
>>>>> alright, you've been quicker than me :)
>>>>>
>>>>>> But if I'm changing the referenced UUID to a page of another 
>>>>>> publication like that
>>>>>> <xsl:template match="xhtml:div[@id = 'refsea']">
>>>>>>   <ci:include 
>>>>>>
>> src="lenya-document:d9e80e00-7373-11dd-8142-93a30b5c925c,pub=robotronsea?format=xhtml"/> 
>>>>>> </xsl:template>
>>>>>> Lenya says "LinkException: The target doesn't exist!".
>>>>> This is strange. Which version of Lenya are you using? This sounds
>> like 
>>>>> a bug, maybe the link resolver doesn't take the pub parameter into 
>>>>> account. Would you mind filing a bug report? TIA!
>>>> BTW, are you sure that the exception was thrown by the include 
>>>> transformer and not by a subsequent uuid2url transformation which 
>>>> couldn't resolve an internal link in the included document?
>>>>
>>>> -- Andreas
>>>>
>>>>
>>>>
>>>>
>>>>>> -------- Original-Nachricht --------
>>>>>>> Datum: Fri, 13 Mar 2009 10:07:56 +0100
>>>>>>> Von: "Lars Geldner" <ge...@gmx.net>
>>>>>>> An: user@lenya.apache.org
>>>>>>> Betreff: Re: share sites between publications
>>>>>>> Hi Andreas,
>>>>>>>
>>>>>>> * I added a new page to my publication called "includetest".
>>>>>>>
>>>>>>> * In the body of that page I added only one div element:
>>>>>>>   <div id="refsea"></div>
>>>>>>>
>>>>>>> * In the XSLT stylesheet
>>>>>>> webapps/lenya/lenya/pubs/mypub/xslt/page2xhtml.xsl I added the 
>>>>>>> following template:
>>>>>>>  <xsl:template match="xhtml:div[@id = 'refsea']">
>>>>>>>     <ci:include
>>>>>>>
>> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"/>
>>>>>>>  </xsl:template>
>>>>>>> (In the first step I only want to test including a page of the same
>>>>>>> publication, therefore the parameter "pub" is missing. The
>> referenced 
>>>>>>> document is
>>>>>>> in the same publication.)
>>>>>>>
>>>>>>> * When I open the page "includetest", this page is empty. The HTML 
>>>>>>> source
>>>>>>> code of that page looks like:
>>>>>>> <!-- ... -->
>>>>>>> <div id="main">
>>>>>>>   <div id="body">
>>>>>>>     <include xmlns="http://apache.org/cocoon/include/1.0"
>>>>>>>
>> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"
>>>>>>> />
>>>>>>>   </div>
>>>>>>> </div>
>>>>>>> That means, Lenya has not transformed the include element.
>>>>>>>
>>>>>>> * IMHO I have to add an include transformer to the publication 
>>>>>>> sitemap, is
>>>>>>> it right? But when I add something like that
>>>>>>> <map:pipeline>
>>>>>>>   <map:match pattern="**/includetest.html">
>>>>>>>     <map:transform type="cinclude"/>
>>>>>>>   </map:match>
>>>>>>> </map:pipeline>
>>>>>>> Lenya says "Must set a generator before adding transformer
>> 'cinclude'
>>>>>>> ". I think, I'm on the right way, but can you please provide my a 
>>>>>>> hint of
>>>>>>> how to transform the include element?
>>>>>>>
>>>>>>> Thanks in advance!
>>>>>>>
>>>>>>> Lars
>>>>>>>
>>>>>>>> Datum: Thu, 12 Mar 2009 21:43:49 +0100
>>>>>>>> Von: Andreas Hartmann <an...@apache.org>
>>>>>>>> An: user@lenya.apache.org
>>>>>>>> Betreff: Re: share sites between publications
>>>>>>>> Hi Lars,
>>>>>>>>
>>>>>>>> Lars Geldner schrieb:
>>>>>>>>> Dear lenya users and developers,
>>>>>>>>>
>>>>>>>>> we have two publications. How can we integrate a site of one
>>>>>>>>> publication into another publication?
>>>>>>>> with the term "site", are you referring to a single page (i.e., 
>>>>>>>> Lenya document), or to a subsite (i.e., sub-sitetree)?
>>>>>>>>
>>>>>>>>> For example, we want to have a
>>>>>>>>> link in the site tree of the first publication. When the user
>> clicks
>>>>>>>>> that link, a site of another publication should be opened in that
>>>>>>>>> way, that only the site's content is displayed (within the frame
>> of
>>>>>>>>> this publication) but not the site tree of the second publication.
>>>>>>>> If you want to include a page, you can just call it using the 
>>>>>>>> lenya-document: protocol or using the site: protocol, appending the
>>>>>>>> format parameter for the format you need:
>>>>>>>>
>>>>>>>> <i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>
>>>>>>>>
>>>>>>>> It is important to include the pub parameter because otherwise the 
>>>>>>>> lenya-document source factory will look for the document only in
>> the 
>>>>>>>> current publication.
>>>>>>>>
>>>>>>>> HTH,
>>>>>>>>
>>>>>>>> -- Andreas
>>>>>>>>
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> Andreas Hartmann, CTO
>>>>>>>> BeCompany GmbH
>>>>>>>> http://www.becompany.ch
>>>>>>>> Tel.: +41 (0) 43 818 57 01
>>>>>>> -- 
>>>>>>> Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem für nur
>> 17,95 
>>>>>>> ¿/mtl. + 1 Monat gratis!*
>>>>>>> http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
>>>>>>>
>>>>>>>
>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>>>>>>> For additional commands, e-mail: user-help@lenya.apache.org
>>>> -- 
>>>> Andreas Hartmann, CTO
>>>> BeCompany GmbH
>>>> http://www.becompany.ch
>>>> Tel.: +41 (0) 43 818 57 01
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>>>> For additional commands, e-mail: user-help@lenya.apache.org
>>
>> -- 
>> Andreas Hartmann, CTO
>> BeCompany GmbH
>> http://www.becompany.ch
>> Tel.: +41 (0) 43 818 57 01
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
> 


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


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


Re: share sites between publications

Posted by Lars Geldner <ge...@gmx.net>.
Hi Andreas,

do I need that format=xhtml parameter? Because it looks also fine without that parameter (also Lenya 2.0).

Best regards and thanks for your support!

Lars


-------- Original-Nachricht --------
> Datum: Fri, 13 Mar 2009 15:33:59 +0100
> Von: Andreas Hartmann <an...@apache.org>
> An: user@lenya.apache.org
> Betreff: Re: share sites between publications

> Hi Lars,
> 
> Lars Geldner schrieb:
> > in the meanwhile I installed Lenya 2.0.2 with two simple pubs. Including
> pages between the pubs works fine (also with format parameter).
> > Then I created two new pubs in our Lenya 2.0 production system. The
> tests failed.
> > => There could be an bug in Lenya 2.0 or our production system is
> influenced in another manner...
> 
> yes, it's a bug in Lenya 2.0. Thanks for testing!
> 
> -- Andreas
> 
> 
> 
> > -------- Original-Nachricht --------
> >> Datum: Fri, 13 Mar 2009 10:59:13 +0100
> >> Von: Andreas Hartmann <an...@apache.org>
> >> An: user@lenya.apache.org
> >> Betreff: Re: share sites between publications
> > 
> >> Hi Lars,
> >>
> >> Andreas Hartmann schrieb:
> >>> Hi Lars,
> >>>
> >>> Lars Geldner schrieb:
> >>>> Hi Andreas,
> >>>>
> >>>> * Ok, if I delete the pattern for "includetest.html" and add the 
> >>>> transformer
> >>>> <map:transform type="cinclude"/>
> >>>> to the pattern
> >>>> <map:match pattern="lenyabody-*/*/*/*/**">
> >>>> then it works fine when including pages of the same publication!
> >> Thanks!
> >>> alright, you've been quicker than me :)
> >>>
> >>>> But if I'm changing the referenced UUID to a page of another 
> >>>> publication like that
> >>>> <xsl:template match="xhtml:div[@id = 'refsea']">
> >>>>   <ci:include 
> >>>>
> >>
> src="lenya-document:d9e80e00-7373-11dd-8142-93a30b5c925c,pub=robotronsea?format=xhtml"/> 
> >>>> </xsl:template>
> >>>> Lenya says "LinkException: The target doesn't exist!".
> >>> This is strange. Which version of Lenya are you using? This sounds
> like 
> >>> a bug, maybe the link resolver doesn't take the pub parameter into 
> >>> account. Would you mind filing a bug report? TIA!
> >> BTW, are you sure that the exception was thrown by the include 
> >> transformer and not by a subsequent uuid2url transformation which 
> >> couldn't resolve an internal link in the included document?
> >>
> >> -- Andreas
> >>
> >>
> >>
> >>
> >>>> -------- Original-Nachricht --------
> >>>>> Datum: Fri, 13 Mar 2009 10:07:56 +0100
> >>>>> Von: "Lars Geldner" <ge...@gmx.net>
> >>>>> An: user@lenya.apache.org
> >>>>> Betreff: Re: share sites between publications
> >>>>> Hi Andreas,
> >>>>>
> >>>>> * I added a new page to my publication called "includetest".
> >>>>>
> >>>>> * In the body of that page I added only one div element:
> >>>>>   <div id="refsea"></div>
> >>>>>
> >>>>> * In the XSLT stylesheet
> >>>>> webapps/lenya/lenya/pubs/mypub/xslt/page2xhtml.xsl I added the 
> >>>>> following template:
> >>>>>  <xsl:template match="xhtml:div[@id = 'refsea']">
> >>>>>     <ci:include
> >>>>>
> >>
> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"/>
> >>>>>  </xsl:template>
> >>>>> (In the first step I only want to test including a page of the same
> >>>>> publication, therefore the parameter "pub" is missing. The
> referenced 
> >>>>> document is
> >>>>> in the same publication.)
> >>>>>
> >>>>> * When I open the page "includetest", this page is empty. The HTML 
> >>>>> source
> >>>>> code of that page looks like:
> >>>>> <!-- ... -->
> >>>>> <div id="main">
> >>>>>   <div id="body">
> >>>>>     <include xmlns="http://apache.org/cocoon/include/1.0"
> >>>>>
> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"
> >>>>> />
> >>>>>   </div>
> >>>>> </div>
> >>>>> That means, Lenya has not transformed the include element.
> >>>>>
> >>>>> * IMHO I have to add an include transformer to the publication 
> >>>>> sitemap, is
> >>>>> it right? But when I add something like that
> >>>>> <map:pipeline>
> >>>>>   <map:match pattern="**/includetest.html">
> >>>>>     <map:transform type="cinclude"/>
> >>>>>   </map:match>
> >>>>> </map:pipeline>
> >>>>> Lenya says "Must set a generator before adding transformer
> 'cinclude'
> >>>>> ". I think, I'm on the right way, but can you please provide my a 
> >>>>> hint of
> >>>>> how to transform the include element?
> >>>>>
> >>>>> Thanks in advance!
> >>>>>
> >>>>> Lars
> >>>>>
> >>>>>> Datum: Thu, 12 Mar 2009 21:43:49 +0100
> >>>>>> Von: Andreas Hartmann <an...@apache.org>
> >>>>>> An: user@lenya.apache.org
> >>>>>> Betreff: Re: share sites between publications
> >>>>>> Hi Lars,
> >>>>>>
> >>>>>> Lars Geldner schrieb:
> >>>>>>> Dear lenya users and developers,
> >>>>>>>
> >>>>>>> we have two publications. How can we integrate a site of one
> >>>>>>> publication into another publication?
> >>>>>> with the term "site", are you referring to a single page (i.e., 
> >>>>>> Lenya document), or to a subsite (i.e., sub-sitetree)?
> >>>>>>
> >>>>>>> For example, we want to have a
> >>>>>>> link in the site tree of the first publication. When the user
> clicks
> >>>>>>> that link, a site of another publication should be opened in that
> >>>>>>> way, that only the site's content is displayed (within the frame
> of
> >>>>>>> this publication) but not the site tree of the second publication.
> >>>>>> If you want to include a page, you can just call it using the 
> >>>>>> lenya-document: protocol or using the site: protocol, appending the
> >>>>>> format parameter for the format you need:
> >>>>>>
> >>>>>> <i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>
> >>>>>>
> >>>>>> It is important to include the pub parameter because otherwise the 
> >>>>>> lenya-document source factory will look for the document only in
> the 
> >>>>>> current publication.
> >>>>>>
> >>>>>> HTH,
> >>>>>>
> >>>>>> -- Andreas
> >>>>>>
> >>>>>>
> >>>>>> -- 
> >>>>>> Andreas Hartmann, CTO
> >>>>>> BeCompany GmbH
> >>>>>> http://www.becompany.ch
> >>>>>> Tel.: +41 (0) 43 818 57 01
> >>>>> -- 
> >>>>> Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem für nur
> 17,95 
> >>>>> ¿/mtl. + 1 Monat gratis!*
> >>>>> http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
> >>>>>
> >>>>>
> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> >>>>> For additional commands, e-mail: user-help@lenya.apache.org
> >>>
> >>
> >> -- 
> >> Andreas Hartmann, CTO
> >> BeCompany GmbH
> >> http://www.becompany.ch
> >> Tel.: +41 (0) 43 818 57 01
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> >> For additional commands, e-mail: user-help@lenya.apache.org
> > 
> 
> 
> -- 
> Andreas Hartmann, CTO
> BeCompany GmbH
> http://www.becompany.ch
> Tel.: +41 (0) 43 818 57 01
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01

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


Re: share sites between publications

Posted by Andreas Hartmann <an...@apache.org>.
Hi Lars,

Lars Geldner schrieb:
> in the meanwhile I installed Lenya 2.0.2 with two simple pubs. Including pages between the pubs works fine (also with format parameter).
> Then I created two new pubs in our Lenya 2.0 production system. The tests failed.
> => There could be an bug in Lenya 2.0 or our production system is influenced in another manner...

yes, it's a bug in Lenya 2.0. Thanks for testing!

-- Andreas



> -------- Original-Nachricht --------
>> Datum: Fri, 13 Mar 2009 10:59:13 +0100
>> Von: Andreas Hartmann <an...@apache.org>
>> An: user@lenya.apache.org
>> Betreff: Re: share sites between publications
> 
>> Hi Lars,
>>
>> Andreas Hartmann schrieb:
>>> Hi Lars,
>>>
>>> Lars Geldner schrieb:
>>>> Hi Andreas,
>>>>
>>>> * Ok, if I delete the pattern for "includetest.html" and add the 
>>>> transformer
>>>> <map:transform type="cinclude"/>
>>>> to the pattern
>>>> <map:match pattern="lenyabody-*/*/*/*/**">
>>>> then it works fine when including pages of the same publication!
>> Thanks!
>>> alright, you've been quicker than me :)
>>>
>>>> But if I'm changing the referenced UUID to a page of another 
>>>> publication like that
>>>> <xsl:template match="xhtml:div[@id = 'refsea']">
>>>>   <ci:include 
>>>>
>> src="lenya-document:d9e80e00-7373-11dd-8142-93a30b5c925c,pub=robotronsea?format=xhtml"/> 
>>>> </xsl:template>
>>>> Lenya says "LinkException: The target doesn't exist!".
>>> This is strange. Which version of Lenya are you using? This sounds like 
>>> a bug, maybe the link resolver doesn't take the pub parameter into 
>>> account. Would you mind filing a bug report? TIA!
>> BTW, are you sure that the exception was thrown by the include 
>> transformer and not by a subsequent uuid2url transformation which 
>> couldn't resolve an internal link in the included document?
>>
>> -- Andreas
>>
>>
>>
>>
>>>> -------- Original-Nachricht --------
>>>>> Datum: Fri, 13 Mar 2009 10:07:56 +0100
>>>>> Von: "Lars Geldner" <ge...@gmx.net>
>>>>> An: user@lenya.apache.org
>>>>> Betreff: Re: share sites between publications
>>>>> Hi Andreas,
>>>>>
>>>>> * I added a new page to my publication called "includetest".
>>>>>
>>>>> * In the body of that page I added only one div element:
>>>>>   <div id="refsea"></div>
>>>>>
>>>>> * In the XSLT stylesheet
>>>>> webapps/lenya/lenya/pubs/mypub/xslt/page2xhtml.xsl I added the 
>>>>> following template:
>>>>>  <xsl:template match="xhtml:div[@id = 'refsea']">
>>>>>     <ci:include
>>>>>
>> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"/>
>>>>>  </xsl:template>
>>>>> (In the first step I only want to test including a page of the same
>>>>> publication, therefore the parameter "pub" is missing. The referenced 
>>>>> document is
>>>>> in the same publication.)
>>>>>
>>>>> * When I open the page "includetest", this page is empty. The HTML 
>>>>> source
>>>>> code of that page looks like:
>>>>> <!-- ... -->
>>>>> <div id="main">
>>>>>   <div id="body">
>>>>>     <include xmlns="http://apache.org/cocoon/include/1.0"
>>>>> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"
>>>>> />
>>>>>   </div>
>>>>> </div>
>>>>> That means, Lenya has not transformed the include element.
>>>>>
>>>>> * IMHO I have to add an include transformer to the publication 
>>>>> sitemap, is
>>>>> it right? But when I add something like that
>>>>> <map:pipeline>
>>>>>   <map:match pattern="**/includetest.html">
>>>>>     <map:transform type="cinclude"/>
>>>>>   </map:match>
>>>>> </map:pipeline>
>>>>> Lenya says "Must set a generator before adding transformer 'cinclude'
>>>>> ". I think, I'm on the right way, but can you please provide my a 
>>>>> hint of
>>>>> how to transform the include element?
>>>>>
>>>>> Thanks in advance!
>>>>>
>>>>> Lars
>>>>>
>>>>>> Datum: Thu, 12 Mar 2009 21:43:49 +0100
>>>>>> Von: Andreas Hartmann <an...@apache.org>
>>>>>> An: user@lenya.apache.org
>>>>>> Betreff: Re: share sites between publications
>>>>>> Hi Lars,
>>>>>>
>>>>>> Lars Geldner schrieb:
>>>>>>> Dear lenya users and developers,
>>>>>>>
>>>>>>> we have two publications. How can we integrate a site of one
>>>>>>> publication into another publication?
>>>>>> with the term "site", are you referring to a single page (i.e., 
>>>>>> Lenya document), or to a subsite (i.e., sub-sitetree)?
>>>>>>
>>>>>>> For example, we want to have a
>>>>>>> link in the site tree of the first publication. When the user clicks
>>>>>>> that link, a site of another publication should be opened in that
>>>>>>> way, that only the site's content is displayed (within the frame of
>>>>>>> this publication) but not the site tree of the second publication.
>>>>>> If you want to include a page, you can just call it using the 
>>>>>> lenya-document: protocol or using the site: protocol, appending the 
>>>>>> format parameter for the format you need:
>>>>>>
>>>>>> <i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>
>>>>>>
>>>>>> It is important to include the pub parameter because otherwise the 
>>>>>> lenya-document source factory will look for the document only in the 
>>>>>> current publication.
>>>>>>
>>>>>> HTH,
>>>>>>
>>>>>> -- Andreas
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Andreas Hartmann, CTO
>>>>>> BeCompany GmbH
>>>>>> http://www.becompany.ch
>>>>>> Tel.: +41 (0) 43 818 57 01
>>>>> -- 
>>>>> Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem für nur 17,95 
>>>>> ¿/mtl. + 1 Monat gratis!*
>>>>> http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>>>>> For additional commands, e-mail: user-help@lenya.apache.org
>>>
>>
>> -- 
>> Andreas Hartmann, CTO
>> BeCompany GmbH
>> http://www.becompany.ch
>> Tel.: +41 (0) 43 818 57 01
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
> 


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


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


Re: share sites between publications

Posted by Lars Geldner <ge...@gmx.net>.
Hi Andreas,

in the meanwhile I installed Lenya 2.0.2 with two simple pubs. Including pages between the pubs works fine (also with format parameter).
Then I created two new pubs in our Lenya 2.0 production system. The tests failed.
=> There could be an bug in Lenya 2.0 or our production system is influenced in another manner...

Lars


-------- Original-Nachricht --------
> Datum: Fri, 13 Mar 2009 10:59:13 +0100
> Von: Andreas Hartmann <an...@apache.org>
> An: user@lenya.apache.org
> Betreff: Re: share sites between publications

> Hi Lars,
> 
> Andreas Hartmann schrieb:
> > Hi Lars,
> > 
> > Lars Geldner schrieb:
> >> Hi Andreas,
> >>
> >> * Ok, if I delete the pattern for "includetest.html" and add the 
> >> transformer
> >> <map:transform type="cinclude"/>
> >> to the pattern
> >> <map:match pattern="lenyabody-*/*/*/*/**">
> >> then it works fine when including pages of the same publication!
> Thanks!
> > 
> > alright, you've been quicker than me :)
> > 
> >> But if I'm changing the referenced UUID to a page of another 
> >> publication like that
> >> <xsl:template match="xhtml:div[@id = 'refsea']">
> >>   <ci:include 
> >>
> src="lenya-document:d9e80e00-7373-11dd-8142-93a30b5c925c,pub=robotronsea?format=xhtml"/> 
> >>
> >> </xsl:template>
> >> Lenya says "LinkException: The target doesn't exist!".
> > 
> > This is strange. Which version of Lenya are you using? This sounds like 
> > a bug, maybe the link resolver doesn't take the pub parameter into 
> > account. Would you mind filing a bug report? TIA!
> 
> BTW, are you sure that the exception was thrown by the include 
> transformer and not by a subsequent uuid2url transformation which 
> couldn't resolve an internal link in the included document?
> 
> -- Andreas
> 
> 
> 
> 
> >>
> >> -------- Original-Nachricht --------
> >>> Datum: Fri, 13 Mar 2009 10:07:56 +0100
> >>> Von: "Lars Geldner" <ge...@gmx.net>
> >>> An: user@lenya.apache.org
> >>> Betreff: Re: share sites between publications
> >>
> >>> Hi Andreas,
> >>>
> >>> * I added a new page to my publication called "includetest".
> >>>
> >>> * In the body of that page I added only one div element:
> >>>   <div id="refsea"></div>
> >>>
> >>> * In the XSLT stylesheet
> >>> webapps/lenya/lenya/pubs/mypub/xslt/page2xhtml.xsl I added the 
> >>> following template:
> >>>  <xsl:template match="xhtml:div[@id = 'refsea']">
> >>>     <ci:include
> >>>
> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"/>
> >>>  </xsl:template>
> >>> (In the first step I only want to test including a page of the same
> >>> publication, therefore the parameter "pub" is missing. The referenced 
> >>> document is
> >>> in the same publication.)
> >>>
> >>> * When I open the page "includetest", this page is empty. The HTML 
> >>> source
> >>> code of that page looks like:
> >>> <!-- ... -->
> >>> <div id="main">
> >>>   <div id="body">
> >>>     <include xmlns="http://apache.org/cocoon/include/1.0"
> >>> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"
> >>> />
> >>>   </div>
> >>> </div>
> >>> That means, Lenya has not transformed the include element.
> >>>
> >>> * IMHO I have to add an include transformer to the publication 
> >>> sitemap, is
> >>> it right? But when I add something like that
> >>> <map:pipeline>
> >>>   <map:match pattern="**/includetest.html">
> >>>     <map:transform type="cinclude"/>
> >>>   </map:match>
> >>> </map:pipeline>
> >>> Lenya says "Must set a generator before adding transformer 'cinclude'
> >>> ". I think, I'm on the right way, but can you please provide my a 
> >>> hint of
> >>> how to transform the include element?
> >>>
> >>> Thanks in advance!
> >>>
> >>> Lars
> >>>
> >>>> Datum: Thu, 12 Mar 2009 21:43:49 +0100
> >>>> Von: Andreas Hartmann <an...@apache.org>
> >>>> An: user@lenya.apache.org
> >>>> Betreff: Re: share sites between publications
> >>>> Hi Lars,
> >>>>
> >>>> Lars Geldner schrieb:
> >>>>> Dear lenya users and developers,
> >>>>>
> >>>>> we have two publications. How can we integrate a site of one
> >>>>> publication into another publication?
> >>>> with the term "site", are you referring to a single page (i.e., 
> >>>> Lenya document), or to a subsite (i.e., sub-sitetree)?
> >>>>
> >>>>> For example, we want to have a
> >>>>> link in the site tree of the first publication. When the user clicks
> >>>>> that link, a site of another publication should be opened in that
> >>>>> way, that only the site's content is displayed (within the frame of
> >>>>> this publication) but not the site tree of the second publication.
> >>>> If you want to include a page, you can just call it using the 
> >>>> lenya-document: protocol or using the site: protocol, appending the 
> >>>> format parameter for the format you need:
> >>>>
> >>>> <i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>
> >>>>
> >>>> It is important to include the pub parameter because otherwise the 
> >>>> lenya-document source factory will look for the document only in the 
> >>>> current publication.
> >>>>
> >>>> HTH,
> >>>>
> >>>> -- Andreas
> >>>>
> >>>>
> >>>> -- 
> >>>> Andreas Hartmann, CTO
> >>>> BeCompany GmbH
> >>>> http://www.becompany.ch
> >>>> Tel.: +41 (0) 43 818 57 01
> >>> -- 
> >>> Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem für nur 17,95 
> >>> ¿/mtl. + 1 Monat gratis!*
> >>> http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> >>> For additional commands, e-mail: user-help@lenya.apache.org
> >>
> > 
> > 
> 
> 
> -- 
> Andreas Hartmann, CTO
> BeCompany GmbH
> http://www.becompany.ch
> Tel.: +41 (0) 43 818 57 01
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01

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


Re: share sites between publications

Posted by Lars Geldner <ge...@gmx.net>.
Hi Andreas,

the stack trace is very long. It contains
at org.apache.cocoon.transformation.CIncludeTransformer.processCIncludeElement(CIncludeTransformer.java:522)
	... 149 more
Caused by: java.lang.RuntimeException: org.apache.lenya.cms.linking.LinkException: The target doesn't exist!

If I'm searching (Strg+f) for "uuid" I'm getting the lines
at <map:transform type="uuid2url"> - file:///jakarta-tomcat-lenya/webapps/lenya/lenya/pubs/robotron/sitemap.xmap:249:41
and
at <map:transform type="uuid2url"> - file:///jakarta-tomcat-lenya/webapps/lenya/lenya/pubs/robotron/sitemap.xmap:249:41

There are no other sources containing "uuid".

The HTML of the referenced page in Kubu looks like
<H1>Ihre Vorteile</H1>
<P><STRONG>robotron*ecount</STRONG> basiert ... ONLY TEXT...</P>
<P>Unser System ist ... ONLY TEXT...</P>
<P><STRONG>robotron*ecount</STRONG> ist ... ONLY TEXT...</P>
<P>Mit ... ONLY TEXT...</P>
<P>Alle im Hintergrund ... ONLY TEXT...</P>
<P>Ihre ... ONLY TEXT...</P>

There are no internal links (shown in Kubu).

Best regards,

Lars

-------- Original-Nachricht --------
> Datum: Fri, 13 Mar 2009 10:59:13 +0100
> Von: Andreas Hartmann <an...@apache.org>
> An: user@lenya.apache.org
> Betreff: Re: share sites between publications

> Hi Lars,
> 
> Andreas Hartmann schrieb:
> > Hi Lars,
> > 
> > Lars Geldner schrieb:
> >> Hi Andreas,
> >>
> >> * Ok, if I delete the pattern for "includetest.html" and add the 
> >> transformer
> >> <map:transform type="cinclude"/>
> >> to the pattern
> >> <map:match pattern="lenyabody-*/*/*/*/**">
> >> then it works fine when including pages of the same publication!
> Thanks!
> > 
> > alright, you've been quicker than me :)
> > 
> >> But if I'm changing the referenced UUID to a page of another 
> >> publication like that
> >> <xsl:template match="xhtml:div[@id = 'refsea']">
> >>   <ci:include 
> >>
> src="lenya-document:d9e80e00-7373-11dd-8142-93a30b5c925c,pub=robotronsea?format=xhtml"/> 
> >>
> >> </xsl:template>
> >> Lenya says "LinkException: The target doesn't exist!".
> > 
> > This is strange. Which version of Lenya are you using? This sounds like 
> > a bug, maybe the link resolver doesn't take the pub parameter into 
> > account. Would you mind filing a bug report? TIA!
> 
> BTW, are you sure that the exception was thrown by the include 
> transformer and not by a subsequent uuid2url transformation which 
> couldn't resolve an internal link in the included document?
> 
> -- Andreas
> 
> 
> 
> 
> >>
> >> -------- Original-Nachricht --------
> >>> Datum: Fri, 13 Mar 2009 10:07:56 +0100
> >>> Von: "Lars Geldner" <ge...@gmx.net>
> >>> An: user@lenya.apache.org
> >>> Betreff: Re: share sites between publications
> >>
> >>> Hi Andreas,
> >>>
> >>> * I added a new page to my publication called "includetest".
> >>>
> >>> * In the body of that page I added only one div element:
> >>>   <div id="refsea"></div>
> >>>
> >>> * In the XSLT stylesheet
> >>> webapps/lenya/lenya/pubs/mypub/xslt/page2xhtml.xsl I added the 
> >>> following template:
> >>>  <xsl:template match="xhtml:div[@id = 'refsea']">
> >>>     <ci:include
> >>>
> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"/>
> >>>  </xsl:template>
> >>> (In the first step I only want to test including a page of the same
> >>> publication, therefore the parameter "pub" is missing. The referenced 
> >>> document is
> >>> in the same publication.)
> >>>
> >>> * When I open the page "includetest", this page is empty. The HTML 
> >>> source
> >>> code of that page looks like:
> >>> <!-- ... -->
> >>> <div id="main">
> >>>   <div id="body">
> >>>     <include xmlns="http://apache.org/cocoon/include/1.0"
> >>> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"
> >>> />
> >>>   </div>
> >>> </div>
> >>> That means, Lenya has not transformed the include element.
> >>>
> >>> * IMHO I have to add an include transformer to the publication 
> >>> sitemap, is
> >>> it right? But when I add something like that
> >>> <map:pipeline>
> >>>   <map:match pattern="**/includetest.html">
> >>>     <map:transform type="cinclude"/>
> >>>   </map:match>
> >>> </map:pipeline>
> >>> Lenya says "Must set a generator before adding transformer 'cinclude'
> >>> ". I think, I'm on the right way, but can you please provide my a 
> >>> hint of
> >>> how to transform the include element?
> >>>
> >>> Thanks in advance!
> >>>
> >>> Lars
> >>>
> >>>> Datum: Thu, 12 Mar 2009 21:43:49 +0100
> >>>> Von: Andreas Hartmann <an...@apache.org>
> >>>> An: user@lenya.apache.org
> >>>> Betreff: Re: share sites between publications
> >>>> Hi Lars,
> >>>>
> >>>> Lars Geldner schrieb:
> >>>>> Dear lenya users and developers,
> >>>>>
> >>>>> we have two publications. How can we integrate a site of one
> >>>>> publication into another publication?
> >>>> with the term "site", are you referring to a single page (i.e., 
> >>>> Lenya document), or to a subsite (i.e., sub-sitetree)?
> >>>>
> >>>>> For example, we want to have a
> >>>>> link in the site tree of the first publication. When the user clicks
> >>>>> that link, a site of another publication should be opened in that
> >>>>> way, that only the site's content is displayed (within the frame of
> >>>>> this publication) but not the site tree of the second publication.
> >>>> If you want to include a page, you can just call it using the 
> >>>> lenya-document: protocol or using the site: protocol, appending the 
> >>>> format parameter for the format you need:
> >>>>
> >>>> <i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>
> >>>>
> >>>> It is important to include the pub parameter because otherwise the 
> >>>> lenya-document source factory will look for the document only in the 
> >>>> current publication.
> >>>>
> >>>> HTH,
> >>>>
> >>>> -- Andreas
> >>>>
> >>>>
> >>>> -- 
> >>>> Andreas Hartmann, CTO
> >>>> BeCompany GmbH
> >>>> http://www.becompany.ch
> >>>> Tel.: +41 (0) 43 818 57 01
> >>> -- 
> >>> Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem für nur 17,95 
> >>> ¿/mtl. + 1 Monat gratis!*
> >>> http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> >>> For additional commands, e-mail: user-help@lenya.apache.org
> >>
> > 
> > 
> 
> 
> -- 
> Andreas Hartmann, CTO
> BeCompany GmbH
> http://www.becompany.ch
> Tel.: +41 (0) 43 818 57 01
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01

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


Re: share sites between publications

Posted by Andreas Hartmann <an...@apache.org>.
Hi Lars,

Andreas Hartmann schrieb:
> Hi Lars,
> 
> Lars Geldner schrieb:
>> Hi Andreas,
>>
>> * Ok, if I delete the pattern for "includetest.html" and add the 
>> transformer
>> <map:transform type="cinclude"/>
>> to the pattern
>> <map:match pattern="lenyabody-*/*/*/*/**">
>> then it works fine when including pages of the same publication! Thanks!
> 
> alright, you've been quicker than me :)
> 
>> But if I'm changing the referenced UUID to a page of another 
>> publication like that
>> <xsl:template match="xhtml:div[@id = 'refsea']">
>>   <ci:include 
>> src="lenya-document:d9e80e00-7373-11dd-8142-93a30b5c925c,pub=robotronsea?format=xhtml"/> 
>>
>> </xsl:template>
>> Lenya says "LinkException: The target doesn't exist!".
> 
> This is strange. Which version of Lenya are you using? This sounds like 
> a bug, maybe the link resolver doesn't take the pub parameter into 
> account. Would you mind filing a bug report? TIA!

BTW, are you sure that the exception was thrown by the include 
transformer and not by a subsequent uuid2url transformation which 
couldn't resolve an internal link in the included document?

-- Andreas




>>
>> -------- Original-Nachricht --------
>>> Datum: Fri, 13 Mar 2009 10:07:56 +0100
>>> Von: "Lars Geldner" <ge...@gmx.net>
>>> An: user@lenya.apache.org
>>> Betreff: Re: share sites between publications
>>
>>> Hi Andreas,
>>>
>>> * I added a new page to my publication called "includetest".
>>>
>>> * In the body of that page I added only one div element:
>>>   <div id="refsea"></div>
>>>
>>> * In the XSLT stylesheet
>>> webapps/lenya/lenya/pubs/mypub/xslt/page2xhtml.xsl I added the 
>>> following template:
>>>  <xsl:template match="xhtml:div[@id = 'refsea']">
>>>     <ci:include
>>> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"/>
>>>  </xsl:template>
>>> (In the first step I only want to test including a page of the same
>>> publication, therefore the parameter "pub" is missing. The referenced 
>>> document is
>>> in the same publication.)
>>>
>>> * When I open the page "includetest", this page is empty. The HTML 
>>> source
>>> code of that page looks like:
>>> <!-- ... -->
>>> <div id="main">
>>>   <div id="body">
>>>     <include xmlns="http://apache.org/cocoon/include/1.0"
>>> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml" 
>>> />
>>>   </div>
>>> </div>
>>> That means, Lenya has not transformed the include element.
>>>
>>> * IMHO I have to add an include transformer to the publication 
>>> sitemap, is
>>> it right? But when I add something like that
>>> <map:pipeline>
>>>   <map:match pattern="**/includetest.html">
>>>     <map:transform type="cinclude"/>
>>>   </map:match>
>>> </map:pipeline>
>>> Lenya says "Must set a generator before adding transformer 'cinclude'
>>> ". I think, I'm on the right way, but can you please provide my a 
>>> hint of
>>> how to transform the include element?
>>>
>>> Thanks in advance!
>>>
>>> Lars
>>>
>>>> Datum: Thu, 12 Mar 2009 21:43:49 +0100
>>>> Von: Andreas Hartmann <an...@apache.org>
>>>> An: user@lenya.apache.org
>>>> Betreff: Re: share sites between publications
>>>> Hi Lars,
>>>>
>>>> Lars Geldner schrieb:
>>>>> Dear lenya users and developers,
>>>>>
>>>>> we have two publications. How can we integrate a site of one
>>>>> publication into another publication?
>>>> with the term "site", are you referring to a single page (i.e., 
>>>> Lenya document), or to a subsite (i.e., sub-sitetree)?
>>>>
>>>>> For example, we want to have a
>>>>> link in the site tree of the first publication. When the user clicks
>>>>> that link, a site of another publication should be opened in that
>>>>> way, that only the site's content is displayed (within the frame of
>>>>> this publication) but not the site tree of the second publication.
>>>> If you want to include a page, you can just call it using the 
>>>> lenya-document: protocol or using the site: protocol, appending the 
>>>> format parameter for the format you need:
>>>>
>>>> <i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>
>>>>
>>>> It is important to include the pub parameter because otherwise the 
>>>> lenya-document source factory will look for the document only in the 
>>>> current publication.
>>>>
>>>> HTH,
>>>>
>>>> -- Andreas
>>>>
>>>>
>>>> -- 
>>>> Andreas Hartmann, CTO
>>>> BeCompany GmbH
>>>> http://www.becompany.ch
>>>> Tel.: +41 (0) 43 818 57 01
>>> -- 
>>> Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem für nur 17,95 
>>> ¿/mtl. + 1 Monat gratis!*
>>> http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>>> For additional commands, e-mail: user-help@lenya.apache.org
>>
> 
> 


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


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


Re: share sites between publications

Posted by Andreas Hartmann <an...@apache.org>.
Hi Lars,

Lars Geldner schrieb:
> Hi Andreas,
> 
> * Ok, if I delete the pattern for "includetest.html" and add the transformer
> <map:transform type="cinclude"/>
> to the pattern
> <map:match pattern="lenyabody-*/*/*/*/**">
> then it works fine when including pages of the same publication! Thanks!

alright, you've been quicker than me :)

> But if I'm changing the referenced UUID to a page of another publication like that
> <xsl:template match="xhtml:div[@id = 'refsea']">
>   <ci:include src="lenya-document:d9e80e00-7373-11dd-8142-93a30b5c925c,pub=robotronsea?format=xhtml"/>
> </xsl:template>
> Lenya says "LinkException: The target doesn't exist!".

This is strange. Which version of Lenya are you using? This sounds like 
a bug, maybe the link resolver doesn't take the pub parameter into 
account. Would you mind filing a bug report? TIA!

Would it be an option for you to use the debugger to trace the problem?

-- Andreas



> 
> -------- Original-Nachricht --------
>> Datum: Fri, 13 Mar 2009 10:07:56 +0100
>> Von: "Lars Geldner" <ge...@gmx.net>
>> An: user@lenya.apache.org
>> Betreff: Re: share sites between publications
> 
>> Hi Andreas,
>>
>> * I added a new page to my publication called "includetest".
>>
>> * In the body of that page I added only one div element:
>>   <div id="refsea"></div>
>>
>> * In the XSLT stylesheet
>> webapps/lenya/lenya/pubs/mypub/xslt/page2xhtml.xsl I added the following template:
>>  <xsl:template match="xhtml:div[@id = 'refsea']">
>>     <ci:include
>> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"/>
>>  </xsl:template>
>> (In the first step I only want to test including a page of the same
>> publication, therefore the parameter "pub" is missing. The referenced document is
>> in the same publication.)
>>
>> * When I open the page "includetest", this page is empty. The HTML source
>> code of that page looks like:
>> <!-- ... -->
>> <div id="main">
>>   <div id="body">
>>     <include xmlns="http://apache.org/cocoon/include/1.0"
>> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml" />
>>   </div>
>> </div>
>> That means, Lenya has not transformed the include element.
>>
>> * IMHO I have to add an include transformer to the publication sitemap, is
>> it right? But when I add something like that
>> <map:pipeline>
>>   <map:match pattern="**/includetest.html">
>>     <map:transform type="cinclude"/>
>>   </map:match>
>> </map:pipeline>
>> Lenya says "Must set a generator before adding transformer 'cinclude'
>> ". I think, I'm on the right way, but can you please provide my a hint of
>> how to transform the include element?
>>
>> Thanks in advance!
>>
>> Lars
>>
>>> Datum: Thu, 12 Mar 2009 21:43:49 +0100
>>> Von: Andreas Hartmann <an...@apache.org>
>>> An: user@lenya.apache.org
>>> Betreff: Re: share sites between publications
>>> Hi Lars,
>>>
>>> Lars Geldner schrieb:
>>>> Dear lenya users and developers,
>>>>
>>>> we have two publications. How can we integrate a site of one
>>>> publication into another publication?
>>> with the term "site", are you referring to a single page (i.e., Lenya 
>>> document), or to a subsite (i.e., sub-sitetree)?
>>>
>>>> For example, we want to have a
>>>> link in the site tree of the first publication. When the user clicks
>>>> that link, a site of another publication should be opened in that
>>>> way, that only the site's content is displayed (within the frame of
>>>> this publication) but not the site tree of the second publication.
>>> If you want to include a page, you can just call it using the 
>>> lenya-document: protocol or using the site: protocol, appending the 
>>> format parameter for the format you need:
>>>
>>> <i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>
>>>
>>> It is important to include the pub parameter because otherwise the 
>>> lenya-document source factory will look for the document only in the 
>>> current publication.
>>>
>>> HTH,
>>>
>>> -- Andreas
>>>
>>>
>>> -- 
>>> Andreas Hartmann, CTO
>>> BeCompany GmbH
>>> http://www.becompany.ch
>>> Tel.: +41 (0) 43 818 57 01
>> -- 
>> Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem für nur 
>> 17,95 ¿/mtl. + 1 Monat gratis!*
>> http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
> 


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


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


Re: share sites between publications

Posted by Lars Geldner <ge...@gmx.net>.
Hi Andreas,

* Ok, if I delete the pattern for "includetest.html" and add the transformer
<map:transform type="cinclude"/>
to the pattern
<map:match pattern="lenyabody-*/*/*/*/**">
then it works fine when including pages of the same publication! Thanks!

But if I'm changing the referenced UUID to a page of another publication like that
<xsl:template match="xhtml:div[@id = 'refsea']">
  <ci:include src="lenya-document:d9e80e00-7373-11dd-8142-93a30b5c925c,pub=robotronsea?format=xhtml"/>
</xsl:template>
Lenya says "LinkException: The target doesn't exist!".
But this UUID is existing in pub "robotronsea".

What could be the reason?

Best regards,

Lars


-------- Original-Nachricht --------
> Datum: Fri, 13 Mar 2009 10:07:56 +0100
> Von: "Lars Geldner" <ge...@gmx.net>
> An: user@lenya.apache.org
> Betreff: Re: share sites between publications

> 
> Hi Andreas,
> 
> * I added a new page to my publication called "includetest".
> 
> * In the body of that page I added only one div element:
>   <div id="refsea"></div>
> 
> * In the XSLT stylesheet
> webapps/lenya/lenya/pubs/mypub/xslt/page2xhtml.xsl I added the following template:
>  <xsl:template match="xhtml:div[@id = 'refsea']">
>     <ci:include
> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"/>
>  </xsl:template>
> (In the first step I only want to test including a page of the same
> publication, therefore the parameter "pub" is missing. The referenced document is
> in the same publication.)
> 
> * When I open the page "includetest", this page is empty. The HTML source
> code of that page looks like:
> <!-- ... -->
> <div id="main">
>   <div id="body">
>     <include xmlns="http://apache.org/cocoon/include/1.0"
> src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml" />
>   </div>
> </div>
> That means, Lenya has not transformed the include element.
> 
> * IMHO I have to add an include transformer to the publication sitemap, is
> it right? But when I add something like that
> <map:pipeline>
>   <map:match pattern="**/includetest.html">
>     <map:transform type="cinclude"/>
>   </map:match>
> </map:pipeline>
> Lenya says "Must set a generator before adding transformer 'cinclude'
> ". I think, I'm on the right way, but can you please provide my a hint of
> how to transform the include element?
> 
> Thanks in advance!
> 
> Lars
> 
> > Datum: Thu, 12 Mar 2009 21:43:49 +0100
> > Von: Andreas Hartmann <an...@apache.org>
> > An: user@lenya.apache.org
> > Betreff: Re: share sites between publications
> 
> > Hi Lars,
> > 
> > Lars Geldner schrieb:
> > > Dear lenya users and developers,
> > > 
> > > we have two publications. How can we integrate a site of one
> > > publication into another publication?
> > 
> > with the term "site", are you referring to a single page (i.e., Lenya 
> > document), or to a subsite (i.e., sub-sitetree)?
> > 
> > > For example, we want to have a
> > > link in the site tree of the first publication. When the user clicks
> > > that link, a site of another publication should be opened in that
> > > way, that only the site's content is displayed (within the frame of
> > > this publication) but not the site tree of the second publication.
> > 
> > If you want to include a page, you can just call it using the 
> > lenya-document: protocol or using the site: protocol, appending the 
> > format parameter for the format you need:
> > 
> > <i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>
> > 
> > It is important to include the pub parameter because otherwise the 
> > lenya-document source factory will look for the document only in the 
> > current publication.
> > 
> > HTH,
> > 
> > -- Andreas
> > 
> > 
> > -- 
> > Andreas Hartmann, CTO
> > BeCompany GmbH
> > http://www.becompany.ch
> > Tel.: +41 (0) 43 818 57 01
> 
> -- 
> Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem für nur 
> 17,95 ¿/mtl. + 1 Monat gratis!*
> http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01

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


Re: share sites between publications

Posted by Lars Geldner <ge...@gmx.net>.
Hi Andreas,

* I added a new page to my publication called "includetest".

* In the body of that page I added only one div element:
  <div id="refsea"></div>

* In the XSLT stylesheet webapps/lenya/lenya/pubs/mypub/xslt/page2xhtml.xsl I added the following template:
 <xsl:template match="xhtml:div[@id = 'refsea']">
    <ci:include src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml"/>
 </xsl:template>
(In the first step I only want to test including a page of the same publication, therefore the parameter "pub" is missing. The referenced document is in the same publication.)

* When I open the page "includetest", this page is empty. The HTML source code of that page looks like:
<!-- ... -->
<div id="main">
  <div id="body">
    <include xmlns="http://apache.org/cocoon/include/1.0" src="lenya-document:1bce25c0-4381-11dd-9dcc-b5128f75d5b3?format=xhtml" />
  </div>
</div>
That means, Lenya has not transformed the include element.

* IMHO I have to add an include transformer to the publication sitemap, is it right? But when I add something like that
<map:pipeline>
  <map:match pattern="**/includetest.html">
    <map:transform type="cinclude"/>
  </map:match>
</map:pipeline>
Lenya says "Must set a generator before adding transformer 'cinclude'
". I think, I'm on the right way, but can you please provide my a hint of how to transform the include element?

Thanks in advance!

Lars

> Datum: Thu, 12 Mar 2009 21:43:49 +0100
> Von: Andreas Hartmann <an...@apache.org>
> An: user@lenya.apache.org
> Betreff: Re: share sites between publications

> Hi Lars,
> 
> Lars Geldner schrieb:
> > Dear lenya users and developers,
> > 
> > we have two publications. How can we integrate a site of one
> > publication into another publication?
> 
> with the term "site", are you referring to a single page (i.e., Lenya 
> document), or to a subsite (i.e., sub-sitetree)?
> 
> > For example, we want to have a
> > link in the site tree of the first publication. When the user clicks
> > that link, a site of another publication should be opened in that
> > way, that only the site's content is displayed (within the frame of
> > this publication) but not the site tree of the second publication.
> 
> If you want to include a page, you can just call it using the 
> lenya-document: protocol or using the site: protocol, appending the 
> format parameter for the format you need:
> 
> <i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>
> 
> It is important to include the pub parameter because otherwise the 
> lenya-document source factory will look for the document only in the 
> current publication.
> 
> HTH,
> 
> -- Andreas
> 
> 
> -- 
> Andreas Hartmann, CTO
> BeCompany GmbH
> http://www.becompany.ch
> Tel.: +41 (0) 43 818 57 01

-- 
Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem für nur 
17,95 ¿/mtl. + 1 Monat gratis!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a

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


Re: share sites between publications

Posted by Andreas Hartmann <an...@apache.org>.
Hi Lars,

Lars Geldner schrieb:
> Dear lenya users and developers,
> 
> we have two publications. How can we integrate a site of one
> publication into another publication?

with the term "site", are you referring to a single page (i.e., Lenya 
document), or to a subsite (i.e., sub-sitetree)?

> For example, we want to have a
> link in the site tree of the first publication. When the user clicks
> that link, a site of another publication should be opened in that
> way, that only the site's content is displayed (within the frame of
> this publication) but not the site tree of the second publication.

If you want to include a page, you can just call it using the 
lenya-document: protocol or using the site: protocol, appending the 
format parameter for the format you need:

<i:include src="lenya-document:{uuid},pub=…?format=xhtml"/>

It is important to include the pub parameter because otherwise the 
lenya-document source factory will look for the document only in the 
current publication.

HTH,

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


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