You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Robin Green <gr...@hotmail.com> on 2000/11/06 01:41:18 UTC
Re: Cocoon-BASICS (could someone look on my listings and say what's m y fault, please)
The order of the processing instructions does matter - yours are completely
messed up. They currently say XSP->XSLT->XSP which is illegal (you can't run
XSP twice on the same request) but they never get past the XSP stage because
there is no XSP in your content page!
If you want to split content/logic/design, follow the example in
samples/xsp/clean-page, and make sure your processing instructions and
xsl:processing-instructions are the same as in that.
Ahmet Devrim HC <ah...@headcrash.de> wrote:
> I try out the basic-idea of cocoon (split content/logic/design) but I
>get at last a XML-output on my browser.
>
>
>
>THANX a lot of spending time for my Problem!
>greetings to all in this mailinglist...
>
>Ahmet D.
>
>
>This is my XML-file called "hello3.xml" I'am calling from the browser using
>Port :8080 :
>(I think this should be my content file)
>
><?xml version="1.0"?>
>
><?cocoon-process type="xsp"?>
>
><?cocoon-process type="xslt"?>
><?xml-stylesheet href="hello3-xsp.xsl" type="text/xsl"?>
>
><xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
>
> <seite>
> <titel>Hello World!</titel>
> <inhalt>
> <paragraph>This is my first own Cocoon page, width a time/date
>output!<datum format="test"/></paragraph>
> </inhalt>
> </seite>
>
></xsp:page>
>
>This is my XSP-file called "hello3-xsp.xsl" called out of hello3.xml:
>(..., this my logic-sheet, ...)
>
><?xml version="1.0"?>
>
><xsl:stylesheet
> xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
> xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> xmlns:example="http://www.plenix.com/DTD/XSP/Example"
> >
>
> <xsl:template match="xsp:page">
> <xsl:processing-instruction
>name="cocoon-process">type="xsp"</xsl:processing-instruction>
> <xsl:processing-instruction
>name="cocoon-process">type="xslt"</xsl:processing-instruction>
> <xsl:processing-instruction name="xml-stylesheet">href="hello2.xsl"
>type="text/xsl"</xsl:processing-instruction>
>
> <xsp:page language="java"
>xmlns:xsp="http://www.apache.org/1999/XSP/Core">
> <xsl:copy>
> <xsl:apply-templates select="@*|node()"/>
> </xsl:copy>
> <xsp:logic>
> Date now = new Date();
> </xsp:logic>
> <xsl:copy>
> <xsl:apply-templates/>
> </xsl:copy>
> </xsp:page>
> </xsl:template>
>
> <xsl:template match="@*|node()" priority="-1">
> <xsl:copy>
> <xsl:apply-templates select="@*|node()"/>
> </xsl:copy>
> </xsl:template>
>
> <xsl:template match="datum">
> <xsp:expr>now</xsp:expr>
> </xsl:template>
>
></xsl:stylesheet>
>
>
>
>
>
>This is my XSL-file called "hello2html.xsl" to translate in HTML:
>(... and this should be my design file)
>
><?xml version="1.0"?>
>
><?cocoon-process type="xsp"?>
>
><xsl:stylesheet version="1.0"
>xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
> <xsl:template match="seite">
> <xsl:processing-instruction
>name="cocoon-format">type="text/html"</xsl:processing-instruction>
> <html>
> <head>
> <title>
> <xsl:value-of select="title"/>
> </title>
> </head>
> <body bgcolor="#ffffff">
> <xsl:apply-templates/>
> </body>
> </html>
> </xsl:template>
>
> <xsl:template match="titel">
> <h1 align="center">
> <xsl:apply-templates/>
> </h1>
> </xsl:template>
>
> <xsl:template match="paragraph">
> <p align="center">
> <i>
> <xsl:apply-templates/>
> </i>
> </p>
> </xsl:template>
>
></xsl:stylesheet>
>
>
>
>
>THANX a lot of spending time for my Problem!
>greetings to all in this mailinglist...
>
>Ahmet D.
>
><< hello3-xsp.xsl >>
><< hello2.xsl >>
><< hello3.xml >>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
Re: Cocoon-BASICS (could someone look on my listings and say what's m y
fault, please)
Posted by Helen Pugmire <pu...@bellatlantic.net>.
unsubscribe
Robin Green wrote:
> The order of the processing instructions does matter - yours are completely
> messed up. They currently say XSP->XSLT->XSP which is illegal (you can't run
> XSP twice on the same request) but they never get past the XSP stage because
> there is no XSP in your content page!
>
> If you want to split content/logic/design, follow the example in
> samples/xsp/clean-page, and make sure your processing instructions and
> xsl:processing-instructions are the same as in that.
>
> Ahmet Devrim HC <ah...@headcrash.de> wrote:
> > I try out the basic-idea of cocoon (split content/logic/design) but I
> >get at last a XML-output on my browser.
> >
> >
> >
> >THANX a lot of spending time for my Problem!
> >greetings to all in this mailinglist...
> >
> >Ahmet D.
> >
> >
> >This is my XML-file called "hello3.xml" I'am calling from the browser using
> >Port :8080 :
> >(I think this should be my content file)
> >
> ><?xml version="1.0"?>
> >
> ><?cocoon-process type="xsp"?>
> >
> ><?cocoon-process type="xslt"?>
> ><?xml-stylesheet href="hello3-xsp.xsl" type="text/xsl"?>
> >
> ><xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
> >
> > <seite>
> > <titel>Hello World!</titel>
> > <inhalt>
> > <paragraph>This is my first own Cocoon page, width a time/date
> >output!<datum format="test"/></paragraph>
> > </inhalt>
> > </seite>
> >
> ></xsp:page>
> >
> >This is my XSP-file called "hello3-xsp.xsl" called out of hello3.xml:
> >(..., this my logic-sheet, ...)
> >
> ><?xml version="1.0"?>
> >
> ><xsl:stylesheet
> > xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
> > xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> > xmlns:example="http://www.plenix.com/DTD/XSP/Example"
> > >
> >
> > <xsl:template match="xsp:page">
> > <xsl:processing-instruction
> >name="cocoon-process">type="xsp"</xsl:processing-instruction>
> > <xsl:processing-instruction
> >name="cocoon-process">type="xslt"</xsl:processing-instruction>
> > <xsl:processing-instruction name="xml-stylesheet">href="hello2.xsl"
> >type="text/xsl"</xsl:processing-instruction>
> >
> > <xsp:page language="java"
> >xmlns:xsp="http://www.apache.org/1999/XSP/Core">
> > <xsl:copy>
> > <xsl:apply-templates select="@*|node()"/>
> > </xsl:copy>
> > <xsp:logic>
> > Date now = new Date();
> > </xsp:logic>
> > <xsl:copy>
> > <xsl:apply-templates/>
> > </xsl:copy>
> > </xsp:page>
> > </xsl:template>
> >
> > <xsl:template match="@*|node()" priority="-1">
> > <xsl:copy>
> > <xsl:apply-templates select="@*|node()"/>
> > </xsl:copy>
> > </xsl:template>
> >
> > <xsl:template match="datum">
> > <xsp:expr>now</xsp:expr>
> > </xsl:template>
> >
> ></xsl:stylesheet>
> >
> >
> >
> >
> >
> >This is my XSL-file called "hello2html.xsl" to translate in HTML:
> >(... and this should be my design file)
> >
> ><?xml version="1.0"?>
> >
> ><?cocoon-process type="xsp"?>
> >
> ><xsl:stylesheet version="1.0"
> >xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> >
> > <xsl:template match="seite">
> > <xsl:processing-instruction
> >name="cocoon-format">type="text/html"</xsl:processing-instruction>
> > <html>
> > <head>
> > <title>
> > <xsl:value-of select="title"/>
> > </title>
> > </head>
> > <body bgcolor="#ffffff">
> > <xsl:apply-templates/>
> > </body>
> > </html>
> > </xsl:template>
> >
> > <xsl:template match="titel">
> > <h1 align="center">
> > <xsl:apply-templates/>
> > </h1>
> > </xsl:template>
> >
> > <xsl:template match="paragraph">
> > <p align="center">
> > <i>
> > <xsl:apply-templates/>
> > </i>
> > </p>
> > </xsl:template>
> >
> ></xsl:stylesheet>
> >
> >
> >
> >
> >THANX a lot of spending time for my Problem!
> >greetings to all in this mailinglist...
> >
> >Ahmet D.
> >
> ><< hello3-xsp.xsl >>
> ><< hello2.xsl >>
> ><< hello3.xml >>
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> >For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org