You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jörn Heid <he...@fh-heilbronn.de> on 2001/09/05 23:37:14 UTC

Patch for selector inside resource

Hi.

I think this is a bug. So I added the patch for sitemap.xsl (this works for
me now). The problem description is appended at the end. Would be nice if
someone could apply the patch (please inform me about it).

org.apache.cocoon.components.language.markup.sitemap.java.sitemap.xsl
Line 184:
<xsl:for-each
select="/map:sitemap/map:pipelines/map:pipeline/descendant::map:select[@type
=$name or (not(@type) and $default)]/map:when">

to

<xsl:for-each
select="/map:sitemap/map:pipelines/map:pipeline/descendant::map:select[@type
=$name or (not(@type) and $default)]/map:when |
/map:sitemap/map:resources/map:resource/descendant::map:select[@type=$name
or (not(@type) and $default)]/map:when">

JEORN_HEID

-----Ursprüngliche Nachricht-----
Von: Jörn Heid [mailto:heid@agentsinaction.de]
Gesendet: Mittwoch, 5. September 2001 20:36
An: Cocoon-Users
Betreff: [C2] Urgent problem with selector inside resource


When using the parameter-selector
(org.apache.cocoon.selection.ParameterSelectorFactory) inside a resource

	<map:resources>
 	   <map:resource name="login">
               <map:act type="login-action">
                    <map:select type="parameter">
                        <map:parameter name="parameter-selector-test"
value="{myvar}"/>
                        <map:when test="true">
                          ...
                        </map:when>
                        <map:when test="false">
                          ...
                        </map:when>
                    </map:select>
               </map:act>
        </map:resource>
	</map:resources>

I get

org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
sitemap_xmap:
Line 1213, column 28:  Undefined variable: selector_parameter_N192_expr
Line 1228, column 30:  Undefined variable: selector_parameter_N199_expr

But the same selector inside a map:match does to work.

So, is it a bug or is there a workaround?

JOERN_HEID



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


RE: Patch for selector inside resource

Posted by Vadim Gritsenko <vg...@yahoo.com>.
Thanks, Jeorn. Patch applied.

Vadim

> -----Original Message-----
> From: Jörn Heid [mailto:heid@fh-heilbronn.de]
> Sent: Wednesday, September 05, 2001 5:37 PM
> To: Cocoon-Dev
> Subject: Patch for selector inside resource
>
>
> Hi.
>
> I think this is a bug. So I added the patch for sitemap.xsl (this works for
> me now). The problem description is appended at the end. Would be nice if
> someone could apply the patch (please inform me about it).
>
> org.apache.cocoon.components.language.markup.sitemap.java.sitemap.xsl
> Line 184:
> <xsl:for-each
> select="/map:sitemap/map:pipelines/map:pipeline/descendant::map:select[@type
> =$name or (not(@type) and $default)]/map:when">
>
> to
>
> <xsl:for-each
> select="/map:sitemap/map:pipelines/map:pipeline/descendant::map:select[@type
> =$name or (not(@type) and $default)]/map:when |
> /map:sitemap/map:resources/map:resource/descendant::map:select[@type=$name
> or (not(@type) and $default)]/map:when">
>
> JEORN_HEID
>
> -----Ursprüngliche Nachricht-----
> Von: Jörn Heid [mailto:heid@agentsinaction.de]
> Gesendet: Mittwoch, 5. September 2001 20:36
> An: Cocoon-Users
> Betreff: [C2] Urgent problem with selector inside resource
>
>
> When using the parameter-selector
> (org.apache.cocoon.selection.ParameterSelectorFactory) inside a resource
>
> 	<map:resources>
>  	   <map:resource name="login">
>                <map:act type="login-action">
>                     <map:select type="parameter">
>                         <map:parameter name="parameter-selector-test"
> value="{myvar}"/>
>                         <map:when test="true">
>                           ...
>                         </map:when>
>                         <map:when test="false">
>                           ...
>                         </map:when>
>                     </map:select>
>                </map:act>
>         </map:resource>
> 	</map:resources>
>
> I get
>
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error compiling
> sitemap_xmap:
> Line 1213, column 28:  Undefined variable: selector_parameter_N192_expr
> Line 1228, column 30:  Undefined variable: selector_parameter_N199_expr
>
> But the same selector inside a map:match does to work.
>
> So, is it a bug or is there a workaround?
>
> JOERN_HEID
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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