You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Leszek Gawron <lg...@mobilebox.pl> on 2004/07/01 11:52:29 UTC
CIncludeTransformer issues
I want to build a cform out of several reusable parts. Consider a
contractor, user, company having an address. So i created a file that
contains only address widgets
> <?xml version="1.0" encoding="utf-8"?>
> <fd:widgets xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
> <fd:field id="street">
> <fd:label>Ulica</fd:label>
> <fd:datatype base="string"/>
> </fd:field>
> <fd:field id="building">
> <fd:label>Numer budynku</fd:label>
> <fd:datatype base="string"/>
> </fd:field>
> <fd:field id="apartment">
> <fd:label>Numer lokalu</fd:label>
> <fd:datatype base="string"/>
> </fd:field>
> <fd:field id="postalCode">
> <fd:label>Kod pocztowy</fd:label>
> <fd:datatype base="string"/>
> </fd:field>
> <fd:field id="city">
> <fd:label>Miejscowosc</fd:label>
> <fd:datatype base="string"/>
> </fd:field>
> </fd:widgets>
1. Is there some syntax that allows to do that in cinclude:
<xi:include
href="editAddress-def.xml#xmlns(fd=http://apache.org/cocoon/forms/1.0#definition)
xpointer(/fd:widgets/fd:*)"/>
I cannot seem to find a way to do a succesful xpath query that involves
namespaces (when using cinclude).
2. If not would you accept the path that allows to do strip-root in
CIncludeTransformer - it would also be much faster than select="/root/*"
I've been browsing archives for this. There was an answer that I should
use map:aggregate -> map:part strip-root=true" but that is very
inconvenient in my case.
WDYT?
lg
--
Leszek Gawron lgawron@mobilebox.pl
Re: CIncludeTransformer issues
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Torsten Curdt wrote:
>>>> I have a patch. It works only with cinclude:include tag.
>>>> caching-include and includexml is way to much complicated for me to
>>>> change it.
>>>
>>>
>>>
>>>
>>> Could you please add it to bugzilla?
>>>
>>
>> Could you please apply the patch ?
>
>
> Done :-)
>
> Thanks
Looks fine. Thank you :)
--
Leszek Gawron lgawron@mobilebox.pl
Project Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
Re: CIncludeTransformer issues
Posted by Torsten Curdt <tc...@vafer.org>.
>>> I have a patch. It works only with cinclude:include tag.
>>> caching-include and includexml is way to much complicated for me to
>>> change it.
>>
>>
>>
>> Could you please add it to bugzilla?
>>
>
> Could you please apply the patch ?
Done :-)
Thanks
--
Torsten
Re: CIncludeTransformer issues
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Torsten Curdt wrote:
>>> Having a strip-root parameter on the
>>> CInclude transformer makes sense IMO.
>>
>>
>> I have a patch. It works only with cinclude:include tag.
>> caching-include and includexml is way to much complicated for me to
>> change it.
>
>
> Could you please add it to bugzilla?
>
> cheers
> --
> Torsten
Could you please apply the patch ?
--
Leszek Gawron lgawron@mobilebox.pl
Project Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
Re: CIncludeTransformer issues
Posted by Torsten Curdt <tc...@vafer.org>.
>> Having a strip-root parameter on the
>> CInclude transformer makes sense IMO.
>
> I have a patch. It works only with cinclude:include tag. caching-include
> and includexml is way to much complicated for me to change it.
Could you please add it to bugzilla?
cheers
--
Torsten
Re: CIncludeTransformer issues
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Torsten Curdt wrote:
>>> 2. If not would you accept the path that allows to do strip-root in
>>> CIncludeTransformer - it would also be much faster than select="/root/*"
>>
>>
>>
>> The PATCH not the path
>
>
> big +1
>
> ...see the archives:
>
> I wanted to add this feature but
> worked around due to time constraints.
>
> Having a strip-root parameter on the
> CInclude transformer makes sense IMO.
I have a patch. It works only with cinclude:include tag. caching-include and
includexml is way to much complicated for me to change it.
--
Leszek Gawron lgawron@mobilebox.pl
Re: CIncludeTransformer issues
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Torsten Curdt wrote:
>>> 2. If not would you accept the path that allows to do strip-root in
>>> CIncludeTransformer - it would also be much faster than select="/root/*"
>>
>>
>>
>> The PATCH not the path
>
>
> big +1
>
> ...see the archives:
>
> I wanted to add this feature but
> worked around due to time constraints.
>
> Having a strip-root parameter on the
> CInclude transformer makes sense IMO.
I will try to implement that today but this will need revising as there is
some kind of magic in the code (paralell fetching or sth)
--
Leszek Gawron lgawron@mobilebox.pl
Re: CIncludeTransformer issues
Posted by Torsten Curdt <tc...@vafer.org>.
>> 2. If not would you accept the path that allows to do strip-root in
>> CIncludeTransformer - it would also be much faster than select="/root/*"
>
>
> The PATCH not the path
big +1
...see the archives:
I wanted to add this feature but
worked around due to time constraints.
Having a strip-root parameter on the
CInclude transformer makes sense IMO.
cheers
--
Torsten
Re: CIncludeTransformer issues
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Leszek Gawron wrote:
> I want to build a cform out of several reusable parts. Consider a
> contractor, user, company having an address. So i created a file that
> contains only address widgets
>
>> <?xml version="1.0" encoding="utf-8"?>
>> <fd:widgets xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
>> xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
>> <fd:field id="street">
>> <fd:label>Ulica</fd:label>
>> <fd:datatype base="string"/>
>> </fd:field>
>> <fd:field id="building">
>> <fd:label>Numer budynku</fd:label>
>> <fd:datatype base="string"/>
>> </fd:field>
>> <fd:field id="apartment">
>> <fd:label>Numer lokalu</fd:label>
>> <fd:datatype base="string"/>
>> </fd:field>
>> <fd:field id="postalCode">
>> <fd:label>Kod pocztowy</fd:label>
>> <fd:datatype base="string"/>
>> </fd:field>
>> <fd:field id="city">
>> <fd:label>Miejscowosc</fd:label>
>> <fd:datatype base="string"/>
>> </fd:field>
>> </fd:widgets>
>
>
> 1. Is there some syntax that allows to do that in cinclude:
> <xi:include
> href="editAddress-def.xml#xmlns(fd=http://apache.org/cocoon/forms/1.0#definition)
> xpointer(/fd:widgets/fd:*)"/>
>
> I cannot seem to find a way to do a succesful xpath query that involves
> namespaces (when using cinclude).
>
> 2. If not would you accept the path that allows to do strip-root in
> CIncludeTransformer - it would also be much faster than select="/root/*"
The PATCH not the path
> WDYT?
> lg
>
--
Leszek Gawron lgawron@mobilebox.pl