cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurva zaveri <azav...@yahoo.com>
Subject Re: CInclude bug???
Date Mon, 26 Aug 2002 13:39:28 GMT
One more wierd finding:

This is another place where I am experimneting with
CInclude.

<cinclude:include
src="cocoon://commons/contents/emp_table.xml"
select="data/dept/*" />

the @select in this CInclude transformer
works exactly the way it should. And it is no
different from the previous case.

The only difference is that the previous case had a
fileGenerator with a static xml file (ATTRIBUTES.xml)
wherease over here
(emp_table.xml) is a cocoon pipeline that has a
generator (not a fileGenerator like in previous case)
but a ServletGenerator that generates xml from a
database using an predefined SQL query.

But why should that difference matter?

@select in CInclude transformer does works corretly
with a ServletGenerator behind it but if fileGenerator
is behind it, it does not work.

Is that the nature of the bug???

-Apurva







--- apurva zaveri <azaveri@yahoo.com> 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" <acoliver@apache.org> 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:    
> > <cocoon-users-unsubscribe@xml.apache.org>
> > >For additional commands, e-mail:  
> > <cocoon-users-help@xml.apache.org>
> > >
> > >
> > >  
> > >
> > 
> > 
> > 
> > 
> >
>
---------------------------------------------------------------------
> > 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:    
> > <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail:  
> > <cocoon-users-help@xml.apache.org>
> > 
> 
> 
> __________________________________________________
> 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:    
> <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:  
> <cocoon-users-help@xml.apache.org>
> 


__________________________________________________
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message