You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Torsten Schlabach <ts...@apache.org> on 2005/03/01 10:00:56 UTC
Re: Debugging the pipeline
You could also have a look here:
http://wiki.apache.org/lenya/PublicationSitemapEntryPoints
If I get you right, you got two problems:
- Finding the place in the pipeline to hook up to in order to find what
you want to find.
- How and where to actually write the content.
The problem with sending it right to your browser is that you probably
need to hook somewhere in between and as you can see from
http://wiki.apache.org/lenya/GetPageWalkthrough Lenya uses a system of
nested pipelines where
pipeline A calls
pipeline B calls
pipeline C
Read: The serialized result of C is processed by B which result is
processed by A and then sent back.
The http://wiki.apache.org/lenya/GetPageWalkthrough provides sort of a
top down view how to get from a URL to the file(s) beeing used as input
for rendering while you probably need more of a buttom up view like: I
have this file here which I have written. What transformations get
applied to it until it reached the browser window.
Whatever you do to the serializer of pipeline C you will not see its
output but its output after if ran trough the transformations of pipline
B and pipleline A (which does not yield the result you expect).
Unfortunately (which leads to maybe deepen my research a bit) you cannot
just call pipeline C directly in your browser, check it it does what it
is expected to, then call pipeline B directly in your browser, etc. It
would be nice if you could, but I think you cannot.
Now back to your very immediate issues (if you haven't solved them yet,
but also for the benefit of the archive readers):
- Regarding a hook to the pipeline, consider using Cocoon
SourceWritingTransformer. It is something like a tee for SAX pipelines,
in case you are on the Linux/Unix side of things. It will write anything
that passes it into a writeable source which in the easiest case can be
a file.
- The lowest hook in the food chain is in doctypes.xmap. Don't overlook
it, it's damn small. doctypes.xmap (in the default publication) has two
matchers blocks. The upper on is only used if you want to view a past
revision of a document, so this can be safely ignored in most cases. (At
least when debugging!)
- In the other one, the line
<map:generate src="content/{2}/{4}.xml"/>
reads you pure file from the filesystem.
Next comes the yourdoctype2xhtml transformation:
<map:transform src="xslt/{3}2xhtml.xsl">
<map:parameter name="rendertype" value="{1}"/>
<map:parameter name="nodeid"
value="{page-envelope:document-node-id}"/>
<map:parameter name="language"
value="{page-envelope:document-language}"/>
</map:transform>
<map:serialize type="xml"/>
If you put a source writing transformer here, you should see your
doctype rendered as a clean and valid XHTML page, but yet without
navigation.
All that actually happens later in publication-sitemap.xmap will be to
wrap the XHTML with the navigational framework and the page is ready for
display.
Hope this helps.
Regards,
Torsten
Andreas Hartmann schrieb:
> Mike M. wrote:
>
>>>> I think a View might help you out. Check out the documentation here:
>>>>
>>>> http://cocoon.apache.org/2.1/userdocs/concepts/views.html
>>>
>>>
>>> ...and here:
>>> http://wiki.apache.org/cocoon/DebuggingWithViews
>>>
>>
>>
>> Thanks for the pointers. The same problem exists though with views as
>> it does
>> with inserting a serializer. The issue is "where"?
>>
>> I thought that putting an xml serializer after the generator in
>> publication-sitemap would do the trick, but when I try it, I just get
>> the same
>> page I got without it. What I'm having a hard time with is
>> determining lenya's
>> pipeline process and where to stick the debugging in. Even with
>> views, you have
>> to know where in the pipeline to call the view.
>
>
> Maybe this helps:
>
> http://wiki.apache.org/lenya/GetPageWalkthrough
>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> 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: Debugging the pipeline
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
mike, you mentioned some debugging aids you came up with. can you add
them to the wiki?
--
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: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: Debugging the pipeline
Posted by "Mike M." <le...@mordent.com>.
Torsten Schlabach <tschlabach <at> apache.org> writes:
>
> - Regarding a hook to the pipeline, consider using Cocoon
> SourceWritingTransformer. It is something like a tee for SAX pipelines,
> in case you are on the Linux/Unix side of things. It will write anything
> that passes it into a writeable source which in the easiest case can be
> a file.
>
Hi,
I saw the SourceWritingTransformer in the cocoon docs, but couldn't figure out
how to use it. It looked like you needed to add not only the sourcewrite into
your pipeline, but also add special xml tags in the actual content to make it
work, but I got totally lost trying to determine what and where to put these
extra elements. There weren't any examples I could find.
Thanks!
-Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org