cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: Ask help for "Cinclude" implement
Date Tue, 20 Jan 2004 22:29:43 GMT
On 20.01.2004 14:46, Jian Dai wrote:

> Hi, Joery:

It's a 'g' at the end ... Joerg.

> 1. There is no error message. The system just treated them as normal xml
> tag.
> In my example,
> 	xmlns:cinclude="http://apache.org/cocoon/include/1.0">
> 
>>> <cinclude:src>XMLURI</cinclude:src>
>>> <cinclude:parameters>
>>>   <cinclude:parameter>
>>>     <cinclude:name>paraone</cinclude:name>
>>>     <cinclude:value>ValueforParaOne</include:value>
>>>   </cinclude:parameter>
>>>   .............................
>>> </cinclude:parameters>
>>></cinclude:includexml>
> 
> 
> I would get a string like "XMLURL paraone ValueforParaOne". Just like I
> simply
> put <template:value-of> there.

Sounds like a built-in tempaltes of XSLT, they put only the text values 
of the nodes out.

> 2. I use Cocoon 2.0.3. I have checked the source codes for cinclude
> transformer under
> my version. It does have those attributes.

Hmm, 2.0.3, let me see ... ah, it's a version problem. The functionality 
you want to use was added even after release of 2.0.4:
http://cvs.apache.org/viewcvs.cgi/cocoon-2-historical/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java?r1=1.6&r2=1.6.2.1&diff_format=h
You must use Cocoon 2.0.5-dev from CVS for using this feature. There are 
also CVS snapshots available if you don't want to access CVS directly:
http://cvs.apache.org/snapshots/cocoon-2.0/

> 3. I did use <cinclude:src> in my code. Sorry for the mistype here

I thought it ...

> Here is a clue from that document. It said "this is currently not supported
> by the caching cinclude transformer". Do you know the difference between
> "caching" and "not caching"
> cinclude transformer and how to change them?

In 2.0.3 and 2.0.4 there is an extra component called 
CachingCIncludeTransformer. The first version including caching and this 
extra syntax is delivered with RELEASE_2_1_M_1:
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java

Joerg

> -----Original Message-----
> From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]

> 
>>Hi, Joery:
>>
>>I am sorry that I did not make my problem more clearer.
> 
> 
> No problem, that's communication :)
> 
> 
>>As you mentioned, my problem is that my cinclude transformer COULD NOT
>>understand the notation for the first alternative but I cannot figure
>>out the reason why.
> 
> 
> I see. Do you get an error message or does it "just not work"?
> 
> 
>>I have read the articile you mentioned(As the matter of face, I just
>>get the idea from there) but still haven't a clue. Do you have any idea
>>about that. Can it be the version problem?
> 
> 
> Of course it can. So it's interesting to know your exact version of
> Cocoon. You only wrote 2.0, but I guess you are not using 2.0, but any
> 2.0.x.
> 
> BTW, related to the documentation (the link I sent, I never used the
> extended notation myself) it must be <cinclude:src> instead of simple
> <src> as you wrote below. Might be only here in the mail, but maybe you
> have a closer look again.
> 
> Joerg
> 
> 
>>-----Original Message-----
>>From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
>>
>>
>>On 20.01.2004 12:25, Jian Dai wrote:
>>
>>
>>
>>>Hi, all:
>>>
>>>I am tring to use cinclude to include some xml frags in main page and I
>>
>>want
>>
>>
>>>to pass some
>>>parameter to that frag. I was learned that I could use cinclude in
>>
>>following
>>
>>
>>>format
>>>
>>><cinclude:includexml
>>
>>xmlns:cinclude="http://apache.org/cocoon/include/1.0">
>>
>>> <src>XMLURI</src>
>>> <cinclude:parameters>
>>>   <cinclude:parameter>
>>>     <cinclude:name>paraone</cinclude:name>
>>>     <cinclude:value>ValueforParaOne</include:value>
>>>   </cinclude:parameter>
>>>   .............................
>>> </cinclude:parameters>
>>></cinclude:includexml>
>>>
>>>When I added this code frag into xsp for main page, the included XML could
>>>not be called. My
>>>xsp page simple treated thoese tag as normal xml tag instead of the
>>>attributes for "cinclude"
>>>transformer.
>>>
>>>But if I use a normal cinlude format like
>>>	<cinclude:include src="XMLURI?paraone=ValueforParaOne" />
>>>Then, the included XML can be called without problem.
>>
>>
>>If I understand you correctly you have two alternatives to use cinclude
>>and tried them by putting them into XSP. The output of XSP is of course
>>that what you add to it in XML tags form. Nothing will happen or will be
>>changed with it until you add a cinclude transformer to the pipeline. So
>>the only question is whether the cinclude transformer understands both
>>different notations. Following the documentation both should work:
>>
> 
> http://cocoon.apache.org/2.0/userdocs/transformers/cinclude-transformer.html
> 
>>.
>>
>>The problem I have with your error description is that you don't say
>>what does not work exactly and that you write "the included XML
>>can/could not be called" - what ever that means.
>>
>>Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message