On 6/22/06, Bhavya Sharma <[EMAIL PROTECTED]> wrote:
I am facing the problem while intergrating the work with lenya, I want to
integrate my self written file sub.xml within lenya CMS
I have written the pipeline as below. It's working but it's not showing the
formatting. It is only showing the link and matter
I am assuming you are adding to Lenya1.2's publication-sitemap.xmap.
Please read this entire post before making any changes.
1. Multiple successful matches can confuse Cocoon. Nest your code
within the **.html match:
<map:match pattern="**.html">
<map:match pattern="*/sub.html">
<!-- Your code -->
...
</map:match>
<!-- Default code -->
<map:act type="language-exists">
...
</map:match>
2. Your call to the lenya-document-view pipeline is wrong:
You have:
<map:part src="cocoon:/lenya-document-view/content/live/sub1.xml"/>
The spec is:
<map:part
src="cocoon:/lenya-document-view/{area}/{doctype}/{page-envelope:document-path}"/>
It should be:
<map:part src="cocoon:/lenya-document-view/live/sub/sub1/index_en.xml"/>
This requires xslt/{doctype}2xhtml.xsl, so you need a
xslt/sub2xhtml.xsl. It may be easier to use the XML directly:
<map:part src="content/live/sub1/index_en.xml"/>
but then you would have to remove the namespaces. You can use the
standard xslt/xhtml2xhtml.xsl using:
<map:part src="cocoon:/lenya-document-view/live/xhtml/sub1/index_en.xml"/>
3. It looks like you want to use a different XSLT for a specific
document. That is possible without changing publication-sitemap.xmap.
Just add to parameter-doctype.xmap:
<map:match pattern="*/sub*.html">
<map:generate type="serverpages"
src="../../config/parameters/default.xsp">
<map:parameter name="value" value="sub"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
Add the xslt/sub2xhtml.xsl (just copy xslt/xhtml2xhtml.xsl) and
xslt/page2xhtml-sub.xsl files, and restart Lenya (because the doctype
for each Document is cached.).
solprovider
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]