You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Luigi Bai <lp...@focalpoint.com> on 2004/10/29 21:08:24 UTC

map:aggregate

I'm having trouble using ns="" and prefix="" on map:aggregate and 
map:part. I'm following the wiki example for my sitemap:

<map:aggregate label="content" element="all" 
ns="http://focalpoint.com/swpb/data/any/1.0" prefix="data">
      <map:part element="form" src="forms/login.xml" 
ns="http://focalpoint.com/swpb/data/any/1.0" prefix="data"/>
      <map:part element="users" 
src="cocoon:/query/users" 
ns="http://focalpoint.com/swpb/data/any/1.0" prefix="data"/>
</map:aggregate>

But in the debug logs I'm seeing this:

DEBUG   (2004-10-29) 13:49.28:496   [sitemap] 
(/cocoon/access) http-9071-Processor5/ContentAggregator: Root 
element='all' ns='' prefix=''
DEBUG   (2004-10-29) 13:49.28:498   [sitemap] 
(/cocoon/access) http-9071-Processor5/ContentAggregator: Part 
uri='forms/login.xml' element='form' ns='' stripRootElement='false' 
prefix=''
DEBUG   (2004-10-29) 13:49.28:498   [sitemap] 
(/cocoon/access) http-9071-Processor5/ContentAggregator: Part 
uri='cocoon:/query/users' element='users' ns='' stripRootElement='false' prefix=''

The code in AggregateNodeBuilder.java has some stuff with 
VariableResolvers and whatnot, which as a newbie I'm not sure I understand 
completely but which I'm assuming means I can use variable syntax like 
"{globals:etc}" for element/ns/prefix. However, I'm using constant data, 
so none of that should matter? And it's getting "element", so why not "ns" 
and "prefix"? I'm puzzled.

Am I doing anything obvious wrong? Oh: this is with Cocoon 2.1.5.1.


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


Re: map:aggregate

Posted by Luigi Bai <lp...@focalpoint.com>.
On Fri, 29 Oct 2004, Luigi Bai wrote:

> I'm having trouble using ns="" and prefix="" on map:aggregate and map:part. 
> I'm following the wiki example for my sitemap:
>
> <map:aggregate label="content" element="all" 
> ns="http://focalpoint.com/swpb/data/any/1.0" prefix="data">
>     <map:part element="form" src="forms/login.xml" 
> ns="http://focalpoint.com/swpb/data/any/1.0" prefix="data"/>
>     <map:part element="users" src="cocoon:/query/users" 
> ns="http://focalpoint.com/swpb/data/any/1.0" prefix="data"/>
> </map:aggregate>
>
> But in the debug logs I'm seeing this:
>
> DEBUG   (2004-10-29) 13:49.28:496   [sitemap] (/cocoon/access) 
> http-9071-Processor5/ContentAggregator: Root element='all' ns='' prefix=''
> DEBUG   (2004-10-29) 13:49.28:498   [sitemap] (/cocoon/access) 
> http-9071-Processor5/ContentAggregator: Part uri='forms/login.xml' 
> element='form' ns='' stripRootElement='false' prefix=''
> DEBUG   (2004-10-29) 13:49.28:498   [sitemap] (/cocoon/access) 
> http-9071-Processor5/ContentAggregator: Part uri='cocoon:/query/users' 
> element='users' ns='' stripRootElement='false' prefix=''
>
> The code in AggregateNodeBuilder.java has some stuff with VariableResolvers 
> and whatnot, which as a newbie I'm not sure I understand completely but which 
> I'm assuming means I can use variable syntax like "{globals:etc}" for 
> element/ns/prefix. However, I'm using constant data, so none of that should 
> matter? And it's getting "element", so why not "ns" and "prefix"? I'm 
> puzzled.
>
> Am I doing anything obvious wrong? Oh: this is with Cocoon 2.1.5.1.
>

I also noticed a small bogosity in ContentAggregator.java line 238; the 
debug statement doesn't really say what it means. It *should* read:

         if (getLogger().isDebugEnabled()) {
             getLogger().debug("Part uri='" + uri +
                               "' element='" + element + "' ns='" + 
elem.namespace +
                               "' stripRootElement='" + stripRootElement + 
"' prefix='" + elem.prefix + "'");

Not that it changes anything since I'm explicitly trying to set prefix and 
ns on the parts, too (instead of "inheriting" from the map:aggregate 
element).


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