You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Nunez Steve <st...@yahoo.com> on 2007/07/18 13:21:33 UTC

Importing an existing XML/XSLT/CSS website?

G'Day Gentlemen,

I have an existing website that is composed of XML
files, using a custom schema, that is styled by an
XSLT stylesheet into XHTML, and then finally presented
by way of external CSSs. The entire process is driven
by 'make', and the system works quite well.

It seemed upon first reading that importing this into
Lenya would be straightforward, however this has not
proven to be the case. I've been through all of the
documentation I can find, however I haven't read the
simplest use case:

1. Create an XML document instance & XSLT stylesheet
2. Apply the stylesheet to the XML document
3. Display the results in Lenya.

Can anyone point me to the simplest way to do this?
Given that we've already got the 'hard' part done --
created debugged XML/XSLT/CSS, it should be a matter
of using Lenya to manage this. 

Regards,
    - Steve Nunez



 
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091

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


Re: Importing an existing XML/XSLT/CSS website?

Posted by Andreas Hartmann <an...@apache.org>.
Hi Steve,

Nunez Steve schrieb:
> Lenya Users (and Andreas),
> 
> I think I see the problem here. It appears that Lenya,
> at least in the default configuration, is placing the
> navigation elements into the XHTML via the XSLT.
> Looking at the included stylesheet, page2xhtml, the
> 'structure' of the page is constructed with a table to
> place the various navigation elements in the required
> locations.

the default publication uses tables for historical reasons,
changing this to pure CSS is on the to-do list. You can
just use your own page2xhtml.xsl that doesn't contain
any tables.

> This is one common way of structuring HTML pages, but
> not the only way. If you look at the source code for
> the Illation website, you'll see that there is *no*
> structure in the XHTML -- all of the positioning and
> layout of navigational elements is done with CSS.
>
> Has anyone else used Lenya in a configuration where
> the  entire page layout is controlled by CSS?

Yes, the last websites we created with Lenya use only
CSS for the layout. It's entirely up to you.


> As a more practical question, how exactly can we
> remove all of the default Lenya publication XSLT from
> the pipeline, and implement only a single
> transformation?

Does your publication use the default publication as a
template? In this case you can just override the page2xhtml.xsl
stylesheet in your publication.

-- Andreas

> 
> E.g.
> 
> XML --XSLT--> XHTML Strict ----> Browser (using CSS)
> 
> Regards,
>     - Steve Nunez
> 
> --- Andreas Hartmann <an...@apache.org> wrote:
> 
>> If you really want to use your XSLTs as they are,
>> you can remove the
>> pipelines you mentioned above and put your XSLTs in
>> your publication.
>>
>> But this is not the way Lenya was designed to be
>> used.
>> I'd recommend that you use the navigation framework
>> to generate your
>> navigation elements (in the case of the illation
>> website that would
>> be the horizontal menus at the top of the page and
>> the "Products" menus
>> at the right hand side of the page) and use the
>> XSLTs in the publication
>> to assemble the page.
>  
> 
> 
> 
>        
> ____________________________________________________________________________________
> Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
> http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


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


Re: Importing an existing XML/XSLT/CSS website?

Posted by Jeremy Tan <je...@gmail.com>.
Dear Jörn,

> you shouldn't do that, or you will use all the lenya navigation  
> handling.
> instead, what you do is override the stylesheets in the menu  
> generation module to create custom code.
> only remove those parts that you don't use at all (for example, you  
> might not want breadcrumbs or tabs at all).

What I did was to create a new publication and then override all the  
default page2xhtml.xsl stylesheet in the newly created publication. I  
removed all the xsl bits from the file leaving only <xsl:template  
match="cmsbody"> and <xsl:apply-templates> beneath that. After that I  
disabled the breadcumbs and tabs bits in sitemap.xmap. The problem is  
that in the authoring view, The page displays correctly. But when I  
try to view a live site, some parts of the menu appears. I was unable  
to get CSS styling to work correctly in both authoring and live too.  
I might have left out something but I have no idea what I left out.  
Any pointers?


Cheers,
	Jeremy Tan



On 31/07/2007, at 4:18 PM, Jörn Nettingsmeier wrote:

> a very late reply...
>
> Nunez Steve wrote:
>
>> Has anyone else used Lenya in a configuration where
>> the  entire page layout is controlled by CSS?
>
> yes. i always do it that way. i can send you an example off-list if  
> you want.
>
>> As a more practical question, how exactly can we
>> remove all of the default Lenya publication XSLT from
>> the pipeline, and implement only a single
>> transformation?
>
> you shouldn't do that, or you will use all the lenya navigation  
> handling.
> instead, what you do is override the stylesheets in the menu  
> generation module to create custom code.
> only remove those parts that you don't use at all (for example, you  
> might not want breadcrumbs or tabs at all).
>
> regards,
>
> jörn
>
>
> -- 
> Jörn Nettingsmeier
>
> Kurt is up in heaven now.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>


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


Re: Importing an existing XML/XSLT/CSS website?

Posted by Jürgen Ragaller <ra...@null-oder-eins.ch>.
Am Aug 2, 2007 um 14:44 schrieb Jörn Nettingsmeier:
>
>
> i've removed everything that might infringe on my client's rights,  
> so now i'm sending it to the list - see the attached tarball.

Hi, Jörn - just a note that you forgot the attachment
>

Jürgen


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


Re: Importing an existing XML/XSLT/CSS website?

Posted by Jörn Nettingsmeier <ne...@apache.org>.
Nunez Steve wrote:
> Jörn,
> 
> Thanks very much for your reply. Any examples that you
> could send me would be much appreciated. I'm going to
> be working on moving the site over to Lenya this
> weekend.
> 
> Regards,
>     - Steve

i've removed everything that might infringe on my client's rights, so 
now i'm sending it to the list - see the attached tarball.
in there, you will find a publication directory with some overridden 
resources, to create a table-free css layout with custom menu and no tabs.
please ignore the sitemap, it's outdated. start from the default 
publication sitemap and comment out what you don't need.

regards,

jörn



-- 
Jörn Nettingsmeier

"One of my most productive days was throwing away 1000 lines of code."
   - Ken Thompson.

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


Re: Importing an existing XML/XSLT/CSS website?

Posted by Jörn Nettingsmeier <ne...@apache.org>.
and now with attachment attached ~X-[

Nunez Steve wrote:
> Jörn,
> 
> Thanks very much for your reply. Any examples that you
> could send me would be much appreciated. I'm going to
> be working on moving the site over to Lenya this
> weekend.
> 
> Regards,
>     - Steve

i've removed everything that might infringe on my client's rights, so
now i'm sending it to the list - see the attached tarball.
in there, you will find a publication directory with some overridden
resources, to create a table-free css layout with custom menu and no tabs.
please ignore the sitemap, it's outdated. start from the default
publication sitemap and comment out what you don't need.

regards,

jörn



-- 
Jörn Nettingsmeier

"One of my most productive days was throwing away 1000 lines of code."
   - Ken Thompson.

Re: Importing an existing XML/XSLT/CSS website?

Posted by Nunez Steve <st...@yahoo.com>.
Jörn,

Thanks very much for your reply. Any examples that you
could send me would be much appreciated. I'm going to
be working on moving the site over to Lenya this
weekend.

Regards,
    - Steve

--- Jörn Nettingsmeier <ne...@apache.org> wrote:

> a very late reply...
> 
> Nunez Steve wrote:
> 
> > Has anyone else used Lenya in a configuration
> where
> > the  entire page layout is controlled by CSS?
> 
> yes. i always do it that way. i can send you an
> example off-list if you 
> want.
> 
> > As a more practical question, how exactly can we
> > remove all of the default Lenya publication XSLT
> from
> > the pipeline, and implement only a single
> > transformation?
> 
> you shouldn't do that, or you will use all the lenya
> navigation handling.
> instead, what you do is override the stylesheets in
> the menu generation 
> module to create custom code.
> only remove those parts that you don't use at all
> (for example, you 
> might not want breadcrumbs or tabs at all).
> 
> regards,
> 
> jörn
> 
> 
> -- 
> Jörn Nettingsmeier
> 
> Kurt is up in heaven now.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@lenya.apache.org
> For additional commands, e-mail:
> user-help@lenya.apache.org
> 
> 



       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/

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


Re: Importing an existing XML/XSLT/CSS website?

Posted by Jörn Nettingsmeier <ne...@apache.org>.
a very late reply...

Nunez Steve wrote:

> Has anyone else used Lenya in a configuration where
> the  entire page layout is controlled by CSS?

yes. i always do it that way. i can send you an example off-list if you 
want.

> As a more practical question, how exactly can we
> remove all of the default Lenya publication XSLT from
> the pipeline, and implement only a single
> transformation?

you shouldn't do that, or you will use all the lenya navigation handling.
instead, what you do is override the stylesheets in the menu generation 
module to create custom code.
only remove those parts that you don't use at all (for example, you 
might not want breadcrumbs or tabs at all).

regards,

jörn


-- 
Jörn Nettingsmeier

Kurt is up in heaven now.


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


Re: New Resource Type Presentation

Posted by Andreas Hartmann <an...@apache.org>.
Nunez Steve schrieb:
> Hello Lenya Users,
> 
> According to the documentation found at:
> 
> http://lenya.apache.org/docs/2_0_x/reference/resource-types.html#Formats
> 
> the presentation of a new resource is modified as
> follows:
> 
> Presentation
> To make your resources available as HTTP pages, you
> have to add the appropriate pipelines and XSLT
> stylesheets. In general, there are no restrictions.
> 
> If you derive your publication from the default
> publication, the pipelines have to be placed in
> <publication>/doctypes.xmap. The stylesheets are
> located in <publication>/xslt/ and are named
> <resource-type>2xhtml.xsl (e.g., profile2xhtml.xsl).
> The stylesheet is supposed to generate a valid XHTML
> fragment (in the XHTML namespace) with <div id="body">
> as the document element.
> 
> However there is no <publication>/doctypes.xmap in the
> default publication of the branch I just checked out
> today. 

The documentation was outdated. I updated it:

<quote>

The pipelines have to be placed in $MODULE_HOME/sitemap.xmap. The
stylesheets are typically located in $MODULE_HOME/xslt/ and named
{resource-type}2{format}.xsl  (e.g., profile2xhtml.xsl).

In the case of the xhtml format, the stylesheet is supposed to generate
a valid XHTML document (in the XHTML namespace). The output of other
formats depends on the purpose of the respective format.

</quote>

Thanks for reporting!

-- Andreas

-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


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


Re: Simple, application specific processing pipeline.

Posted by Nunez Steve <st...@yahoo.com>.
Andreas, et. al.,

Thanks for this. When you give the example of the
pipeline:

--- Andreas Hartmann <an...@apache.org> wrote:
> Basically, your publication pipeline might look like
> this:
> 
> <map:match pattern="**.xml">
>   <map:generate
>
src="lenya-document:{page-envelope:document-uuid}?format=..."/>
>   <map:serialize type="xml"/>
> </map:match>

do you mean that this should be located in the
$MODULE/sitemap.xmap, or elsewhere?

Cheers,
    - Steve Nunez


       
____________________________________________________________________________________
Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list&sid=396545433

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


Re: Resource Type Formats

Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann schrieb:
> Nunez Steve schrieb:
>> Hello Lenya Users,
>>
>> Following the suggestions of Andreas, I've created a
>> custom resource type and, using the default
>> publication templet, am able to display the contents
>> in the body (cmsbody?) of the default templet.
>>
>> As mentioned in previous messages, because the styling
>> for this site is done entirely in CSS, including the
>> navigation elements, I'm trying to remove the
>> navigational elements that are added by
>> page2xhtml.xsl, with the goal of having my page render
>> in the space just below the Lenya "File Edit Workflow
>> ..." menus.
>>
>> It appears that what I may need is a Resource Type
>> Format (please correct me if this is wrong), which is
>> described here:
>>
>> http://lenya.apache.org/docs/2_0_x/reference/resource-types.html#Formats
>>
>> This page states:
>>
>> "A resource type provides a set of formats to provide
>> different ways of presenting content documents. The
>> formats are defined in the resource type declaration:"
>>
>> Assuming that this means the *entire* display, and not
>> just the display of the cmsbody,
> 
> No, it means only the document content ("cmsbody").
> The navigation elements are generated by the navigation
> framework (sitetree module).

BTW, I added an image to illustrate the concept of formats.
It should be online after the next staging website update at

http://lenya.zones.apache.org/docu/docs/2_0_x/reference/resource-types.html#Formats

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


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


Re: Resource Type Formats

Posted by Andreas Hartmann <an...@apache.org>.
Nunez Steve schrieb:
> Hello Lenya Users,
> 
> Following the suggestions of Andreas, I've created a
> custom resource type and, using the default
> publication templet, am able to display the contents
> in the body (cmsbody?) of the default templet.
> 
> As mentioned in previous messages, because the styling
> for this site is done entirely in CSS, including the
> navigation elements, I'm trying to remove the
> navigational elements that are added by
> page2xhtml.xsl, with the goal of having my page render
> in the space just below the Lenya "File Edit Workflow
> ..." menus.
> 
> It appears that what I may need is a Resource Type
> Format (please correct me if this is wrong), which is
> described here:
> 
> http://lenya.apache.org/docs/2_0_x/reference/resource-types.html#Formats
> 
> This page states:
> 
> "A resource type provides a set of formats to provide
> different ways of presenting content documents. The
> formats are defined in the resource type declaration:"
> 
> Assuming that this means the *entire* display, and not
> just the display of the cmsbody,

No, it means only the document content ("cmsbody").
The navigation elements are generated by the navigation
framework (sitetree module).

> then this is what I
> want. It's still not clear to me where the pipeline
> begins and ends, so it's difficult to see where the
> page2xhtml stylesheet is actually being applied.
> 
> Assuming the above is correct, then what exactly does
> the format specification lines mean:
> 
> <format name="xhtml"
> uri="cocoon://modules/profile/xhtml.xml"/>
>   <format name="include"
> uri="cocoon://modules/profile/xhtml-inline.xml"/
> 
> ?

They declare different formats (presentation options) which
are available for your resource type. For a "person profile"
resource type, this might be

- XHTML for web pages
- XHTML snippets ("teasers") to be included in other pages
- VCard text files
- PDFs
- ...


> I can see that they're cocoon modules,

Actually, they define pipeline URLs to be called to obtain
the formatted document from.

> but they refer
> to the name given in the example "profile". Its not
> specified what file these lines are in either.

They're in the resource type declaration (resourcetype-profile.xconf).
I added this info to the docs.


> Continuing with the example, it states:
> 
> "This URI is matched inside the module sitemap (in our
> case, modules/profile/sitemap.xmap)"
> 
> followed by an excerpt of a sitemap.xmap file, however
> this example differs from the one given in the
> tutorial. In any case, its not clear how the URI is
> matched in this file.

It's up to you how you match the URIs. There is no standard,
the documentation just shows some examples. BTW, the matchers
in the resource type docs and in the example don't differ that
much - one matches the URI without parameters and one matches
the URI with parameters.


> Continuing a bit further, there's a statement:
> 
> "To request a formatted document, you can use the
> format parameter of the site: and lenya-document:
> protocols:"
> 
> followed by another excerpt from a file which is not
> specified. What file is displayed here (doing some
> kind of aggration).

The sitemap file is not specified because it is just an
example. It can be an arbitrary sitemap.


> Finally, there's an example of using this with
> dublincore, which is not clear at all (at least to
> someone new to Lenya). For example, what file is the
> line:
> 
> <map:generate
> src="lenya-document:{page-envelope:uuid}?format={dublincore:format}"/>
> 
> to be placed in?

Again, you can use this call in an arbitrary sitemap,
wherever you need to generate the formatted document.


> Assuming that I'm heading in the right direction,
> these examples appear to do what I want, but assume
> that the reader is already familar with Lenya. An
> expanded explanation would help a great deal
> (something I'm willing to do, provided I can
> understand it myself first!).

I hope my comments were a bit helpful ...
Maybe you'd like to get the documentation from SVN so that
you always have the latest changes.

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


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


Resource Type Formats

Posted by Nunez Steve <st...@yahoo.com>.
Hello Lenya Users,

Following the suggestions of Andreas, I've created a
custom resource type and, using the default
publication templet, am able to display the contents
in the body (cmsbody?) of the default templet.

As mentioned in previous messages, because the styling
for this site is done entirely in CSS, including the
navigation elements, I'm trying to remove the
navigational elements that are added by
page2xhtml.xsl, with the goal of having my page render
in the space just below the Lenya "File Edit Workflow
..." menus.

It appears that what I may need is a Resource Type
Format (please correct me if this is wrong), which is
described here:

http://lenya.apache.org/docs/2_0_x/reference/resource-types.html#Formats

This page states:

"A resource type provides a set of formats to provide
different ways of presenting content documents. The
formats are defined in the resource type declaration:"

Assuming that this means the *entire* display, and not
just the display of the cmsbody, then this is what I
want. It's still not clear to me where the pipeline
begins and ends, so it's difficult to see where the
page2xhtml stylesheet is actually being applied.

Assuming the above is correct, then what exactly does
the format specification lines mean:

<format name="xhtml"
uri="cocoon://modules/profile/xhtml.xml"/>
  <format name="include"
uri="cocoon://modules/profile/xhtml-inline.xml"/

?

I can see that they're cocoon modules, but they refer
to the name given in the example "profile". Its not
specified what file these lines are in either.

Continuing with the example, it states:

"This URI is matched inside the module sitemap (in our
case, modules/profile/sitemap.xmap)"

followed by an excerpt of a sitemap.xmap file, however
this example differs from the one given in the
tutorial. In any case, its not clear how the URI is
matched in this file.

Continuing a bit further, there's a statement:

"To request a formatted document, you can use the
format parameter of the site: and lenya-document:
protocols:"

followed by another excerpt from a file which is not
specified. What file is displayed here (doing some
kind of aggration).

Finally, there's an example of using this with
dublincore, which is not clear at all (at least to
someone new to Lenya). For example, what file is the
line:

<map:generate
src="lenya-document:{page-envelope:uuid}?format={dublincore:format}"/>

to be placed in?

Assuming that I'm heading in the right direction,
these examples appear to do what I want, but assume
that the reader is already familar with Lenya. An
expanded explanation would help a great deal
(something I'm willing to do, provided I can
understand it myself first!).

Cheers,
    - Steve


       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

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


New Resource Type Presentation

Posted by Nunez Steve <st...@yahoo.com>.
Hello Lenya Users,

According to the documentation found at:

http://lenya.apache.org/docs/2_0_x/reference/resource-types.html#Formats

the presentation of a new resource is modified as
follows:

Presentation
To make your resources available as HTTP pages, you
have to add the appropriate pipelines and XSLT
stylesheets. In general, there are no restrictions.

If you derive your publication from the default
publication, the pipelines have to be placed in
<publication>/doctypes.xmap. The stylesheets are
located in <publication>/xslt/ and are named
<resource-type>2xhtml.xsl (e.g., profile2xhtml.xsl).
The stylesheet is supposed to generate a valid XHTML
fragment (in the XHTML namespace) with <div id="body">
as the document element.

However there is no <publication>/doctypes.xmap in the
default publication of the branch I just checked out
today. 

Is this file to be created, with only my custom
resource pipeline in it?

Regards,
    - Steve Nunez



       
____________________________________________________________________________________
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php

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


Re: Simple, application specific processing pipeline.

Posted by Andreas Hartmann <an...@apache.org>.
Hi Steve,

Nunez Steve schrieb:
> Following up on my own message, I can think of an
> additional use case for Lenya that does not involve
> navigational elements being added by the foo2xhtml.xsl
> stylesheet: machine readable content.

yes, this is a typical application, and - thanks to
the Cocoon architecture - very easy to implement.

> One of the applications that we'd like to use Lenya
> for is to maintain content that will be read by
> machine using XML-RPC.
> 
> In this use case, the 'live' site will simply be the
> XML files. We will also use parameterized URL access
> to render the pages for humans by use of stylesheet.
> In  this case the stylesheet for the human readable
> version will not contain any navigation widgets
> because the machine readable XML won't have that
> information.
> 
> Any pointers to a simple example of the pipeline,
> without any Lenua elements or processing in it would
> be very helpful.

You'll find plenty of infos about pipeline structures
in the Cocoon documentation.

I'd recommend to use a resource type format for this purpose
(http://lenya.apache.org/docs/2_0_x/reference/resource-types.html#Formats).

Basically, your publication pipeline might look like this:

<map:match pattern="**.xml">
  <map:generate
src="lenya-document:{page-envelope:document-uuid}?format=..."/>
  <map:serialize type="xml"/>
</map:match>

HTH,
-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


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


Simple, application specific processing pipeline.

Posted by Nunez Steve <st...@yahoo.com>.
Following up on my own message, I can think of an
additional use case for Lenya that does not involve
navigational elements being added by the foo2xhtml.xsl
stylesheet: machine readable content.

One of the applications that we'd like to use Lenya
for is to maintain content that will be read by
machine using XML-RPC.

In this use case, the 'live' site will simply be the
XML files. We will also use parameterized URL access
to render the pages for humans by use of stylesheet.
In  this case the stylesheet for the human readable
version will not contain any navigation widgets
because the machine readable XML won't have that
information.

Any pointers to a simple example of the pipeline,
without any Lenua elements or processing in it would
be very helpful.

Regards,
    - Steve



--- Nunez Steve <st...@yahoo.com> wrote:

> Lenya Users (and Andreas),
> 
> I think I see the problem here. It appears that
> Lenya,
> at least in the default configuration, is placing
> the
> navigation elements into the XHTML via the XSLT.
> Looking at the included stylesheet, page2xhtml, the
> 'structure' of the page is constructed with a table
> to
> place the various navigation elements in the
> required
> locations.
> 
> This is one common way of structuring HTML pages,
> but
> not the only way. If you look at the source code for
> the Illation website, you'll see that there is *no*
> structure in the XHTML -- all of the positioning and
> layout of navigational elements is done with CSS.
> 
> Has anyone else used Lenya in a configuration where
> the  entire page layout is controlled by CSS?
> 
> As a more practical question, how exactly can we
> remove all of the default Lenya publication XSLT
> from
> the pipeline, and implement only a single
> transformation?
> 
> E.g.
> 
> XML --XSLT--> XHTML Strict ----> Browser (using CSS)
> 
> Regards,
>     - Steve Nunez
> 
> --- Andreas Hartmann <an...@apache.org> wrote:
> 
> > If you really want to use your XSLTs as they are,
> > you can remove the
> > pipelines you mentioned above and put your XSLTs
> in
> > your publication.
> > 
> > But this is not the way Lenya was designed to be
> > used.
> > I'd recommend that you use the navigation
> framework
> > to generate your
> > navigation elements (in the case of the illation
> > website that would
> > be the horizontal menus at the top of the page and
> > the "Products" menus
> > at the right hand side of the page) and use the
> > XSLTs in the publication
> > to assemble the page.
>  
> 
> 
> 
>        
>
____________________________________________________________________________________
> Boardwalk for $500? In 2007? Ha! Play Monopoly Here
> and Now (it's updated for today's economy) at Yahoo!
> Games.
>
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
>  
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@lenya.apache.org
> For additional commands, e-mail:
> user-help@lenya.apache.org
> 
> 



       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

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


Re: Importing an existing XML/XSLT/CSS website?

Posted by Nunez Steve <st...@yahoo.com>.
Lenya Users (and Andreas),

I think I see the problem here. It appears that Lenya,
at least in the default configuration, is placing the
navigation elements into the XHTML via the XSLT.
Looking at the included stylesheet, page2xhtml, the
'structure' of the page is constructed with a table to
place the various navigation elements in the required
locations.

This is one common way of structuring HTML pages, but
not the only way. If you look at the source code for
the Illation website, you'll see that there is *no*
structure in the XHTML -- all of the positioning and
layout of navigational elements is done with CSS.

Has anyone else used Lenya in a configuration where
the  entire page layout is controlled by CSS?

As a more practical question, how exactly can we
remove all of the default Lenya publication XSLT from
the pipeline, and implement only a single
transformation?

E.g.

XML --XSLT--> XHTML Strict ----> Browser (using CSS)

Regards,
    - Steve Nunez

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

> If you really want to use your XSLTs as they are,
> you can remove the
> pipelines you mentioned above and put your XSLTs in
> your publication.
> 
> But this is not the way Lenya was designed to be
> used.
> I'd recommend that you use the navigation framework
> to generate your
> navigation elements (in the case of the illation
> website that would
> be the horizontal menus at the top of the page and
> the "Products" menus
> at the right hand side of the page) and use the
> XSLTs in the publication
> to assemble the page.
 



       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

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


Re: Importing an existing XML/XSLT/CSS website?

Posted by Andreas Hartmann <an...@apache.org>.
Jeremy Tan schrieb:
> Hi Andreas,
> 
> I just found some information about removing the navigation framework on
> the Lenya website. Its for version 1.2 though. I then adapted the
> infomation gound there and then commented out the following lines:
> 
>       <map:part
> src="cocoon:/navigation-element/breadcrumb/{2}/{3}/{5}/{6}/{7}"/>
>     <map:part src="cocoon:/navigation-element/tabs/{2}/{3}/{5}/{6}/{7}"/>
>     <map:part src="cocoon:/navigation-element/menu/{2}/{3}/{5}/{6}/{7}"/>
>         <map:part
> src="cocoon:/navigation-element/search/{2}/{3}/{5}/{6}/{7}"/>
>     <map:part
> src="cocoon://modules/languageselector/text-none/flagsize-13"/>
> 
> Is there anyway where I can just remove the whole navigation framework
> and just use our XML and XSLT directly?

If you really want to use your XSLTs as they are, you can remove the
pipelines you mentioned above and put your XSLTs in your publication.

But this is not the way Lenya was designed to be used.
I'd recommend that you use the navigation framework to generate your
navigation elements (in the case of the illation website that would
be the horizontal menus at the top of the page and the "Products" menus
at the right hand side of the page) and use the XSLTs in the publication
to assemble the page.

More info:
http://lenya.apache.org/docs/modules/sitetree/index.html

HTH,
-- Andreas

-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


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


Re: Importing an existing XML/XSLT/CSS website?

Posted by Jeremy Tan <je...@illation.com.au>.
Hi Andreas,

I just found some information about removing the navigation framework on 
the Lenya website. Its for version 1.2 though. I then adapted the 
infomation gound there and then commented out the following lines:

   	<map:part 
src="cocoon:/navigation-element/breadcrumb/{2}/{3}/{5}/{6}/{7}"/>
	<map:part src="cocoon:/navigation-element/tabs/{2}/{3}/{5}/{6}/{7}"/>
	<map:part src="cocoon:/navigation-element/menu/{2}/{3}/{5}/{6}/{7}"/>
         <map:part 
src="cocoon:/navigation-element/search/{2}/{3}/{5}/{6}/{7}"/>
	<map:part src="cocoon://modules/languageselector/text-none/flagsize-13"/>

Is there anyway where I can just remove the whole navigation framework 
and just use our XML and XSLT directly?

-- 
Cheers,
Jeremy Tan

================================================================
"Most people make the mistake of thinking design is what it looks
like, that's not what we think design is. It's not just what it looks
like and feels like. Design is how it works."
                               -- Steve Jobs
================================================================


Re: Importing an existing XML/XSLT/CSS website?

Posted by Jeremy Tan <je...@illation.com.au>.
Hi Andreas,

I am having a similar problem as Steve. I am using Lenya 2.0 (SVN) and I 
have created a resource type for the XML of the document that I am 
trying to import by following the tutorials. At this stage though, I'm 
not trying to import an entire site; I just want to display a single 
page (the home page) via a XSLT pipeline.

The problem I have is that after the page is generated using the XSLT, 
the default Lenya menus and tabs remain. Our page is displayed in a 
'frame' beneath and to the side of the Lenya menus and tabs.

After searching various sources on the web over the course of a few 
days, I have a few theories about why this is:

1. I need to overwrite some XSLTs in the default lenya publication so 
that our own XSLT & CSS are the only ones used.

or

2. I need to remove the Lenya templet that was somehow inherited when I 
created the publication and not use any templet at all.

The web site in question is available here:

	http://www.illation.com.sg

We already have our RNGs and XSLTs & CSS defined.

Does anyone have any theories on why this is? A 'ground' up tutorial 
that gives a simple example of a XML page being transformed and 
displayed would be helpful.

I've read about the Coocoon pipeline, but just can't quite work out how 
this is linked in or accessed through Lenya.

Cheers,
Jeremy Tan

Andreas Hartmann wrote:
> Hi Steve,
> 
> Nunez Steve schrieb:
>> G'Day Gentlemen,
>>
>> I have an existing website that is composed of XML
>> files, using a custom schema, that is styled by an
>> XSLT stylesheet into XHTML, and then finally presented
>> by way of external CSSs. The entire process is driven
>> by 'make', and the system works quite well.
>>
>> It seemed upon first reading that importing this into
>> Lenya would be straightforward, however this has not
>> proven to be the case. I've been through all of the
>> documentation I can find, however I haven't read the
>> simplest use case:
>>
>> 1. Create an XML document instance & XSLT stylesheet
>> 2. Apply the stylesheet to the XML document
>> 3. Display the results in Lenya.
>>
>> Can anyone point me to the simplest way to do this?
>> Given that we've already got the 'hard' part done --
>> created debugged XML/XSLT/CSS, it should be a matter
>> of using Lenya to manage this. 
> 
> what you have to do is
> 
> 1. create a resource type for your specific XML
> 2. find a way to import your existing content
> 
> For task 1, take a look at these tutorials, depending on
> the Lenya version you want to use:
> 
> http://lenya.apache.org/docs/1_2_x/how-to/custom_resourcetype.html
> http://lenya.apache.org/docs/2_0_x/tutorials/resourcetype/part1.html
> 
> For task 2, it depends on the Lenya version.
> 
> With 1.2.x it might make sense to write an Ant task which creates
> the Lenya content directory structure and the workflow, revision
> etc. files.
> 
> With 2.0 you should use the API - the Import usecase will probably
> be a good starting point
>  (http://lenya.apache.org/apidocs/2.0/modules/export/index.html).
> You will have to customize it and extend the Importer class to meet
> your specific requirements.
> 
> HTH,
> 
> -- Andreas
> 

-- 
Cheers,
Jeremy Tan

================================================================
"Most people make the mistake of thinking design is what it looks
like, that's not what we think design is. It's not just what it looks
like and feels like. Design is how it works."
                               -- Steve Jobs
================================================================


Re: Importing an existing XML/XSLT/CSS website?

Posted by Andreas Hartmann <an...@apache.org>.
Hi Steve,

Nunez Steve schrieb:
> G'Day Gentlemen,
> 
> I have an existing website that is composed of XML
> files, using a custom schema, that is styled by an
> XSLT stylesheet into XHTML, and then finally presented
> by way of external CSSs. The entire process is driven
> by 'make', and the system works quite well.
> 
> It seemed upon first reading that importing this into
> Lenya would be straightforward, however this has not
> proven to be the case. I've been through all of the
> documentation I can find, however I haven't read the
> simplest use case:
> 
> 1. Create an XML document instance & XSLT stylesheet
> 2. Apply the stylesheet to the XML document
> 3. Display the results in Lenya.
> 
> Can anyone point me to the simplest way to do this?
> Given that we've already got the 'hard' part done --
> created debugged XML/XSLT/CSS, it should be a matter
> of using Lenya to manage this. 

what you have to do is

1. create a resource type for your specific XML
2. find a way to import your existing content

For task 1, take a look at these tutorials, depending on
the Lenya version you want to use:

http://lenya.apache.org/docs/1_2_x/how-to/custom_resourcetype.html
http://lenya.apache.org/docs/2_0_x/tutorials/resourcetype/part1.html

For task 2, it depends on the Lenya version.

With 1.2.x it might make sense to write an Ant task which creates
the Lenya content directory structure and the workflow, revision
etc. files.

With 2.0 you should use the API - the Import usecase will probably
be a good starting point
 (http://lenya.apache.org/apidocs/2.0/modules/export/index.html).
You will have to customize it and extend the Importer class to meet
your specific requirements.

HTH,

-- Andreas

-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


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