The transformer <map:transform src="styles/input-forms.xsl"/> doesn't need...
It's my mistake...
But the problem still exist.
<map:match pattern="main/form-template/*">
<map:generate type="jx" src="form-template/{1}.xml"/>
<map:serialize/>
</map:match>
Index.xml contains the header:
<?xml version="1.0" encoding="Windows-1251"?>
<head>
<logotype/>
<top-menu/>
</head>
Here is the file main.xsl:
<?xml version="1.0" encoding="windows-1251"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsp="http://apache.org/xsp">
<xsl:template name="root">
<xsl:apply-templates select="node()"/>
</xsl:template>
<xsl:template match="content">
<html>
<head>
<link href="style.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="head">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="logotype">
<div id="logo">
......
</div>
</xsl:template>
<xsl:template match="top-menu">
<div id="top-menu">
.......
</div>
</xsl:template>
<xsl:template match="main">
<div id="main">
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="current-experiments">
.....
</xsl:template>
<xsl:template match="@*|node()" priority="-1"><xsl:copy><xsl:apply-templates
select="@*|node()"/></xsl:copy></xsl:template>
</xsl:stylesheet>
-----Original Message-----
From: David Legg [mailto:[EMAIL PROTECTED]
Sent: Monday, September 01, 2008 2:40 AM
To: [email protected]
Subject: Re: cforms + javaflow + sitemap problem
Мария Григорьева wrote:
>
> <map:match pattern="*/*">
>
> <map:aggregate element="content">
>
> <map:part src="index.xml"/>
>
> <map:part src="cocoon:/main/{1}/{2}" element="main"/>
>
> </map:aggregate>
>
> <map:transform src="styles/main.xsl"/>
>
> <map:serialize type="html"/>
>
> </map:match>
>
> ……..
>
> <map:match pattern="main/experiments/*.do">
>
> <map:call function="{1}"/>
>
> </map:match>
>
> <map:match pattern="main/form-template/*">
>
> <map:generate type="jx" src="form-template/{1}.xml"/>
>
> <map:transform src="styles/input-forms.xsl"/>
>
> <map:serialize/>
>
> </map:match>
>
> ……………………..
>
> In my flowscript :
>
> sendPage("form-template/experiment-template", new
> VarMap().add("experiment", results));
>
> But at the output - I have double-header part! (The part <map:part
> src="index.xml"/> from the sitemap)
>
> I’ve have had this problem with the flowscript with the redirect function.
>
> So, I decide it with the help of param “false” --- redirect(“url”, false);
>
> Help please!!!
>
It looks like your route takes you through two separate stylesheets
(styles/main.xsl and styles/input-forms.xsl). Is it possible both these
stylesheets add a header? Or perhaps, index.xml contains a header?
Without more info it's difficult to tell.
Regards,
David Legg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]