Re: CInclude bug???

2002-08-26 Thread Andrew C. Oliver

Specifically:

http://outerthought.net/wiki/Wiki.jsp?page=CInclude

-Andy

Andrew C. Oliver wrote:

> Will do.
>
> For now see:
>
> http://outerthought.net/wiki/Wiki.jsp
>
> I could have sworn I did it, but I must have left the documentation 
> dir out of my patch.  In 3 weeks when
> I send in my refactoring of CInclude/XInclude I'll submit that as well.
>
> -Andy
>
> Per Kreipke wrote:
>
>>> Incorrect.  This is a bug and the @select does work in Cocoon 2.1.x.
>>>   
>>
>>
>> Ah.
>>
>>  
>>
>>> I have a fix on my local drive but I haven't submitted it yet.  Will do
>>> so very soon.
>>>   
>>
>>
>> While you're at it, how about updating:
>>
>> http://xml.apache.org/cocoon/userdocs/transformers/cinclude-transformer.html 
>>
>>
>> on which I based my answer.
>>
>> Per
>>
>>  
>>
> 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
>
>  src="../../commons/contents/ATTRIBUTES.xml"
> select="data/AGE/*" />
>
> outputs:
>
> 
>  data   
>
>
>  text 
>  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. 

 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. 
>>>
>>> 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. 
>>
>> 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. 
>
> 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. 

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




Re: CInclude bug???

2002-08-26 Thread Andrew C. Oliver

Will do.

For now see:

http://outerthought.net/wiki/Wiki.jsp

I could have sworn I did it, but I must have left the documentation dir 
out of my patch.  In 3 weeks when
I send in my refactoring of CInclude/XInclude I'll submit that as well.

-Andy

Per Kreipke wrote:

>>Incorrect.  This is a bug and the @select does work in Cocoon 2.1.x.
>>
>>
>
>Ah.
>
>  
>
>>I have a fix on my local drive but I haven't submitted it yet.  Will do
>>so very soon.
>>
>>
>
>While you're at it, how about updating:
>
>http://xml.apache.org/cocoon/userdocs/transformers/cinclude-transformer.html
>
>on which I based my answer.
>
>Per
>
>  
>
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

>>>src="../../commons/contents/ATTRIBUTES.xml"
select="data/AGE/*" />

outputs:


 data   

   
  text 
  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. 
>>>
>>>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. 
>>
>>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. 
>
>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. 

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




Re: CInclude bug???

2002-08-26 Thread Andrew C. Oliver

That is weird.  It doesn't happen after the fix (I've got both static 
and dynamic includes)

-Andy

apurva zaveri wrote:

>One more wierd finding:
>
>This is another place where I am experimneting with
>CInclude.
>
>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 <[EMAIL PROTECTED]> 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
>
>src="../../commons/contents/ATTRIBUTES.xml"
>select="data/AGE/*" />
>
>outputs:
>
>
> data   
>
>   
>>>  
>>>
>  text 
>  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.


>>>
>>>  
>>>
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.
>>>
>>>
>>>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.
>>
>>
>>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. 
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>  
>




-
P

Re: CInclude bug??? (And my upcoming patch)

2002-08-26 Thread Andrew C. Oliver

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 wrongsorry 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

>>>src="../../commons/contents/ATTRIBUTES.xml"
select="data/AGE/*" />

outputs:


 data   

   
>>
>>
  text 
  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.
>>>  
>>>
>>
>>
>>
>>>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.
>>
>>
>>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. 
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>  
>




-
Please check that your question  has not already been answe

RE: CInclude bug???

2002-08-26 Thread Per Kreipke

> Incorrect.  This is a bug and the @select does work in Cocoon 2.1.x.

Ah.

> I have a fix on my local drive but I haven't submitted it yet.  Will do
> so very soon.

While you're at it, how about updating:

http://xml.apache.org/cocoon/userdocs/transformers/cinclude-transformer.html

on which I based my answer.

Per

> >>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
> >>
> >> >>src="../../commons/contents/ATTRIBUTES.xml"
> >>select="data/AGE/*" />
> >>
> >>outputs:
> >>
> >>
> >> data   
> >>
> >>   
> >>   text 
> >>   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. 
> >
> >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. 
>
> 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. 

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




Re: CInclude bug???

2002-08-26 Thread apurva zaveri

One more wierd finding:

This is another place where I am experimneting with
CInclude.



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 <[EMAIL PROTECTED]> 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
> > >>
> > >> > >>src="../../commons/contents/ATTRIBUTES.xml"
> > >>select="data/AGE/*" />
> > >>
> > >>outputs:
> > >>
> > >>
> > >> data   
> > >>
> > >>   
> > >>   text 
> > >>   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.
> > 
> > >
> > >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.
> > 
> > 
> > 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.
> 
> 
> 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. 

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




Re: CInclude bug???

2002-08-26 Thread apurva zaveri

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
> >>
> >> >>src="../../commons/contents/ATTRIBUTES.xml"
> >>select="data/AGE/*" />
> >>
> >>outputs:
> >>
> >>
> >> data   
> >>
> >>   
> >>   text 
> >>   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.
> 
> >
> >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.
> 
> 
> 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. 

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




Re: CInclude bug???

2002-08-26 Thread Andrew C. Oliver

And CInclude does support @select now.

Per Kreipke wrote:

>Apurva,
>
>I need more sleep: XInclude _does_ in fact allow you to subselect using
>XPointer syntax.
>
>See
>http://xml.apache.org/cocoon/userdocs/transformers/xinclude-transformer.html
>
>for details. Requires sitemap change.
>
>  
>
>>-Original Message-
>>From: Per Kreipke [mailto:[EMAIL PROTECTED]]
>>Sent: Sunday, August 25, 2002 11:41 PM
>>To: [EMAIL PROTECTED]
>>Subject: RE: CInclude bug???
>>
>>
>>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
>>>
>>>>>src="../../commons/contents/ATTRIBUTES.xml"
>>>select="data/AGE/*" />
>>>
>>>outputs:
>>>
>>>
>>> data   
>>>
>>>   
>>>   text 
>>>   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]>
>
>
>  
>




-
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]>




Re: CInclude bug???

2002-08-26 Thread Andrew C. Oliver

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
>>
>>>src="../../commons/contents/ATTRIBUTES.xml"
>>select="data/AGE/*" />
>>
>>outputs:
>>
>>
>> data   
>>
>>   
>>   text 
>>   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. 
>
>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. 

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




RE: CInclude bug???

2002-08-25 Thread Per Kreipke

Apurva,

I need more sleep: XInclude _does_ in fact allow you to subselect using
XPointer syntax.

See
http://xml.apache.org/cocoon/userdocs/transformers/xinclude-transformer.html

for details. Requires sitemap change.

> -Original Message-
> From: Per Kreipke [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, August 25, 2002 11:41 PM
> To: [EMAIL PROTECTED]
> Subject: RE: CInclude bug???
>
>
> 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
> >
> >  > src="../../commons/contents/ATTRIBUTES.xml"
> > select="data/AGE/*" />
> >
> > outputs:
> >
> > 
> >  data   
> >
> >
> >text 
> >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]>




RE: CInclude bug???

2002-08-25 Thread Per Kreipke

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
>
>  src="../../commons/contents/ATTRIBUTES.xml"
> select="data/AGE/*" />
>
> outputs:
>
> 
>  data   
>
>
>text 
>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. 

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




Re: CInclude bug???

2002-08-25 Thread apurva zaveri

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



outputs:


 data   

   
   text 
   data 


Am i doin something wrong or is it a bug??

-Apurva


__
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. 

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




Re: CInclude bug???

2002-08-25 Thread apurva zaveri


--- apurva zaveri <[EMAIL PROTECTED]> wrote:
> I am trying to use XPointer like functionality with
> CInclude.
> 
> I have a statement like 
> 
> **
>  src="../../commons/contents/ATTRIBUTES.xml"
> select="data/AGE/*" />
> **
> 
> in an xml file.


opps i forget to provide the xml file :

**



   http://xml.apache.org/cocoon/xmlform/2002";
 xmlns:xi="http://www.w3.org/2001/XInclude";

xmlns:cinclude="http://apache.org/cocoon/include/1.0";
  >


 




here











**


> 
> This is the attribute file:
> 
> **
> 
> 
xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002";>
>   
> 
>   Ownership Type
>   
>   
> 
>   
>   
>   Co-operative
> Society
>   Co-operative Society
>   
>   
>   Home Owners
> Association
>   Home Owners
> Association
>   
>   
>   FreeHold
>   FreeHold
>   
>   
>   LeaseHold
>   LeaseHold
>   
> 
>   
> 
> 
>   
>   
>   LeaseHold
>   LeaseHold
>   
>   
> 
> 
> **
> 
> 
> But the output i get is 
> 
> **
> 
>  xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002";
> xmlns:xi="http://www.w3.org/2001/XInclude";
>
xmlns:cinclude="http://apache.org/cocoon/include/1.0";>
> 
> 
>  
>   LeaseHold
>   LeaseHold
>  
> 
> 
> 
>   
> 
> 
>   Ownership Type
>   
>   
> 
>   
>   
>   Co-operative
> Society
>   Co-operative Society
>   
>   
>   Home Owners
> Association
>   Home Owners
> Association
>   
>   
>   FreeHold
>   FreeHold
>   
>   
>   LeaseHold
>   LeaseHold
>   
> 
>   
> 
>   
> 
>   
>   LeaseHold
>   LeaseHold
>   
> 
> 
>   
> 
> 
> 
> 
> 
> 
> here
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> **
> 
> So the output has what i want 
> that is 
> 
>  
>   LeaseHold
>   LeaseHold
>   
> 
> 
> but after that it also include the whole
> attributes.xml file?
> 
> is this a bug??
> 
> -Apurva
> 
> 




> 
> 
> 
> __
> 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.
> 
> 
> 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. 

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