You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Dezbah Duchicela <de...@us.ibm.com> on 2006/06/08 15:38:38 UTC

Doctype




I am still a little confused on Doctypes. Are they like templates for
certain pages?

Can someone please explain and give a simple explantion on how to make one?

Thanks in advance

Dezbah

Re: Doctype

Posted by so...@apache.org.
On 6/8/06, Dezbah Duchicela <de...@us.ibm.com> wrote:
> I am still a little confused on Doctypes. Are they like templates for
> certain pages?
>  Can someone please explain and give a simple explantion on how to make one?

It has been almost 2 weeks and nobody has answered your post.  I hope
the following is correct, but I have not used this feature.

In Lenya1.2's "default" Publication , a "doctype" for a Document is
determined by analyzing the URL and the Document XML.  The doctype is
chosen based on the URL matching a pattern, having a certain root
element or  processing instruction, or a few other criteria.  The
doctype determines the 2 XSLTs used: {doctype}2xhtml.xsl and
page2xhtml-{doctype}.xsl.  This allows different XML definitions to be
converted to webpages.

The implementation is that each Document's doctype is determined once
per boot of Lenya, and cached until Lenya is restarted.  This means
the doctype cannot be used to dynamically change which XSLT is used.

To create a doctype, implement an XML Document with a different
definition, set a name for it in doctypes.xmap, and create the 2 XSLTs
to convert it to HTML for display.  I am uncertain how to maintain the
Documents; we use Kupu, but BXE is supposed to be better for this.

Lenya1.4 is probably similar to 1.2, but I do not know.

Lenya1.3 stores the doctype in XML Resources, so no analysis is
required to decide it.  Doctype Modules control the maintenance and
display; hopefully, adding a doctype will be as easy as defining a
list of fields with labels and types

solprovider

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