You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Johnny Jones <ja...@hotmail.com> on 2004/12/15 00:30:25 UTC
Publication Templating Proposal
Hi,
Andreas put a page on the wiki about Publication Templating:
http://wiki.apache.org/lenya/ProposalPublicationTemplating
It seems like a great way to accomplish templating. I read somewhere else
that this only works on 1.4 so I am trying it on the trunk and sending this
to the dev list. I would like a little bit more info on this proposed
method. Specifically, I need more info on which files to edit and how to
edit them (where to insert the example lines).
1) Is there a specific location inside of my-pub/config/publication.xconf to
put the following?
<templates>
<template id="my-template"/>
</templates>
2) When invoking publication templating to apply the fallback module on all
relevant files (ex. XSLT stylesheet), which file(s) (specific filenames or
examples) need to be edited? Where inside of the file(s) should the
following be inserted?
<map:transform src="{fallback:xslt/doctypes/doctype2xhtml.xsl}">
3) When using XSLT including and importing, which file(s) (specific
filenames or examples) need to be edited? Where inside of the file(s)
should the following be inserted?
<xsl:include href="cocoon:/xslt/common/header.xsl"/>
Which file(s) should the pipeline used to match the **.xsl requests be added
to? Where inside of the file(s) should the following be inserted?
<map:pipeline internal-only="true">
<map:match pattern="**.xsl">
<map:generate src="{fallback:{1}.xsl}"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
Which file(s) and how/where to edit as an alternative by using the core to
provide the pipeline and requested using a cocoon:// (with double slash)
call such as the following?
<xsl:include href="cocoon://xslt/common/header.xsl"/>
If I want to override the XSLT stylesheets in a simpler way with importing
the template stylesheet by using an additional input module, which file(s)
and how where to insert the following?
<xsl:import href="cocoon:/template/xslt/common/header.xsl"/>
<map:match pattern="template/**.xsl">
<map:generate src="{template:{1}.xsl}"/>
<map:serialize type="xml"/>
</map:match>
4) In order to fallback-enable the sitemap where in
lenya/global-sitemap.xmap should all publication sitemaps be mounted using
the fallback module as follows?
<!-- Enter the actual publication -->
<map:match pattern="*/**">
<map:mount uri-prefix="{1}" src="{fallback:sitemap.xmap}"/>
</map:match>
5) In order to have a traversing order of usecase sitemaps, where should I
insert the following fallback module call in global-sitemap.xmap?
<map:match type="usecase" pattern="*">
<map:mount src="{usecase-fallback:{1}}" uri-prefix=""/>
</map:match>
6) When I want to specify which usecase.xmap to choose by making a usecase
configuration in publication.xconf, where should I add an entry such as?
<publication>
...
<usecases>
<usecase name="create"/>
</usecases>
...
</publication>
Thanks for your help in advance. Publication Templating seems to be very
powerful. I apologize if my questions are too newbie but they might help to
add some more context for the next newb.
Johnny
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Apache Lenya Project http://lenya.apache.org
Re: Publication Templating Proposal
Posted by Michael Wechner <mi...@wyona.com>.
Johnny Jones wrote:
> Hi,
>
> Andreas put a page on the wiki about Publication Templating:
> http://wiki.apache.org/lenya/ProposalPublicationTemplating
>
> It seems like a great way to accomplish templating. I read somewhere
> else that this only works on 1.4
right. Please be aware that 1.4-dev (trunk) is not very stable and not
supposed to be used within a productive environment yet.
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: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Apache Lenya Project http://lenya.apache.org
Re: Publication Templating Proposal
Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann wrote:
[...]
>>> I guess that would be replaced by a template:// protocol and
>>> handled completely by a specific source factory.
>>
>>
>>
>> what would that protocol be doing exactly?
>
>
> It would be similar to the fallback:// protocol (traverse the
> templates), but skip the actual publication. This makes it
> possible to override the template stylesheet using <xsl:import/>
> with an equally named stylesheet (if you used fallback://
> instead, it would try to override itself ...).
You can compare it to a super.doSomething(...) call in Java.
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Apache Lenya Project http://lenya.apache.org
Re: Publication Templating Proposal
Posted by Andreas Hartmann <an...@apache.org>.
Gregor J. Rothfuss wrote:
> Andreas Hartmann wrote:
>
>> Basically everywhere you read a fallback-enabled file from a sitemap.
>> If you use the default publication as a template, you don't have to
>> take care of this (unless you use a custom sitemap), as the default
>> publication is already fallback enabled (maybe not yet completely,
>> if you miss something just file a bug).
>
>
> i just added lots more fallback:// to the trunk
>
>
>>> which file(s) and how where to insert the following?
>>> <xsl:import href="cocoon:/template/xslt/common/header.xsl"/>
>>> <map:match pattern="template/**.xsl">
>>> <map:generate src="{template:{1}.xsl}"/>
>>> <map:serialize type="xml"/>
>>> </map:match>
>>
>>
>> I guess that would be replaced by a template:// protocol and
>> handled completely by a specific source factory.
>
>
> what would that protocol be doing exactly?
It would be similar to the fallback:// protocol (traverse the
templates), but skip the actual publication. This makes it
possible to override the template stylesheet using <xsl:import/>
with an equally named stylesheet (if you used fallback://
instead, it would try to override itself ...).
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Apache Lenya Project http://lenya.apache.org
Re: Publication Templating Proposal
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Andreas Hartmann wrote:
> Basically everywhere you read a fallback-enabled file from a sitemap.
> If you use the default publication as a template, you don't have to
> take care of this (unless you use a custom sitemap), as the default
> publication is already fallback enabled (maybe not yet completely,
> if you miss something just file a bug).
i just added lots more fallback:// to the trunk
>> which file(s) and how where to insert the following?
>> <xsl:import href="cocoon:/template/xslt/common/header.xsl"/>
>> <map:match pattern="template/**.xsl">
>> <map:generate src="{template:{1}.xsl}"/>
>> <map:serialize type="xml"/>
>> </map:match>
>
> I guess that would be replaced by a template:// protocol and
> handled completely by a specific source factory.
what would that protocol be doing exactly?
>> 6) When I want to specify which usecase.xmap to choose by making a
>> usecase configuration in publication.xconf, where should I add an
>> entry such as?
>> <publication>
>> ...
>> <usecases>
>> <usecase name="create"/>
>> </usecases>
>> ...
>> </publication>
>
>
> This is not implemented yet, it is still work in progress.
> If you have any ideas how to support templating-enabled
> usecases, feel free to make a proposal :)
that would have to co-exist with
http://wiki.apache.org/lenya/UsecaseFrameworkProposal
which we need to hash out more.
--
Gregor J. Rothfuss
COO, Wyona Content Management Solutions http://wyona.com
Apache Lenya http://lenya.apache.org
gregor.rothfuss@wyona.com gregor@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Apache Lenya Project http://lenya.apache.org
Re: Publication Templating Proposal
Posted by Andreas Hartmann <an...@apache.org>.
Johnny Jones wrote:
> Hi,
>
> Andreas put a page on the wiki about Publication Templating:
> http://wiki.apache.org/lenya/ProposalPublicationTemplating
Actually this page has been superceded by
http://wiki.apache.org/lenya/PublicationTemplating
(I just added the link to the old page)
> It seems like a great way to accomplish templating. I read somewhere
> else that this only works on 1.4 so I am trying it on the trunk and
> sending this to the dev list. I would like a little bit more info on
> this proposed method. Specifically, I need more info on which files to
> edit and how to edit them (where to insert the example lines).
>
> 1) Is there a specific location inside of
> my-pub/config/publication.xconf to put the following?
> <templates>
> <template id="my-template"/>
> </templates>
Just add it somewhere inside the document element.
> 2) When invoking publication templating to apply the fallback module on
> all relevant files (ex. XSLT stylesheet), which file(s) (specific
> filenames or examples) need to be edited? Where inside of the file(s)
> should the following be inserted?
> <map:transform src="{fallback:xslt/doctypes/doctype2xhtml.xsl}">
Basically everywhere you read a fallback-enabled file from a sitemap.
If you use the default publication as a template, you don't have to
take care of this (unless you use a custom sitemap), as the default
publication is already fallback enabled (maybe not yet completely,
if you miss something just file a bug).
> 3) When using XSLT including and importing, which file(s) (specific
> filenames or examples) need to be edited? Where inside of the file(s)
> should the following be inserted?
> <xsl:include href="cocoon:/xslt/common/header.xsl"/>
This has been superceded by the fallback:// protocol.
You have to use it for every <xsl:include> and <xsl:import> statement
in your XSLTs where you reference a file from the same publication.
If you reference a file from the core directly (../../xslt/foo.xsl),
then you don't need it.
> Which file(s) should the pipeline used to match the **.xsl requests be
> added to? Where inside of the file(s) should the following be inserted?
> <map:pipeline internal-only="true">
> <map:match pattern="**.xsl">
> <map:generate src="{fallback:{1}.xsl}"/>
> <map:serialize type="xml"/>
> </map:match>
> </map:pipeline>
This step is obsolete when you use the fallback:// protocol.
> Which file(s) and how/where to edit as an alternative by using the core
> to provide the pipeline and requested using a cocoon:// (with double
> slash) call such as the following?
> <xsl:include href="cocoon://xslt/common/header.xsl"/>
This is not recommended because you would have to tweak the Lenya core.
If you consider such functionality useful, you could ask for an
enhancement on lenya-dev.
> If I want to override the XSLT stylesheets in a simpler way with
> importing the template stylesheet by using an additional input module,
IIRC this is not implemented yet ...
> which file(s) and how where to insert the following?
> <xsl:import href="cocoon:/template/xslt/common/header.xsl"/>
> <map:match pattern="template/**.xsl">
> <map:generate src="{template:{1}.xsl}"/>
> <map:serialize type="xml"/>
> </map:match>
I guess that would be replaced by a template:// protocol and
handled completely by a specific source factory.
> 4) In order to fallback-enable the sitemap where in
> lenya/global-sitemap.xmap should all publication sitemaps be mounted
> using the fallback module as follows?
> <!-- Enter the actual publication -->
> <map:match pattern="*/**">
> <map:mount uri-prefix="{1}" src="{fallback:sitemap.xmap}"/>
> </map:match>
This should already have been done, if you experience problems
you can file a bug.
> 5) In order to have a traversing order of usecase sitemaps, where should
> I insert the following fallback module call in global-sitemap.xmap?
> <map:match type="usecase" pattern="*">
> <map:mount src="{usecase-fallback:{1}}" uri-prefix=""/>
> </map:match>
Dito.
> 6) When I want to specify which usecase.xmap to choose by making a
> usecase configuration in publication.xconf, where should I add an entry
> such as?
> <publication>
> ...
> <usecases>
> <usecase name="create"/>
> </usecases>
> ...
> </publication>
This is not implemented yet, it is still work in progress.
If you have any ideas how to support templating-enabled
usecases, feel free to make a proposal :)
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Apache Lenya Project http://lenya.apache.org
Re: Publication Templating Proposal
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Johnny Jones wrote:
> Thanks for your help in advance. Publication Templating seems to be
> very powerful. I apologize if my questions are too newbie but they
> might help to add some more context for the next newb.
for some historical context, publication templating grew out of our
experience implementing lenya for the university of zurich. an earlier
form of publication templating may be observed by installing the unicms
publication available from http://wyona.org
--
Gregor J. Rothfuss
COO, Wyona Content Management Solutions http://wyona.com
Apache Lenya http://lenya.apache.org
gregor.rothfuss@wyona.com gregor@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Apache Lenya Project http://lenya.apache.org