Patches *should* be submitted to Bugzilla and hence you should catch the 
postings here.
You could also join the Cocoon-cvs mailing list (see webpage for 
details) or catch it on
gmane.org (news->mail->news bridge).  The CVS list is commits, the 
bugzilla mails are patches.

Its a one liner if you want to fix it yourself and recompile:
(someone pointed this out to me but I thought they were wrong....sorry I 
was wrong)
in 
xml-cocoon2/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java:

            } else {
                  // do nothing, will result in the inclusion of the whole
                  // document
            }

               this.sourceResolver.toSAX(source, consumer);

should read:

            } else {
                  // Normal flow this will result in the inclusion of the whole
                  // document
               this.sourceResolver.toSAX(source, consumer);
            }

I've tested it locally and it works nicely.  In a few weeks I'm going to do some 
serious
refactoring of both of these to use the same code base as folows:

CIncludeTransformer ------------- inherit from -------- IncludeTransformer
XIncludeTransformer /

XInclude and CInclude transformers will be deprecated, and you'll be able to just use 
the
IncludeTransformer for either.  The behavior will be different based on how you 
configure the IncludeTransformer 
or the inherited versions (for backward compatibility) will automatically configure it 
for that behavior).
I'll also submit a set of unit tests for these.  If I have time (read: if the task is 
more exciting
than whichever task I'm procrastinating) I'll upgrade the XIncludeTransformer to match 
the current
specification.

Thanks,


-Andy


apurva zaveri wrote:

>Thats great Andy!
>
>Let us know when you submit the fix.
>
>Also is there a way one can find out every time a new
>fix or a patch is submitted??? I am still quite new to
>cocoon.
>
>-Apurva
>
>--- "Andrew C. Oliver" <[EMAIL PROTECTED]> wrote:
>  
>
>>Incorrect.  This is a bug and the @select does work
>>in Cocoon 2.1.x.  
>>
>>I have a fix on my local drive but I haven't
>>submitted it yet.  Will do 
>>so very soon.  
>>
>>-Andy
>>
>>Per Kreipke wrote:
>>
>>    
>>
>>>Apurva,
>>>
>>> 
>>>
>>>      
>>>
>>>>to make the long story short:
>>>>
>>>>the output has the whole xml file after the
>>>>        
>>>>
>>section of
>>    
>>
>>>>the xml file i want to include.
>>>>
>>>>i.e
>>>>
>>>><cinclude:include
>>>>src="../../commons/contents/ATTRIBUTES.xml"
>>>>select="data/AGE/*" />
>>>>
>>>>outputs:
>>>>
>>>><?xml version="1.0" encoding="UTF-8"?>
>>>><age> data <age>  <!-- this is what i want -->
>>>>
>>>><data>               <!-- this is what i DONT want
>>>>        
>>>>
>>-->
>>    
>>
>>>> <dt> text <dt>
>>>> <age> data <age>
>>>></data>
>>>>
>>>>Am i doin something wrong or is it a bug??
>>>>   
>>>>
>>>>        
>>>>
>>>Not a bug. CInclude does not support selecting just
>>>      
>>>
>>a portion of your XML
>>    
>>
>>>model (and neither does XInclude).
>>>
>>>E.g. your @select above does nothing.
>>>
>>>To do what you want to do, just add a XSLT
>>>      
>>>
>>tranformer _after_ your CInclude,
>>    
>>
>>>then in that XSLT logic either:
>>>
>>>- match the elements you want with identity
>>>      
>>>
>>templates,
>>    
>>
>>>- or, create a generic identity template and use
>>>      
>>>
>>empty matchers for the
>>    
>>
>>>elements you _don't_ want.
>>>
>>>XSLT makes a clean, generic filtering language.
>>>
>>>Note: Cocoon's FilterTransformer does something
>>>      
>>>
>>similar but in a very
>>    
>>
>>>restricted way (it basically only is used for
>>>      
>>>
>>paging through data models).
>>    
>>
>>>Per
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>    
>>
>>>Please check that your question  has not already
>>>      
>>>
>>been answered in the
>>    
>>
>>>FAQ before posting.    
>>>      
>>>
>><http://xml.apache.org/cocoon/faq/index.html>
>>    
>>
>>>To unsubscribe, e-mail:    
>>>      
>>>
>><[EMAIL PROTECTED]>
>>    
>>
>>>For additional commands, e-mail:  
>>>      
>>>
>><[EMAIL PROTECTED]>
>>    
>>
>>> 
>>>
>>>      
>>>
>>
>>
>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>Please check that your question  has not already
>>been answered in the
>>FAQ before posting.    
>><http://xml.apache.org/cocoon/faq/index.html>
>>
>>To unsubscribe, e-mail:    
>><[EMAIL PROTECTED]>
>>For additional commands, e-mail:  
>><[EMAIL PROTECTED]>
>>
>>    
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Finance - Get real-time stock quotes
>http://finance.yahoo.com
>
>---------------------------------------------------------------------
>Please check that your question  has not already been answered in the
>FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
>For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>  
>




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to