You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Kirk Storer <ba...@yahoo.com> on 2004/08/04 19:28:39 UTC

Custom Live XSLT

I read the ModifyingHTMLStructureHowto, but it didn't
really answer the question I had.

I want to use an xslt file I created to display the
live version of the site. What sitemap entry do I need
to make, and in what sitemap file?

Here is what I have tried, but it didn't work.
In the file:
lenya/pubs/default/publication-sitemap.xmap
I added:

      <map:match pattern="**/live/*.html">
           <map:aggregate element="page">
                <map:part
src="content/live/{1}/index_en.xml"/>
                <map:part src="sqlmenu.xml"/>
           </map:aggregate>
           <map:transform type="sql">
                <map:parameter name="use-connection"
value="news"/>
                <map:parameter name="show-nr-of-rows"
value="true"/> 
                <map:parameter name="clob-encoding"
value="UTF-8"/> 
           </map:transform> 
           <map:transform src="seas.xsl"/>
           <map:serialize type="xhtml"/>
      </map:match>


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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


Re: Custom Live XSLT

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Tue, 10 Aug 2004, Kirk Storer wrote:

> Maybe I did something wrong, but when I tried it this
> is what happened.
> http://localhost/computing/index.html
> was changed to:
> http://localhost/lenya/computing/live/index.html
>

What is your publication.xconf looks like?

> I need the url to remain exactly as entered, not even
> lenya added.
>
This will be difficult if you need a session/cookie e.g. if you have to
login somewhere in your publication (at least if you use tomcat). I am not
sure about jetty.
However, if you find a solution for this problem it would be very nice
if you could post is here.

Jann

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


Re: Custom Live XSLT

Posted by Kirk Storer <ba...@yahoo.com>.
Maybe I did something wrong, but when I tried it this
is what happened.
http://localhost/computing/index.html
was changed to:
http://localhost/lenya/computing/live/index.html

I need the url to remain exactly as entered, not even
lenya added.

Kirk


--- Jann Forrer <ja...@id.unizh.ch> wrote:

> On Tue, 10 Aug 2004, Kirk Storer wrote:
> 
> > I tried the mod proxy howto, but it didn't do what
> i
> > needed. I need a solution where the url in the
> browser
> > doesn't change.
> >
> 
> What do you mean by change?  The only change which
> should happen is the
> addition of lenya e.g. 
> http://localhost/computing/index.html would become
> http.//localhost/lenya/computing/index.html. But
> this is due to a
> cookie/tomcat problem.
> 
> Jann
> 
> > Kirk
> >
> >
> > --- Andreas Hartmann <an...@apache.org> wrote:
> >
> > > Kirk Storer wrote:
> > >
> > > > Thanks a lot, that information pointed me down
> the
> > > > right path and I now have it working.
> > > >
> > > > One more question though. The live site's url
> now
> > > > looks like this:
> > > >
> http://localhost/lenya/computing/live/index.html
> > > >
> > > > What is the best way to make the url like
> this:
> > > > http://localhost/computing/index.html
> > > >
> > > > I am using mod_jk2, and would like a solution
> that
> > > > makes the addition of new publications as easy
> to
> > > > configure as possible.
> > >
> > >
> http://wiki.apache.org/cocoon-lenya/HowToModProxy
> > >
> > > -- Andreas
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > lenya-user-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail:
> > > lenya-user-help@cocoon.apache.org
> > >
> > >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail is new and improved - Check it out!
> > http://promotions.yahoo.com/new_mail
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> lenya-user-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> lenya-user-help@cocoon.apache.org
> >
> >
> 
>
---------------------------------------------------------------
> Jann Forrer
> Informatikdienste
> Universit�t Z�rich
> Winterthurerstr. 190
> CH-8057 Zuerich
> 
> oooO   mail:  jann.forrer@id.unizh.ch
> (  )   phone: +41 1 63 56772
>  \ (   fax:   +41 1 63 54505
>   \_)  http://www.id.unizh.ch
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> lenya-user-help@cocoon.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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


Re: Custom Live XSLT

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Tue, 10 Aug 2004, Kirk Storer wrote:

> I tried the mod proxy howto, but it didn't do what i
> needed. I need a solution where the url in the browser
> doesn't change.
>

What do you mean by change?  The only change which should happen is the
addition of lenya e.g.  http://localhost/computing/index.html would become
http.//localhost/lenya/computing/index.html. But this is due to a
cookie/tomcat problem.

Jann

> Kirk
>
>
> --- Andreas Hartmann <an...@apache.org> wrote:
>
> > Kirk Storer wrote:
> >
> > > Thanks a lot, that information pointed me down the
> > > right path and I now have it working.
> > >
> > > One more question though. The live site's url now
> > > looks like this:
> > > http://localhost/lenya/computing/live/index.html
> > >
> > > What is the best way to make the url like this:
> > > http://localhost/computing/index.html
> > >
> > > I am using mod_jk2, and would like a solution that
> > > makes the addition of new publications as easy to
> > > configure as possible.
> >
> > http://wiki.apache.org/cocoon-lenya/HowToModProxy
> >
> > -- Andreas
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > lenya-user-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> > lenya-user-help@cocoon.apache.org
> >
> >
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>
>

---------------------------------------------------------------
Jann Forrer
Informatikdienste
Universität Zürich
Winterthurerstr. 190
CH-8057 Zuerich

oooO   mail:  jann.forrer@id.unizh.ch
(  )   phone: +41 1 63 56772
 \ (   fax:   +41 1 63 54505
  \_)  http://www.id.unizh.ch

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


Re: Custom Live XSLT

Posted by Kirk Storer <ba...@yahoo.com>.
I tried the mod proxy howto, but it didn't do what i
needed. I need a solution where the url in the browser
doesn't change. 

Kirk 


--- Andreas Hartmann <an...@apache.org> wrote:

> Kirk Storer wrote:
> 
> > Thanks a lot, that information pointed me down the
> > right path and I now have it working. 
> > 
> > One more question though. The live site's url now
> > looks like this:
> > http://localhost/lenya/computing/live/index.html
> > 
> > What is the best way to make the url like this:
> > http://localhost/computing/index.html
> > 
> > I am using mod_jk2, and would like a solution that
> > makes the addition of new publications as easy to
> > configure as possible.
> 
> http://wiki.apache.org/cocoon-lenya/HowToModProxy
> 
> -- Andreas
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> lenya-user-help@cocoon.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

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


Re: Custom Live XSLT

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

> Thanks a lot, that information pointed me down the
> right path and I now have it working. 
> 
> One more question though. The live site's url now
> looks like this:
> http://localhost/lenya/computing/live/index.html
> 
> What is the best way to make the url like this:
> http://localhost/computing/index.html
> 
> I am using mod_jk2, and would like a solution that
> makes the addition of new publications as easy to
> configure as possible.

http://wiki.apache.org/cocoon-lenya/HowToModProxy

-- Andreas


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


Re: Custom Live XSLT

Posted by Kirk Storer <ba...@yahoo.com>.
Thanks a lot, that information pointed me down the
right path and I now have it working. 

One more question though. The live site's url now
looks like this:
http://localhost/lenya/computing/live/index.html

What is the best way to make the url like this:
http://localhost/computing/index.html

I am using mod_jk2, and would like a solution that
makes the addition of new publications as easy to
configure as possible.

Thanks,
Kirk


--- Andreas Hartmann <an...@apache.org> wrote:

> Kirk Storer wrote:
> 
> > I read the ModifyingHTMLStructureHowto, but it
> didn't
> > really answer the question I had.
> > 
> > I want to use an xslt file I created to display
> the
> > live version of the site. What sitemap entry do I
> need
> > to make, and in what sitemap file?
> 
> Do you want to use a custom XSLT
> 
> 1) for the document or
> 2) for the aggregated page?
> 
> If (1), you should customize doctypes.xmap, e.g.
> using
> the stylesheets
> 
>     xhtml2xhtml-authoring
>     xhtml2xhtml-live
> 
>        <!-- parametrized doctype matcher -->
>        <!--
>
pattern="{rendertype}/{area}/{doctype}/{document-path}"
> -->
>        <map:match pattern="*/*/*/**.xml">
>          <map:generate src="content/{2}/{4}.xml"/>
> 
>          <map:transform
> src="xslt/{3}2xhtml-{2}.xsl">
>                                              ^
> 
>            <map:parameter name="rendertype"
> value="{1}"/>
>            <map:parameter name="nodeid"
>              
> value="{page-envelope:document-node-id}"/>
>          </map:transform>
>          <map:serialize type="xml"/>
>        </map:match>
> 
> 
> If (2), you can do the same in
> publication-sitemap.xmap for
> the stylesheet page2xhtml.xsl.
> 
> 
> HTH,
> Andreas
> 
> 
> > Here is what I have tried, but it didn't work.
> > In the file:
> > lenya/pubs/default/publication-sitemap.xmap
> > I added:
> > 
> >       <map:match pattern="**/live/*.html">
> >            <map:aggregate element="page">
> >                 <map:part
> > src="content/live/{1}/index_en.xml"/>
> >                 <map:part src="sqlmenu.xml"/>
> >            </map:aggregate>
> >            <map:transform type="sql">
> >                 <map:parameter
> name="use-connection"
> > value="news"/>
> >                 <map:parameter
> name="show-nr-of-rows"
> > value="true"/> 
> >                 <map:parameter
> name="clob-encoding"
> > value="UTF-8"/> 
> >            </map:transform> 
> >            <map:transform src="seas.xsl"/>
> >            <map:serialize type="xhtml"/>
> >       </map:match>
> > 
> > 
> > 		
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail - 50x more storage than other
> providers!
> > http://promotions.yahoo.com/new_mail
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> lenya-user-help@cocoon.apache.org
> 
> 



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

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


Re: Custom Live XSLT

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

> I read the ModifyingHTMLStructureHowto, but it didn't
> really answer the question I had.
> 
> I want to use an xslt file I created to display the
> live version of the site. What sitemap entry do I need
> to make, and in what sitemap file?

Do you want to use a custom XSLT

1) for the document or
2) for the aggregated page?

If (1), you should customize doctypes.xmap, e.g. using
the stylesheets

    xhtml2xhtml-authoring
    xhtml2xhtml-live

       <!-- parametrized doctype matcher -->
       <!-- pattern="{rendertype}/{area}/{doctype}/{document-path}" -->
       <map:match pattern="*/*/*/**.xml">
         <map:generate src="content/{2}/{4}.xml"/>

         <map:transform src="xslt/{3}2xhtml-{2}.xsl">
                                             ^

           <map:parameter name="rendertype" value="{1}"/>
           <map:parameter name="nodeid"
              value="{page-envelope:document-node-id}"/>
         </map:transform>
         <map:serialize type="xml"/>
       </map:match>


If (2), you can do the same in publication-sitemap.xmap for
the stylesheet page2xhtml.xsl.


HTH,
Andreas


> Here is what I have tried, but it didn't work.
> In the file:
> lenya/pubs/default/publication-sitemap.xmap
> I added:
> 
>       <map:match pattern="**/live/*.html">
>            <map:aggregate element="page">
>                 <map:part
> src="content/live/{1}/index_en.xml"/>
>                 <map:part src="sqlmenu.xml"/>
>            </map:aggregate>
>            <map:transform type="sql">
>                 <map:parameter name="use-connection"
> value="news"/>
>                 <map:parameter name="show-nr-of-rows"
> value="true"/> 
>                 <map:parameter name="clob-encoding"
> value="UTF-8"/> 
>            </map:transform> 
>            <map:transform src="seas.xsl"/>
>            <map:serialize type="xhtml"/>
>       </map:match>
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
> http://promotions.yahoo.com/new_mail


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