You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Bart van Dijk <Ba...@Unilever.com> on 2005/04/18 17:51:28 UTC

Multiple file publishing

Hi,

I'm trying to publish my pages in three different ways, based on three
different style sheets. Think of having one XML file published into three
HTML files with a different layout for each of them. There might be more
than just one way to do this, but I'm not sure what to do.

Should I add two more pipelines, or add a few tasks? If someone knows how to
configure this, I'd be very happy!

Bart

Re: Multiple file publishing

Posted by so...@gmail.com.
Everybody wrote:
>Solprovider, why do you prefer your first solution over the second?

Ignoring the "caching of doctypes" issue, the two solutions are
functionally identical.  They each add a select around a function
call.  Both require the same amount of processing.  The second has a
few more lines of code, because the format suggests each parameter to
the function call be placed on a separate line, and the transform
function has more parameters than the generateConfig function; most
other programming languages would do it with one line of code..

The goal is to rewrite the line:
<map:transform src="xslt/page2xhtml-{4}.xsl">
so {4} is configurable.  
- The second version does it by copying the line and hardcoding a value.
- The first version accepts {4} is already configurable, and adds the
test where it is decided.

* Version 1 *
doctype =getDoctype() ;
transform(doctype);

function getDoctype{
if(style=="1"){
return "zzz";
}else{
return this.doctype;
}

* Version 2 *
doctype =getDoctype() ;
if(style=="1"){
transform("zzz");
}else{
transform(doctype);
}
function getDoctype{
return this.doctype;
}

The first decides doctype where doctype is decided.
The second overrides doctype where doctype is used.

MAINTENANCE CONSIDERATION: If doctype was used anywhere else, and you
want it to change for everything, it would be much cleaner to set it
in getDoctype() rather than every place it is used.

PERFORMANCE CONSIDERATION: Since doctype is only used once, it is
possible to optimize version 2 by moving the "doctype =getDoctype()"
inside the if.  For this code, that requires changing other functions
to stop passing it as a parameter.  That means changing even more code
(chancing more bugs) and changing the API (breaking other calls to the
function).

There is a function for getDoctype().  The goal is to change the
doctype.  That is the logical place to do it  -- unless doctype needs
to be set according to the usual rules, and only the display is
overridden.  Then the second version is the only one that meets the
goals.

Which version to use depends on what doctype should be in other
functions.  Since no other functions are called, it does not matter. 
Since the first version has a bug avoided in the second version, use
the second.

solprovider

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


Re: Multiple file publishing

Posted by so...@gmail.com.
On 4/26/05, Michael Wechner <mi...@wyona.com> wrote:
> you can disable the [live cache] within the sitemap default/publication-sitemap.xmap:
> <map:when test="{global:cache-dir}/{../1}.html.DISABLED">
> Michi

1. I commented the three lines for my pub.  I dislike "if(false)"
statements because the processor must perform the test.  Every
nanosecond counts.

2. I want the performance improvement from caching, but the caching is
not security concious.  Every page in my pub changes when a visitor is
logged in.  I can cache non-logged-in requests by adding 3 pipelines
to do:
if(not authenticated) checkCache

Creating pages for each type of user may require a custom Action. 
Making it generic would take some time.  Best would be an XMAP
variable for Groups or Roles.  Then decide the cache based on a some
property containing which Groups|Roles are relevant.  Then need to
store each version of the document in separate caches based on which
Groups|Roles are active for this visitor.  The only unique-per-visitor
page is their personal information; that is handled by the Session
usecase, and there is no caching.

If performance becomes an issue, I am planning to pass control to a
JavaScript function which returns which cache to use (and the original
request), then pass that around the pipelines.  We need 4 caches:
anonymous, visitor, employee, and admin.   That should be much easier
than writing a generic solution.  A generic solution could have many
caches if every combination of Groups is assigned its own directory
(although some may never be used.  In my example, all admins are
employees, so an admin-only directory would never be created.)

solprovider

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


Re: Multiple file publishing

Posted by Michael Wechner <mi...@wyona.com>.
Bart van Dijk wrote:

>Clearing the cache did the job! So it's indeed another chache issue. Now
>let's see if there's a way to turn this cache off...
>  
>

you can disable it within the sitemap default/publication-sitemap.xmap:

<map:when test="{global:cache-dir}/{../1}.html.DISABLED">

HTH

Michi

-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


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


RE: Multiple file publishing

Posted by Bart van Dijk <Ba...@Unilever.com>.
Clearing the cache did the job! So it's indeed another chache issue. Now
let's see if there's a way to turn this cache off...

bart


-----Original Message-----
From: solprovider@gmail.com [mailto:solprovider@gmail.com]
Sent: Monday, April 25, 2005 20:18
To: Bart-van.Dijk@Unilever.com; Lenya Users List
Subject: Re: Multiple file publishing


On 4/25/05, Bart van Dijk <Ba...@unilever.com> wrote:
> I've tried to change only the parameter-doctype.xmap but it then performs
> just like your system (it doesn't do anything). When I change the
> publication-sitemap.xmap, I can use the different style sheets without
> problems.

I had hoped the doctype caching was a bug with only my system.  Too bad.

Remove the code from parameter-doctype.xmap.  If we cannot change the
doctype dynamically, that code can only hurt, because sometimes Lenya
could fixate on the wrong doctype.

> Another thing is how to change files in the Live map. The use of different
> style sheets in the Authoring area works fine, but how do I get published
> files changed? Once the files are published in the Live map, adding
> ?style=zzz at the end of the url logically won't work anymore.

Huh?  authoring and live use almost the same pipelines.  The authoring
GUI is added by:
<map:match pattern="authoring/**.html">
   <map:transform
src="cocoon://lenya-page/{page-envelope:publication-id}/{../../1}.xml?doctyp
e={page-envelope:document-type}"/>

That means for the change to be visible in authoring, it must be
visible for live, because live is generated first, and then the
authoring GUI is added.

Do you have separate installations for authoring and live?  Why else
are the two paths different?

It could be ANOTHER caching issue.  Try deleting
"{pub}\work\cache\live" between requests.

solprovider


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


Re: Multiple file publishing

Posted by so...@gmail.com.
On 4/25/05, Bart van Dijk <Ba...@unilever.com> wrote:
> I've tried to change only the parameter-doctype.xmap but it then performs
> just like your system (it doesn't do anything). When I change the
> publication-sitemap.xmap, I can use the different style sheets without
> problems.

I had hoped the doctype caching was a bug with only my system.  Too bad.

Remove the code from parameter-doctype.xmap.  If we cannot change the
doctype dynamically, that code can only hurt, because sometimes Lenya
could fixate on the wrong doctype.

> Another thing is how to change files in the Live map. The use of different
> style sheets in the Authoring area works fine, but how do I get published
> files changed? Once the files are published in the Live map, adding
> ?style=zzz at the end of the url logically won't work anymore.

Huh?  authoring and live use almost the same pipelines.  The authoring
GUI is added by:
<map:match pattern="authoring/**.html">
   <map:transform
src="cocoon://lenya-page/{page-envelope:publication-id}/{../../1}.xml?doctype={page-envelope:document-type}"/>

That means for the change to be visible in authoring, it must be
visible for live, because live is generated first, and then the
authoring GUI is added.

Do you have separate installations for authoring and live?  Why else
are the two paths different?

It could be ANOTHER caching issue.  Try deleting
"{pub}\work\cache\live" between requests.

solprovider

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


RE: Multiple file publishing

Posted by Bart van Dijk <Ba...@Unilever.com>.
I've tried to change only the parameter-doctype.xmap but it then performs
just like your system (it doesn't do anything). When I change the
publication-sitemap.xmap, I can use the different style sheets without
problems.

Another thing is how to change files in the Live map. The use of different
style sheets in the Authoring area works fine, but how do I get published
files changed? Once the files are published in the Live map, adding
?style=zzz at the end of the url logically won't work anymore.

Bart


-----Original Message-----
From: solprovider@gmail.com [mailto:solprovider@gmail.com]
Sent: Friday, April 22, 2005 17:53
To: Lenya Users List; Bart-van.Dijk@Unilever.com
Subject: Re: Multiple file publishing


On 4/22/05, Bart van Dijk <Ba...@unilever.com> wrote:
> By the way, solproviders solution works for authoring but Lenya wouldn't
let
> me publish the different styles to the "Live" section. Maybe that's the
> problem when using the second option?

As I just posted, if doctype is used in more than the one place,
setting it in the getDoctype() function easily changes it everywhere.
It sounds like the authoring code uses doctype.  Unfortunately, you
may have the caching bug.

Did you try the first version?  Did it perform like my system?

You can change parameter-doctype.xmap without undoing the change to
publication-sitemap.xmap.  But if you have the same bug, it will not
be visible just by hitting the page.  (In other words, your situation
will not have improved.)  The easiest test is to remove (or comment
out) the changes from publication-sitemap.xmap so you can see the
results of only changing parameter-doctype.xmap.

solprovider


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


Re: Multiple file publishing

Posted by so...@gmail.com.
On 4/22/05, Bart van Dijk <Ba...@unilever.com> wrote:
> By the way, solproviders solution works for authoring but Lenya wouldn't let
> me publish the different styles to the "Live" section. Maybe that's the
> problem when using the second option?

As I just posted, if doctype is used in more than the one place,
setting it in the getDoctype() function easily changes it everywhere. 
It sounds like the authoring code uses doctype.  Unfortunately, you
may have the caching bug.

Did you try the first version?  Did it perform like my system?

You can change parameter-doctype.xmap without undoing the change to
publication-sitemap.xmap.  But if you have the same bug, it will not
be visible just by hitting the page.  (In other words, your situation
will not have improved.)  The easiest test is to remove (or comment
out) the changes from publication-sitemap.xmap so you can see the
results of only changing parameter-doctype.xmap.

solprovider

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


RE: Multiple file publishing

Posted by Bart van Dijk <Ba...@Unilever.com>.
Yes, I use a specific authoring style indeed.

By the way, solproviders solution works for authoring but Lenya wouldn't let
me publish the different styles to the "Live" section. Maybe that's the
problem when using the second option?


-----Original Message-----
From: Leecarroll150@aol.com [mailto:Leecarroll150@aol.com]
Sent: Friday, April 22, 2005 10:29
To: Lenya Users List; Bart-van.Dijk@Unilever.com
Subject: Re: Multiple file publishing


> That would have been a good option if I'd only wanted to change the
> layout.
> However, I want to have a different HTML structures (as well as different
> CSS's). By the way, the user is supposed to edit as much information in
> the
> XML file and when the file is processed, information should be filtered
> depending on the used XSLT.

Solprovider's second solution seems to be the way to go then. (He uses an
otherwise so the editor in the authoring view will get that style.) Perhaps
you could provide a specific authoring style, one which shows all of the
content without filtering ?

As an aside: Solprovider, why do you prefer your first solution over the
second?

Lee C


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


Re: Multiple file publishing

Posted by Lee Carroll <le...@aol.com>.
> That would have been a good option if I'd only wanted to change the 
> layout.
> However, I want to have a different HTML structures (as well as different
> CSS's). By the way, the user is supposed to edit as much information in 
> the
> XML file and when the file is processed, information should be filtered
> depending on the used XSLT.

Solprovider's second solution seems to be the way to go then. (He uses an 
otherwise so the editor in the authoring view will get that style.) Perhaps 
you could provide a specific authoring style, one which shows all of the 
content without filtering ?

As an aside: Solprovider, why do you prefer your first solution over the 
second?

Lee C


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


RE: Multiple file publishing

Posted by Bart van Dijk <Ba...@Unilever.com>.
That would have been a good option if I'd only wanted to change the layout.
However, I want to have a different HTML structures (as well as different
CSS's). By the way, the user is supposed to edit as much information in the
XML file and when the file is processed, information should be filtered
depending on the used XSLT.

bart

-----Original Message-----
From: user-return-6348-Bart-van.Dijk=unilever.com@lenya.apache.org
[mailto:user-return-6348-Bart-van.Dijk=unilever.com@lenya.apache.org]On
Behalf Of Lee Carroll
Sent: Friday, April 22, 2005 9:44
To: Lenya Users List; Bart-van.Dijk@Unilever.com
Subject: Re: Multiple file publishing


>I have one "content" file. The XML file, that is. Depending on the XSLT
> style sheet this one document should be processed into three different
> HTML
> files. Therefore, there should be three XSLT files (page2xhtml-style1,
> page2xhtml-style2, page2xhtml-style3 and probably the same for
> style12xhmtl
> etc.).

You might get away with having a single xslt, depending upon the nature of
your style options.

Pass a style parameter on the query string of the url request. In the site
map pass this into page2xhtml
and select the appropriate css for your style.

If it turns out that you need a different html structure (as opposed to
style) then you will need to change the publication sitemap to select the
"page2myStyleAxhtml" on the basis of style param on the query string (I'm
sure there will be other ways of passing this info as well)

The only difficulty is what style do you edit in ? A default style or do you
let the editor choose ?

Lee C




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


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


Re: Multiple file publishing

Posted by Lee Carroll <le...@aol.com>.
>I have one "content" file. The XML file, that is. Depending on the XSLT
> style sheet this one document should be processed into three different 
> HTML
> files. Therefore, there should be three XSLT files (page2xhtml-style1,
> page2xhtml-style2, page2xhtml-style3 and probably the same for 
> style12xhmtl
> etc.).

You might get away with having a single xslt, depending upon the nature of 
your style options.

Pass a style parameter on the query string of the url request. In the site 
map pass this into page2xhtml
and select the appropriate css for your style.

If it turns out that you need a different html structure (as opposed to 
style) then you will need to change the publication sitemap to select the 
"page2myStyleAxhtml" on the basis of style param on the query string (I'm 
sure there will be other ways of passing this info as well)

The only difficulty is what style do you edit in ? A default style or do you 
let the editor choose ?

Lee C




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


RE: Multiple file publishing

Posted by Bart van Dijk <Ba...@Unilever.com>.
I have one "content" file. The XML file, that is. Depending on the XSLT
style sheet this one document should be processed into three different HTML
files. Therefore, there should be three XSLT files (page2xhtml-style1,
page2xhtml-style2, page2xhtml-style3 and probably the same for style12xhmtl
etc.).

Do you mean to have one XSLT stylesheet that includes and refers to another
stylesheet that is stored in the same folder as the published XML file?

Bart



-----Original Message-----
From: user-return-6345-Bart-van.Dijk=unilever.com@lenya.apache.org
[mailto:user-return-6345-Bart-van.Dijk=unilever.com@lenya.apache.org]On
Behalf Of Gregor J. Rothfuss
Sent: Friday, April 22, 2005 4:26
To: Lenya Users List
Subject: Re: Multiple file publishing


Bart van Dijk wrote:
> Hi,
>
> I'm trying to publish my pages in three different ways, based on three
> different style sheets. Think of having one XML file published into three
> HTML files with a different layout for each of them. There might be more
> than just one way to do this, but I'm not sure what to do.

when you say publish in three different ways, can you elaborate a bit?
three different locations? static publishing? etc.

depending on what you want to do, you may want to xinclude your content
in various places, and use the doctype of the page where you include to
attach your stylesheet.

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


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


Re: Multiple file publishing

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Bart van Dijk wrote:
> Hi,
> 
> I'm trying to publish my pages in three different ways, based on three
> different style sheets. Think of having one XML file published into three
> HTML files with a different layout for each of them. There might be more
> than just one way to do this, but I'm not sure what to do.

when you say publish in three different ways, can you elaborate a bit? 
three different locations? static publishing? etc.

depending on what you want to do, you may want to xinclude your content 
in various places, and use the doctype of the page where you include to 
attach your stylesheet.

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


RE: Multiple file publishing

Posted by Bart van Dijk <Ba...@Unilever.com>.
Thanks a lot! I used the second solution and it works perfectly and it's a
lot easier than I thought. But why do you think the first solution is better
than the second? I mean, I see the difference but the first one does the job
and I couldn't think of a situation causing trouble.

Bart

-----Original Message-----
From: user-return-6346-Bart-van.Dijk=unilever.com@lenya.apache.org
[mailto:user-return-6346-Bart-van.Dijk=unilever.com@lenya.apache.org]On
Behalf Of solprovider@gmail.com
Sent: Friday, April 22, 2005 6:38
To: Lenya Users List; Bart-van.Dijk@Unilever.com
Subject: Re: Multiple file publishing


On 4/18/05, Bart van Dijk <Ba...@unilever.com> wrote:
> I'm trying to publish my pages in three different ways, based on three
> different style sheets. Think of having one XML file published into three
> HTML files with a different layout for each of them. There might be more
> than just one way to do this, but I'm not sure what to do.
> Should I add two more pipelines, or add a few tasks? If someone knows how
to
> configure this, I'd be very happy!
> Bart

(Read the whole post before trying anything.  The first solution is
the better design, but Lenya did not like it on my system.)

FILE: parameter-doctype.xmap
Change the <map:match pattern="*/**.html"> section to:

<map:match pattern="*/**.html">
   <map:select type="parameter">
      <map:parameter name="parameter-selector-test"
value="{request-param:style}"/>
<!--
   <map:select type="request-parameter">
      <map:parameter name="parameter-name" value="style"/>
-->
      <map:when test="1">
            <map:generate type="serverpages"
src="../../config/parameters/default.xsp">
               <map:parameter name="value" value="zzz"/>
            </map:generate>
      </map:when>
      <map:otherwise>
         <map:act type="sourcetype"
src="content/{1}/{page-envelope:document-path}">
            <map:generate type="serverpages"
src="../../config/parameters/default.xsp">
               <map:parameter name="value" value="{sourcetype}"/>
            </map:generate>
         </map:act>
      </map:otherwise>
   </map:select>
    <map:serialize type="xml"/>
</map:match>

Add your extra XML as filename:
{pub}/xslt/page2xhtml-zzz.xsl

Add ?style=1 to the URL
http://127.0.0.1:8888/default/live/news.html?style=1

You can add more map:when sections with different parameter-names and
values.

That SHOULD work.  My system cached the doctype, so changing the style
parameter did not change the resulting webpage until I restarted
Lenya.  If I added ?style=1 the first time, it always returned the zzz
stylesheet.  If style was anything else or missing the first time, it
always returned the standard stylesheet.

I tried setting all the pipelines to non-caching.
I tried two selectors (one of them is commented out in the code above).

If you are only using this for testing, you can hit different pages
with different style=x.

???: Anybody know how to turn off caching of doctypes?


*** If you need this for production, and have the same bug, make the
change in "publication-sitemap.xmap":
      <map:match pattern="lenyabody-*/*/*/*/**">
...
        <map:transform src="xslt/page2xhtml-homepage.xsl">
          <map:parameter name="root"
value="{page-envelope:context-prefix}/{2}/{3}"/>
          <map:parameter name="url" value="{5}"/>
          <map:parameter name="document-id"
value="{page-envelope:document-id}"/>
          <map:parameter name="document-type"
value="{page-envelope:document-type}"/>
          <map:parameter name="language"
value="{page-envelope:document-language}"/>
        </map:transform>
Change the transform to:

   <map:select type="parameter">
      <map:parameter name="parameter-selector-test"
value="{request-param:style}"/>
      <map:when test="1">
        <map:transform src="xslt/page2xhtml-xxx.xsl">
          <map:parameter name="root"
value="{page-envelope:context-prefix}/{2}/{3}"/>
          <map:parameter name="url" value="{5}"/>
          <map:parameter name="document-id"
value="{page-envelope:document-id}"/>
          <map:parameter name="document-type"
value="{page-envelope:document-type}"/>
          <map:parameter name="language"
value="{page-envelope:document-language}"/>
        </map:transform>
      </map:when>
      <map:otherwise>
        <map:transform src="xslt/page2xhtml-{4}.xsl">
          <map:parameter name="root"
value="{page-envelope:context-prefix}/{2}/{3}"/>
          <map:parameter name="url" value="{5}"/>
          <map:parameter name="document-id"
value="{page-envelope:document-id}"/>
          <map:parameter name="document-type"
value="{page-envelope:document-type}"/>
          <map:parameter name="language"
value="{page-envelope:document-language}"/>
        </map:transform>
      </map:otherwise>
   </map:select>

That worked perfectly on my system.

solprovider

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


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


Re: Multiple file publishing

Posted by so...@gmail.com.
On 4/18/05, Bart van Dijk <Ba...@unilever.com> wrote:
> I'm trying to publish my pages in three different ways, based on three
> different style sheets. Think of having one XML file published into three
> HTML files with a different layout for each of them. There might be more
> than just one way to do this, but I'm not sure what to do. 
> Should I add two more pipelines, or add a few tasks? If someone knows how to
> configure this, I'd be very happy! 
> Bart 

(Read the whole post before trying anything.  The first solution is
the better design, but Lenya did not like it on my system.)

FILE: parameter-doctype.xmap
Change the <map:match pattern="*/**.html"> section to:

<map:match pattern="*/**.html">
   <map:select type="parameter">
      <map:parameter name="parameter-selector-test"
value="{request-param:style}"/>
<!--
   <map:select type="request-parameter">
      <map:parameter name="parameter-name" value="style"/>
-->
      <map:when test="1">
            <map:generate type="serverpages"
src="../../config/parameters/default.xsp">
               <map:parameter name="value" value="zzz"/>
            </map:generate>
      </map:when>
      <map:otherwise>
         <map:act type="sourcetype"
src="content/{1}/{page-envelope:document-path}">
            <map:generate type="serverpages"
src="../../config/parameters/default.xsp">
               <map:parameter name="value" value="{sourcetype}"/>
            </map:generate>
         </map:act>
      </map:otherwise>
   </map:select>
    <map:serialize type="xml"/>
</map:match>

Add your extra XML as filename:
{pub}/xslt/page2xhtml-zzz.xsl

Add ?style=1 to the URL
http://127.0.0.1:8888/default/live/news.html?style=1

You can add more map:when sections with different parameter-names and values.

That SHOULD work.  My system cached the doctype, so changing the style
parameter did not change the resulting webpage until I restarted
Lenya.  If I added ?style=1 the first time, it always returned the zzz
stylesheet.  If style was anything else or missing the first time, it
always returned the standard stylesheet.

I tried setting all the pipelines to non-caching.
I tried two selectors (one of them is commented out in the code above).

If you are only using this for testing, you can hit different pages
with different style=x.

???: Anybody know how to turn off caching of doctypes?


*** If you need this for production, and have the same bug, make the
change in "publication-sitemap.xmap":
      <map:match pattern="lenyabody-*/*/*/*/**">
...
        <map:transform src="xslt/page2xhtml-homepage.xsl">
          <map:parameter name="root"
value="{page-envelope:context-prefix}/{2}/{3}"/>
          <map:parameter name="url" value="{5}"/>
          <map:parameter name="document-id"
value="{page-envelope:document-id}"/>
          <map:parameter name="document-type"
value="{page-envelope:document-type}"/>
          <map:parameter name="language"
value="{page-envelope:document-language}"/>
        </map:transform>
Change the transform to:

   <map:select type="parameter">
      <map:parameter name="parameter-selector-test"
value="{request-param:style}"/>
      <map:when test="1">
        <map:transform src="xslt/page2xhtml-xxx.xsl">
          <map:parameter name="root"
value="{page-envelope:context-prefix}/{2}/{3}"/>
          <map:parameter name="url" value="{5}"/>
          <map:parameter name="document-id"
value="{page-envelope:document-id}"/>
          <map:parameter name="document-type"
value="{page-envelope:document-type}"/>
          <map:parameter name="language"
value="{page-envelope:document-language}"/>
        </map:transform>
      </map:when>
      <map:otherwise>
        <map:transform src="xslt/page2xhtml-{4}.xsl">
          <map:parameter name="root"
value="{page-envelope:context-prefix}/{2}/{3}"/>
          <map:parameter name="url" value="{5}"/>
          <map:parameter name="document-id"
value="{page-envelope:document-id}"/>
          <map:parameter name="document-type"
value="{page-envelope:document-type}"/>
          <map:parameter name="language"
value="{page-envelope:document-language}"/>
        </map:transform>
      </map:otherwise>
   </map:select>

That worked perfectly on my system.
 
solprovider

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