cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: XML and XSL conversions
Date Tue, 22 Aug 2000 17:13:51 GMT
At 16:11 +0200 21/08/00, Christofer Dutz wrote:
>I've got some questions here. I have been working myself into Cocoon fro
>some time now and have started creating the framework for our
>buisnes-interneal intranet. All I want to do for now is create a
>collection of XSL documents which allow me to do tho folowing :
>I want to enable the user to create a new page by giving him a DTD ( or
>later an XSD ) and a stylesheet ( so far so good ) but now I want to put a
>table of contens inside the resulting HTML-page. I dont' want to tell the
>users to insert this and that statement to include the TOC ( which is
>stored in a separate XML-doc ) but want to design a XSL which generates a
>new XML-File which contains all the stuff for doing this.
>I simply wont get Cocoon to generate simple XML and I couldn't find out
>how to generate the cocoon processing instructions via xsl.

    <xsl:processing-instruction name="xml-stylesheet">href="page-html.xsl"

>Can anyone help me ? Or may there be a different, a better way ?

If you want to do the include in XSL you could use the document() function,
then just extract the Nodes you want. Or you might be able to setup a chain
of processing whereby the first StyleSheet creates an XInclude PI and
appropriate XInclude Tags and the last StyleSheet outputs your display

You also could also do it using XSP, include extra nodes from files using
<util:include-file/> or <fp:read/>. The downside is you would probably only
want one XSP to be serving multiple user files, you'd start having to put
parameters into people's URLs, which they might not like :)

Have a look in cocoon/samples/xsp the chain :

	clean-page.xml --> page-xsp.xsl --> page-html.xsl

It also provides clues for doing it in Java, you would not even need your
tags in the user file, just manipulate the DOM and pass it on :)

Hope this helps

regards Jeremy

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <>     		 <>
    <phone:+44.[0].20.7737.6831>        <>

View raw message