You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Joern Nettingsmeier <po...@uni-duisburg.de> on 2005/12/30 16:15:09 UTC

questions concerning publication templating in 1.4

hi everyone!


i've been looking into publicatin templating and the "new publication
wizard", and i've documented my observations and questions in the wiki
(http://wiki.apache.org/lenya/RandomThingsLearnedWhilePlayingWith1%2e4HEAD).
since i would appreciate your comments, i'm posting the current contents
of my brain-dump page here.

I must confess I have not RFTM'ed on all open questions (hence "brain
dump"), so concentrate on the issues you find interesting from a
technical pov. however, pointers to any specific FM would be most welcome.

<quote>

New Publication Wizard / Publication templating

I'm trying to set up two publications that follow a common corporate
design. The idea is to use publication templating, so that changes to
the design will automatically be propagated to the derived publications.
This does not work very well for me atm - I need to understand which
settings and files are hard-copied once during creation and which are
referenced. I'm dumping my findings here as I go along.

 Observations

  Access Control:

    * <newpub>/config/ac/ac.xconf uses
"context:///lenya/pubs/default/config/ac/passwd" etc. *But*: it always
uses the "default" publication, not the actual template that is used.
Bug or feature? Should this also use "fallback:///"?

    * The contents of the passwd/ and policy/ dirs are copied into
<newpub>, probably also from the default publication.

          o Why? Either the whole mechanism should fall back to the
default publication (including all users/groups/hosts etc.), or it is
independent. Can anyone explain?

    * When I create a new user in the template publication, log out and
into a derived publication, the user is there as well. Ok. But there is
no entry in <derived publication>/config/ac/passwd.

          o Why? Either the entire passwd dir is not used, in which case
it should not be created in the first place, or it should reflect the
current state of the things.

    * When I create a new user in a derived publication, the user is
also visible in the template publication. So there is a common ac
repository.
          o Ok, it seems that all users go to the config/ac/passwd of
the default publication. This is consistent with the first observation
above.


  Configuration:


    * publication.xml is copied from the template, and the publication
name is changed.


  Content:


    * content/*/* is copied from the template without changes.

    * When creating a new xhtml page, I see the standard "Default
Publication - Welcome to the default Lenya publication! The purpose of
this publication is..." page.

          o How can I edit this? It should be an example page from the
publication template.

    * When I create a "links" type page, I see the standard "links"
example page.

          o Again, how do I edit this? I want it to show an example page
for the proper resource type from the template.

    * As mentioned in [WWW]
http://lenya.apache.org/1_4/reference/publication-templating/index.html,
templates are defined in <newpub>/config/publication.xconf.

          o I want to be able to add new resource types to the
*template* that will automatically be available in all derived
publications. possible? IIUC, as it is now I have to add a new fallback
entry to each derived publication's config file by hand, which is not so
nice. Is there a way to say "take all configuration options from the
template except those which are explicitly overwritten in the
publication's .xconf"? This would be a lot saner IMHO.

    * indexing: in <newpub>/config/index_manager.xconf it says '<indexer
role="org.apache.cocoon.components.search.components.Indexer/default"
/>'. Does this relate to the default publication, or is it just the
"default" indexer behaviour?


Other open issues


    * Is there a fallback mechanism for the "resources" subdir? What I'd
like to have is reference a .css, lenya looks in the resources dir of
the current publication, and if it's not there, look in the template. Or
better yet, concatenate both css files so that I can overload selected
style declarations while the rest is taken from the template.

    * Such a fallback would be nice for images and javascript as well
(think corporate design). Possible?

    * How is access control supposed to work? Ideally, users created in
a template are valid for all the derived publications, and each
publication also has its own local user list. Possible?

    * How does the searching behave? (Need to look into that.) Ideally,
I want to be able to search only the current publication or all
publications derived from the same template(s).

</quote>


one more thing: is it ok to post such basic 1.4 issues to dev, or should
i go to user instead? and is the use of the wiki for work-in-progress
ok? i'm asking since the dev list receives a mail for every change in
the wiki and i wonder whether people might feel spammed... then again, i
feel that there needs to be some kind of life sign for the documentation
of 1.4 to attract beta testers, which is why i decided to use the wiki
in the first place.



regards,

jörn



-- 
"Án nýrra verka, án nútimans, hættir fortíðin að vekja áhuga."
"Without new works, without the present the past will cease to be of
interest."
        - Ásmundur Sveinsson (1893-1982)

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736


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


Re: questions concerning publication templating in 1.4

Posted by Thorsten Scherler <th...@apache.org>.
El mar, 03-01-2006 a las 14:11 +0100, Andreas Hartmann escribió:
> Thorsten Scherler wrote:
> 
> [...]
> 
> > I just did an site update
> 
> Cool! Did you change something, or find the cause of the problems?

Yeah, I used 0.8-dev to deploy and had to activate a couple of plugins
in forrest.properties. I reckon you used 0.7 and our forrest.properties
was from 0.6, so I updated it. That was the reason why e.g. the
changes.html was not generated. 

I still have a couple of broken-links but I guess is better to have some
broken links and the content up-to-date then everything working from
half a year ago. I will later on post them to this list to figure out
why they are broken.

I will ask on forrest whether we can include our docu branch in the
forrest bot deploy, this way we "only" have to edit the xdocs and commit
them, the rest would do the forrestbot for us.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


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


Re: questions concerning publication templating in 1.4

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

[...]

> I just did an site update

Cool! Did you change something, or find the cause of the problems?

-- Andreas


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


Re: questions concerning publication templating in 1.4

Posted by Jörn Nettingsmeier <po...@uni-duisburg.de>.
Thorsten Scherler wrote:

>>> See
>>> http://svn.apache.org/viewcvs.cgi/lenya/docu/src/documentation/content/xdocs/1_4/reference/modules/index.xml?view=markup
>> thanks for this link! i was not aware that such documentation exists. 
>> looks like tomorrow will bring a couple eye-openers :-D
> 
> sorry, we did not updated our site for a long time now. The above link
> is the src file. 
> 
> I just did an site update, you can read it now on 
> http://lenya.apache.org/1_4/reference/modules/index.html
> 
>> how do i check it out and build it? 
> 
> That is our docu branch:
> svn co http://svn.apache.org/repos/asf/lenya/docu/ lenya.docu
> 
> More information can be found on
> http://lenya.apache.org/community/website-update.html
> 
> 
>> i tried svn co, but it does not 
>> work, even when i remove the "viewcvs.cgi" part. where is this repository?
>>
> 
> http://svn.apache.org/viewcvs.cgi/lenya/docu/ equals
> http://svn.apache.org/repos/asf/lenya/docu/

cool. must sleep now, but i'm really looking forward to digging into 
this tomorrow :-D thanks!

-- 
"Open source takes the bullshit out of software."
	- Charles Ferguson on TechnologyReview.com

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736

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


Re: questions concerning publication templating in 1.4

Posted by Thorsten Scherler <th...@apache.org>.
El mar, 03-01-2006 a las 00:39 +0100, Jörn Nettingsmeier escribió:
> Thorsten Scherler wrote:
> > El lun, 02-01-2006 a las 17:14 +0100, Joern Nettingsmeier escribió:
> >> that's exactly what i'd like to avoid. here's why: we're launching two
> >> sites (more to follow later) with a common corporate design and common
> >> xml data structures. we want to start easy, using only xhtml. in the
> >> second stage, we want to introduce abstract xml doctypes one by one for
> >> special pages (personal information, literature lists, classes etc.).
> >> this is where it would be cool to just define them in the template and
> >> be able to use them without any modification to the derived pubs.
> >>
> >> of course, this feature is not really critical for us, but it seems
> >> elegant and intuitive to me.
> >>
> > 
> > Hmm, that is what modules are for. You can create a template pub
> > containing all global available templates for resource types or what so
> > ever. 
> > 
> > See
> > http://svn.apache.org/viewcvs.cgi/lenya/docu/src/documentation/content/xdocs/1_4/reference/modules/index.xml?view=markup
> 
> thanks for this link! i was not aware that such documentation exists. 
> looks like tomorrow will bring a couple eye-openers :-D

sorry, we did not updated our site for a long time now. The above link
is the src file. 

I just did an site update, you can read it now on 
http://lenya.apache.org/1_4/reference/modules/index.html

> 
> how do i check it out and build it? 

That is our docu branch:
svn co http://svn.apache.org/repos/asf/lenya/docu/ lenya.docu

More information can be found on
http://lenya.apache.org/community/website-update.html


> i tried svn co, but it does not 
> work, even when i remove the "viewcvs.cgi" part. where is this repository?
> 

http://svn.apache.org/viewcvs.cgi/lenya/docu/ equals
http://svn.apache.org/repos/asf/lenya/docu/

> best,
> 
> jörn

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


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


Re: questions concerning publication templating in 1.4

Posted by Jörn Nettingsmeier <po...@uni-duisburg.de>.
Thorsten Scherler wrote:
> El lun, 02-01-2006 a las 17:14 +0100, Joern Nettingsmeier escribió:
>> that's exactly what i'd like to avoid. here's why: we're launching two
>> sites (more to follow later) with a common corporate design and common
>> xml data structures. we want to start easy, using only xhtml. in the
>> second stage, we want to introduce abstract xml doctypes one by one for
>> special pages (personal information, literature lists, classes etc.).
>> this is where it would be cool to just define them in the template and
>> be able to use them without any modification to the derived pubs.
>>
>> of course, this feature is not really critical for us, but it seems
>> elegant and intuitive to me.
>>
> 
> Hmm, that is what modules are for. You can create a template pub
> containing all global available templates for resource types or what so
> ever. 
> 
> See
> http://svn.apache.org/viewcvs.cgi/lenya/docu/src/documentation/content/xdocs/1_4/reference/modules/index.xml?view=markup

thanks for this link! i was not aware that such documentation exists. 
looks like tomorrow will bring a couple eye-openers :-D

how do i check it out and build it? i tried svn co, but it does not 
work, even when i remove the "viewcvs.cgi" part. where is this repository?

best,

jörn



-- 
"Open source takes the bullshit out of software."
	- Charles Ferguson on TechnologyReview.com

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736

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


Re: questions concerning publication templating in 1.4

Posted by Thorsten Scherler <th...@apache.org>.
El lun, 02-01-2006 a las 17:14 +0100, Joern Nettingsmeier escribió:
> [just a few tidbits here, i'm moving the major issues to separate threads.]
> 
> Andreas Hartmann wrote:
> > Joern Nettingsmeier wrote:
> > 
> > [...]
> > 
> 
> >>     * As mentioned in [WWW]
> >> http://lenya.apache.org/1_4/reference/publication-templating/index.html,
> >> templates are defined in <newpub>/config/publication.xconf.
> >>
> >>           o I want to be able to add new resource types to the
> >> *template* that will automatically be available in all derived
> >> publications. possible?
> > 
> > Resource types are always available to all publications. You just have
> > to add them to publication.xconf.
> 
> that's exactly what i'd like to avoid. here's why: we're launching two
> sites (more to follow later) with a common corporate design and common
> xml data structures. we want to start easy, using only xhtml. in the
> second stage, we want to introduce abstract xml doctypes one by one for
> special pages (personal information, literature lists, classes etc.).
> this is where it would be cool to just define them in the template and
> be able to use them without any modification to the derived pubs.
> 
> of course, this feature is not really critical for us, but it seems
> elegant and intuitive to me.
> 

Hmm, that is what modules are for. You can create a template pub
containing all global available templates for resource types or what so
ever. 

See
http://svn.apache.org/viewcvs.cgi/lenya/docu/src/documentation/content/xdocs/1_4/reference/modules/index.xml?view=markup

HTH
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


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


Re: questions concerning publication templating in 1.4

Posted by Joern Nettingsmeier <po...@uni-duisburg.de>.
[just a few tidbits here, i'm moving the major issues to separate threads.]

Andreas Hartmann wrote:
> Joern Nettingsmeier wrote:
> 
> [...]
> 
> Let me start with a small note:
> 
> The default publication's instantiator is just an example how it could
> be done, it is not thoroughly designed and tested.
> You can fine-tune your own instantiator just as you please.

duly noted. ;)

>>     * content/*/* is copied from the template without changes.
> 
> Really? IIRC I removed this behaviour some weeks ago ...

i don't think so:

quoting the source (updated today):
> public class Instantiator extends AbstractLogEnabled implements
>         org.apache.lenya.cms.publication.templating.Instantiator, Serviceable {
> 
>     protected static final String[] sourcesToCopy = { 
> 	"publication.xml",
>         "config/publication.xconf",
> 	"config/index_manager_index.xconf", 
> 	"config/index_manager.xconf",
> 	"config/ac/passwd/", 
> 	"config/ac/ac.xconf",
> 	"config/ac/policies/",
> 	"config/ac/usecase-policies.xml",
> 	"config/workflow/workflow.xml",
> 	"content/"
        ^^^^^^^^^
>     };

unless copying a directory in this context does not imply copying the
files inside.

>>     * As mentioned in [WWW]
>> http://lenya.apache.org/1_4/reference/publication-templating/index.html,
>> templates are defined in <newpub>/config/publication.xconf.
>>
>>           o I want to be able to add new resource types to the
>> *template* that will automatically be available in all derived
>> publications. possible?
> 
> Resource types are always available to all publications. You just have
> to add them to publication.xconf.

that's exactly what i'd like to avoid. here's why: we're launching two
sites (more to follow later) with a common corporate design and common
xml data structures. we want to start easy, using only xhtml. in the
second stage, we want to introduce abstract xml doctypes one by one for
special pages (personal information, literature lists, classes etc.).
this is where it would be cool to just define them in the template and
be able to use them without any modification to the derived pubs.

of course, this feature is not really critical for us, but it seems
elegant and intuitive to me.

> Not yet.
> 
>> This would be a lot saner IMHO.
> 
> Patches are greatly appreciated.

another point duly taken. ;)
but i fear i'm out of my depth there...

>>     * Is there a fallback mechanism for the "resources" subdir? 
> Actually that should already work (see global-sitemap.xmap):
> 
>         <!-- Ancestors resources, css, js, etc... -->
>         <!-- {publication-id}/{area}/{filename}.inherited.{extention} -->
>         <map:match pattern="*/*/**.inherited.*">
>           <map:act type="resource-exists-enhanced">
>             <map:parameter name="url"
> value="template-fallback://resources/shared/{3}.{4}"/>
>             <map:parameter name="type" value="file"/>
>             <map:mount uri-prefix=""
> src="{fallback://lenya/resources-shared.xmap}" check-reload="true"
> reload-method="synchron"/>
>           </map:act>
>         </map:match>

thanks fo the pointer to the global sitemap, this clears things up.
what is "template-fallback://..."? does it have any special meaning, or
is it just a hack to get fallback in attributes that are not piped into
the uri resolver? if so, can i use it everywhere?


regards,

jörn



-- 
"Án nýrra verka, án nútimans, hættir fortíðin að vekja áhuga."
"Without new works, without the present the past will cease to be of
interest."
        - Ásmundur Sveinsson (1893-1982)

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736


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


Re: questions concerning publication templating in 1.4

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

[...]

Let me start with a small note:

The default publication's instantiator is just an example how it could 
be done, it is not thoroughly designed and tested.
You can fine-tune your own instantiator just as you please.


>   Access Control:
> 
>     * <newpub>/config/ac/ac.xconf uses
> "context:///lenya/pubs/default/config/ac/passwd" etc. *But*: it always
> uses the "default" publication, not the actual template that is used.
> Bug or feature? Should this also use "fallback:///"?

IMO that would add confusion. Maybe the instantiator should change this
path when a publication is created.


>     * The contents of the passwd/ and policy/ dirs are copied into
> <newpub>, probably also from the default publication.
> 
>           o Why? Either the whole mechanism should fall back to the
> default publication (including all users/groups/hosts etc.), or it is
> independent. Can anyone explain?

See above - if the path reference in ac.xconf is patched, then these
directories will be needed.

[...]


>   Configuration:
> 
>     * publication.xml is copied from the template, and the publication
> name is changed.
> 
>   Content:
> 
> 
>     * content/*/* is copied from the template without changes.

Really? IIRC I removed this behaviour some weeks ago ...


>     * When creating a new xhtml page, I see the standard "Default
> Publication - Welcome to the default Lenya publication! The purpose of
> this publication is..." page.

Just change the sample.


>           o How can I edit this? It should be an example page from the
> publication template.

modules/xhtml/samples/*.xml


>     * When I create a "links" type page, I see the standard "links"
> example page.
> 
>           o Again, how do I edit this? I want it to show an example page
> for the proper resource type from the template.

modules/links/samples/*.xml


>     * As mentioned in [WWW]
> http://lenya.apache.org/1_4/reference/publication-templating/index.html,
> templates are defined in <newpub>/config/publication.xconf.
> 
>           o I want to be able to add new resource types to the
> *template* that will automatically be available in all derived
> publications. possible?

Resource types are always available to all publications. You just have
to add them to publication.xconf.

> IIUC, as it is now I have to add a new fallback
> entry to each derived publication's config file by hand, which is not so
> nice. Is there a way to say "take all configuration options from the
> template except those which are explicitly overwritten in the
> publication's .xconf"? 

Not yet.

 > This would be a lot saner IMHO.

Patches are greatly appreciated.


>     * indexing: in <newpub>/config/index_manager.xconf it says '<indexer
> role="org.apache.cocoon.components.search.components.Indexer/default"
> />'. Does this relate to the default publication, or is it just the
> "default" indexer behaviour?

I guess the latter, but I'm not sure.


> Other open issues
> 
>     * Is there a fallback mechanism for the "resources" subdir? What I'd
> like to have is reference a .css, lenya looks in the resources dir of
> the current publication, and if it's not there, look in the template. Or
> better yet, concatenate both css files so that I can overload selected
> style declarations while the rest is taken from the template.
> 
>     * Such a fallback would be nice for images and javascript as well
> (think corporate design). Possible?

Actually that should already work (see global-sitemap.xmap):

         <!-- Ancestors resources, css, js, etc... -->
         <!-- {publication-id}/{area}/{filename}.inherited.{extention} -->
         <map:match pattern="*/*/**.inherited.*">
           <map:act type="resource-exists-enhanced">
             <map:parameter name="url" 
value="template-fallback://resources/shared/{3}.{4}"/>
             <map:parameter name="type" value="file"/>
             <map:mount uri-prefix="" 
src="{fallback://lenya/resources-shared.xmap}" check-reload="true" 
reload-method="synchron"/>
           </map:act>
         </map:match>


>     * How is access control supposed to work? Ideally, users created in
> a template are valid for all the derived publications, and each
> publication also has its own local user list. Possible?

Not yet. That would require a custom accreditable manager.


>     * How does the searching behave? (Need to look into that.) Ideally,
> I want to be able to search only the current publication or all
> publications derived from the same template(s).

No idea ...


> </quote>
> 
> 
> one more thing: is it ok to post such basic 1.4 issues to dev, or should
> i go to user instead?

IMO the dev list is fine.


> and is the use of the wiki for work-in-progress
> ok?

Sure, it's fine for protocols etc. But discussions don't seem to work
well in the wiki, so re-posting here was a very good idea.


> i'm asking since the dev list receives a mail for every change in
> the wiki and i wonder whether people might feel spammed... then again, i
> feel that there needs to be some kind of life sign for the documentation
> of 1.4 to attract beta testers, which is why i decided to use the wiki
> in the first place.

Thanks for your comments!

-- Andreas


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


Re: questions concerning publication templating in 1.4

Posted by so...@apache.org.
On 12/30/05, Joern Nettingsmeier <po...@uni-duisburg.de> wrote:
>   Access Control:
>     * <newpub>/config/ac/ac.xconf uses
> "context:///lenya/pubs/default/config/ac/passwd" etc. *But*: it always
> uses the "default" publication, not the actual template that is used.
> Bug or feature? Should this also use "fallback:///"?
>     * The contents of the passwd/ and policy/ dirs are copied into
> <newpub>, probably also from the default publication.
>           o Why? Either the whole mechanism should fall back to the
> default publication (including all users/groups/hosts etc.), or it is
> independent. Can anyone explain?
>     * When I create a new user in the template publication, log out and
> into a derived publication, the user is there as well. Ok. But there is
> no entry in <derived publication>/config/ac/passwd.
>           o Why? Either the entire passwd dir is not used, in which case
> it should not be created in the first place, or it should reflect the
> current state of the things.
>     * When I create a new user in a derived publication, the user is
> also visible in the template publication. So there is a common ac
> repository.
>           o Ok, it seems that all users go to the config/ac/passwd of
> the default publication. This is consistent with the first observation
> above.

FILE: {pub}\config\ac\ac.xconf
Contains absolute paths to the passwd directory.  Since you just
copied an entire publication, the absolute paths are pointing to the
old publication's directory.  This file must be manually updated if
the publication id (directory) is changed from where the file was
copied.

IMO, this is silly.  The paths should be relative so each publication
uses its own security without requiring manually changing files. 
Publications sharing security settings should be the special case
rather than the default.

===
> When creating a new xhtml page, I see the standard "Default
> Publication - Welcome to the default Lenya publication! The purpose of
> this publication is..." page. How can I edit this? It should be an example
> page from the publication template.

See the XML files in:
{pub}\config\doctypes\samples

solprovider

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