You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Timothy Boyden <tr...@MIT.EDU> on 2004/07/25 18:35:27 UTC

Confused about creating custom doc types

Basically this is what I want to accomplish: 
 
I want to create a second XSLT template based on the page2xhtml.xsl template that has a different layout for my top level web pages.
 
What I have done so far:
 
I have followed the Wiki instructions to create a new custom doctype, copying the related page2xhtml files and changing settings where instructed to the name of my new doctype - topLevel. The first issue I ran into was that I was confused as to what to put into the parameter-doctype.xmap file. I simply copied the page2xhtml settings and renamed them to topLevel, however this was not enough as the new documents I created still used the page2xhtml template. I figured out that I needed to add a arbitrary namespace to my sample xml file like: xmlns:topLevel="http://could-be-anything.com" and add that to my entry in parameter-doctype. However now I get an error that there is no pipeline to deal with this doctype and I have no idea what I need to do as I don't understand the whole pipeline concept whatsoever. Any help with this would be appreciated.

Comment about Lenya templating:

Creating new templates is the next most important thing next to creating content within the CMS. As such the process of creating new templates must be made "no brainer" easy for Lenya to have value. This whole approach of creating custom doctypes is way too over complicated given the simplicity of creating XSLT templates. It is also not very flexible. The user or site admin should be able to define which template they want applied to a document on the fly or at least prior to publishing to the live site. I don't see how the current method of creating templates allows for that.

    
 
Timothy Boyden
MIT Department of Facilities
IT Support & Training Group


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


Re: Confused about creating custom doc types

Posted by Andreas Hartmann <an...@apache.org>.
Timothy Boyden wrote:
> Basically this is what I want to accomplish: 
>  
> I want to create a second XSLT template based on the page2xhtml.xsl template that has a different layout for my top level web pages.
>  
> What I have done so far:
>  
> I have followed the Wiki instructions to create a new custom doctype, copying the related page2xhtml files and changing settings where instructed to the name of my new doctype - topLevel. The first issue I ran into was that I was confused as to what to put into the parameter-doctype.xmap file. I simply copied the page2xhtml settings and renamed them to topLevel, however this was not enough as the new documents I created still used the page2xhtml template. I figured out that I needed to add a arbitrary namespace to my sample xml file like: xmlns:topLevel="http://could-be-anything.com" and add that to my entry in parameter-doctype. However now I get an error that there is no pipeline to deal with this doctype and I have no idea what I need to do as I don't understand the whole pipeline concept whatsoever. Any help with this would be appreciated.

You find a good introduction to the Cocoon concepts on
http://cocoon.apache.org/2.1/userdocs/concepts/index.html

Without basic Cocoon knowledge, it will be hard to
get familiar with Lenya. And you won't get Cocoon
support on this list (apart from pointers to the
Cocoon mailing lists :) )

> Comment about Lenya templating:
> 
> Creating new templates is the next most important thing next to creating content within the CMS. As such the process of creating new templates must be made "no brainer" easy for Lenya to have value. This whole approach of creating custom doctypes is way too over complicated given the simplicity of creating XSLT templates. It is also not very flexible. The user or site admin should be able to define which template they want applied to a document on the fly or at least prior to publishing to the live site. I don't see how the current method of creating templates allows for that.

Your opinion is appreciated and shared by many members
of the community. If you have some good ideas how to
implement a doctype GUI, feel free to make a proposal
on lenya-dev! I will certainly add my comments.

BTW, would you mind adding line breaks to your mail?
Maybe I find out how to configure Thunderbird to add
the breaks automatically when quoting.

Thanks for your comments!

-- Andreas


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


Re: Confused about creating custom doc types

Posted by Andreas Hartmann <an...@apache.org>.
Timothy Boyden wrote:

> Basically this is what I want to accomplish: 
>  
> I want to create a second XSLT template based on the page2xhtml.xsl template that has a different layout for my top level web pages.

In the default publication, it is assumed that you have the same
page rendering XSLT (page2xhtml.xsl) for all doctypes. Rendering
a specific doctype (the content <div>) is done by {doctype}2xhtml.xsl
(e.g., xhtml2xhtml.xsl).

This decision was made for simplicity. I think it servers the
most usecases quite well.


> What I have done so far:
>  
> I have followed the Wiki instructions to create a new custom doctype, copying the related page2xhtml files

Actually, you're not supposed to copy page2xhtml.xsl for creating
a new doctype (rather xhtml2xhtml.xsl).

> and changing settings where instructed to the name of my new doctype - topLevel. The first issue I ran into was that I was confused as to what to put into the parameter-doctype.xmap file.

It helps to be familiar with the Forrest SourceTypeAction.

> I simply copied the page2xhtml settings and renamed them to topLevel, however this was not enough as the new documents I created still used the page2xhtml template. I figured out that I needed to add a arbitrary namespace to my sample xml file like: xmlns:topLevel="http://could-be-anything.com" and add that to my entry in parameter-doctype. However now I get an error that there is no pipeline to deal with this doctype and I have no idea what I need to do as I don't understand the whole pipeline concept whatsoever. Any help with this would be appreciated.

Like I said in my other mail, you'll find documentation on the
Cocoon website.

> Comment about Lenya templating:
> 
> Creating new templates is the next most important thing next to creating content within the CMS. As such the process of creating new templates must be made "no brainer" easy for Lenya to have value.

IMO, this is arguable. I don't think it has to be a no-brainer.
In the projects I implemented with Lenya, doctypes were only
introduced once (or rarely added later on).

> This whole approach of creating custom doctypes is way too over complicated given the simplicity of creating XSLT templates. It is also not very flexible.

Why do you think it's not flexible? IMO, Lenya uses the
most flexible XML rendering engine you can imagine
(Cocoon). You can leverage all Cocoon concepts to present
your documents. And even with XSLT, there are unlimited
possiblities.


> The user or site admin should be able to define which template they want applied to a document on the fly or at least prior to publishing to the live site.

This would narrow down the flexibility, because it would
require a standard template architecture. Allowing arbitrary
Cocoon pipelines to render a doctype, you achieve much more
flexibility.

If you're interesting in the whole doctype rendering issue,
you might want to read the proposal thread about resource
type packages.

> I don't see how the current method of creating templates allows for that.

I could imagine to support a view selection GUI for a single
publication (e.g., the {doctype}2xhtml.xsl in the default
publication could be selected in the browser).

But I wouldn't add such a concept to the Lenya core for
flexibility reasons. IMO this does not conform to the
Lenya roadmap.

-- Andreas


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