You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sreedhar Chintalapaty <sc...@ptc.com> on 2002/03/06 20:17:25 UTC
CInclude Question
GlacierI have a strange problem: my CInclude seems to work a little too
enthusiastically!
I thought the URI http://myServer/myApp/cinclude/including is supposed to
show "Including includes Included! " once, but it's showing it twice!
Here's what I have:
- In Site Map:
<map:match pattern="cinclude/*">
<map:generate src="control/config/{1}.xml"/>
<map:transform type="cinclude"/>
<map:transform src="view/xsl/html/{1}.xsl"/>
<map:serialize/>
</map:match>
- In the Folder control/config, I have two files - including.xml and
included.xml.
including.xml
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:cinclude="http://apache.org/cocoon/include/1.0">
<title>Hello</title>
<content>
<para>Including includes </para>
<cinclude:include
src="http://schintalapat03l.ptcnet.ptc.com:8080/cocoon/gvs/included.xml"/>
</content>
</page>
included.xml
<?xml version="1.0"?>
<p>
<strong>
Included!
</strong>
</p>
- In the Folder view/xsl/html, I have two files - including.xsl and
included.xsl.
including.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="html" indent="yes"/>
<xsl:template match="//">
<xsl:value-of select="*" />
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
including.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="html" indent="yes"/>
<xsl:template match="//">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
Please pass on any suggestions on how I should debug this...
Thanks, and Best Regards,
Sreedhar Chintalapaty
Consultant, ProjectLink Services,
PTC 140 Kendrick St., Needham MA 02494
_______________________________________________________________________
A computer is like an Old Testament god, with a lot of rules and no mercy
RE: CInclude Question
Posted by Sreedhar Chintalapaty <sc...@ptc.com>.
Thanks Roman, it was exactly what I was doing wrong. (as you can see, I am
new to XSL too)
Sreedhar
-----Original Message-----
From: KOZLOV Roman [mailto:r-kozlov@opencascade.com]
Sent: Thursday, March 07, 2002 2:34 AM
To: Cocoon users mail list
Subject: Re: CInclude Question
Hello Sreedhar,
Your problem is in your xsl. Just try to comment cinclude:include
element in your including.xml and you'll get doubled text as a result of
request.
So it is necessary to fix xsl first without cinclude:include.
By the way, for me your example doesn't work at all until commenting
cinclude:include.
Best regards.
Roman
Sreedhar Chintalapaty wrote:
> I have a strange problem: my CInclude seems to work a little too
> enthusiastically!I thought the URI
> http://myServer/myApp/cinclude/including is supposed to
> show "Including includes Included! " once, but it's showing it
> twice!Here's what I have:- In Site Map:
>
> <map:match pattern="cinclude/*">
> <map:generate src="control/config/{1}.xml"/>
> <map:transform type="cinclude"/>
> <map:transform src="view/xsl/html/{1}.xsl"/>
> <map:serialize/>
> </map:match>
>
> - In the Folder control/config, I have two files - including.xml and
> included.xml.
>
> including.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <page xmlns:cinclude="http://apache.org/cocoon/include/1.0">
> <title>Hello</title>
> <content>
> <para>Including includes </para>
> <cinclude:include
>
src="http://schintalapat03l.ptcnet.ptc.com:8080/cocoon/gvs/included.xml"/>
> </content>
> </page>
>
> included.xml
> <?xml version="1.0"?>
> <p>
> <strong>
> Included!
> </strong>
> </p>
>
> - In the Folder view/xsl/html, I have two files - including.xsl and
> included.xsl.
>
> including.xsl
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <xsl:output method="html" indent="yes"/>
> <xsl:template match="//">
> <xsl:value-of select="*"/>
> <xsl:apply-templates/>
> </xsl:template>
> </xsl:stylesheet>
> including.xsl
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <xsl:output method="html" indent="yes"/>
> <xsl:template match="//">
> <xsl:apply-templates/>
> </xsl:template>
> </xsl:stylesheet>
>
> Please pass on any suggestions on how I should debug this...Thanks,
> and Best Regards,
>
> Sreedhar Chintalapaty
> Consultant, ProjectLink Services,
> PTC � 140 Kendrick St., Needham MA
>
02494_______________________________________________________________________
A
> computer is like an Old Testament god, with a lot of rules and no
> mercy
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: CInclude Question
Posted by KOZLOV Roman <r-...@opencascade.com>.
Hello Sreedhar,
Your problem is in your xsl. Just try to comment cinclude:include
element in your including.xml and you'll get doubled text as a result of
request.
So it is necessary to fix xsl first without cinclude:include.
By the way, for me your example doesn't work at all until commenting
cinclude:include.
Best regards.
Roman
Sreedhar Chintalapaty wrote:
> I have a strange problem: my CInclude seems to work a little too
> enthusiastically!I thought the URI
> http://myServer/myApp/cinclude/including is supposed to
> show "Including includes Included! " once, but it's showing it
> twice!Here's what I have:- In Site Map:
>
> <map:match pattern="cinclude/*">
> <map:generate src="control/config/{1}.xml"/>
> <map:transform type="cinclude"/>
> <map:transform src="view/xsl/html/{1}.xsl"/>
> <map:serialize/>
> </map:match>
>
> - In the Folder control/config, I have two files - including.xml and
> included.xml.
>
> including.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <page xmlns:cinclude="http://apache.org/cocoon/include/1.0">
> <title>Hello</title>
> <content>
> <para>Including includes </para>
> <cinclude:include
> src="http://schintalapat03l.ptcnet.ptc.com:8080/cocoon/gvs/included.xml"/>
> </content>
> </page>
>
> included.xml
> <?xml version="1.0"?>
> <p>
> <strong>
> Included!
> </strong>
> </p>
>
> - In the Folder view/xsl/html, I have two files - including.xsl and
> included.xsl.
>
> including.xsl
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <xsl:output method="html" indent="yes"/>
> <xsl:template match="//">
> <xsl:value-of select="*"/>
> <xsl:apply-templates/>
> </xsl:template>
> </xsl:stylesheet>
> including.xsl
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <xsl:output method="html" indent="yes"/>
> <xsl:template match="//">
> <xsl:apply-templates/>
> </xsl:template>
> </xsl:stylesheet>
>
> Please pass on any suggestions on how I should debug this...Thanks,
> and Best Regards,
>
> Sreedhar Chintalapaty
> Consultant, ProjectLink Services,
> PTC 140 Kendrick St., Needham MA
> 02494_______________________________________________________________________A
> computer is like an Old Testament god, with a lot of rules and no
> mercy
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>