context problem - repeatProbably, the problem is in the level you are using
to access parameters in resource (../locale). You are calling your resource
from inside of two nested actions, so the level should be something like
{../../locale}.

It'd be better to pass parameters to resources explicitely just as you do
for the 'target'.

Konstantin

----- Original Message -----
From: Hong Gia Dinh
To: [EMAIL PROTECTED]
Sent: Thursday, December 19, 2002 07:53
Subject: context problem - repeat





-----Original Message-----
From: Hong Gia Dinh
Sent: 18 December 2002 09:35
To: '[EMAIL PROTECTED]'
Subject: context problem


Hi all
i got the headache prolem like this
i have the files and sitemap like this :
        <map:resources>
                <map:resource name="admin-page">
                        <map:generate type="serverpages"
src="context://admin/system/{target}.xsp"/>
                        <map:transform type="i18n">
                                <map:parameter name="locale"
value="{../locale}"/>
                        </map:transform>
                        <map:transform
src="context://admin/style/{target}.xsl">
                                <map:parameter name="use-request-parameters"
value="true"/>
                                <map:parameter name="css-stylesheet"
value="admin/admin.css"/>
                                <map:parameter name="base-url"
value="/saigoncoop"/>
                                <map:parameter name="locale"
value="{../locale}"/>
                                <map:parameter name="page"
value="{target}"/>
                        </map:transform>
                        <map:transform type="log">
                                <map:parameter name="logile"
value="logfile.log"/>
                                <map:parameter name="append" value="no"/>
                        </map:transform>
                        <map:serialize/>
                </map:resource>
        </map:resources>
        <!-- =========================== Pipelines
================================= -->
        <map:pipelines>
                <map:pipeline>
                        <map:act type="locale">
                                <map:match pattern="admin-*">
                                        <map:act type="form-validator">
                                                <map:parameter
name="descriptor"
value="context:///admin/system/admin-system-descriptor.xml"/>
                                                <map:parameter
name="validate-set" value="admin-system-validate"/>
                                                <map:call
resource="admin-page">
                                                        <map:parameter
name="target" value="{1}"/>
                                                </map:call>
                                        </map:act>
                                        <map:call resource="admin-page">
                                                <map:parameter name="target"
value="{1}-error"/>
                                        </map:call>
                                </map:match>

                                <map:match pattern="adminstatic-*">
                                        <map:call resource="admin-page">
                                                <map:parameter name="target"
value="{1}"/>
                                        </map:call>
                                </map:match>
                        </map:act>
        </map:pipeline>
        <map:pipeline>
                        <map:match pattern="admin/*.css">
                                <map:read mime-type="text/css"
src="admin/style/{1}.css"/>
                        </map:match>
                        <map:match pattern="portal/images/*.gif">
                                <map:read mime-type="image/gif"
src="portal/images/{1}.gif"/>
                        </map:match>
                        <map:match pattern="portal/images/*.jpg">
                                <map:read mime-type="image/jpg"
src="portal/images/{1}.jpg"/>
                        </map:match>
                        <map:match pattern="portal/images/*.swf">
                                <map:read mime-type="image/swf"
src="portal/images/{1}.swf"/>
                        </map:match>
                        <map:match pattern="admin/images/*.gif">
                                <map:read mime-type="image/gif"
src="admin/images/{1}.gif"/>
                        </map:match>
                        <map:match pattern="admin/images/*.jpg">
                                <map:read mime-type="image/jpg"
src="admin/images/{1}.jpg"/>
                        </map:match>
                </map:pipeline>


but when i just can run the {1}-error pages of all pages !!!! i cant run the
valid pages!!! but when i replace {1} by the hard coded pages , it can run
well the valid and error pages !!
i dont know how to solve it! when i run with {1} and the error pages form ,
i input the value but it cant find the correct page, it produces error like
this :


org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
java.lang.RuntimeException: admin/system/.xsp could not be found. (possible
context problem)
how to fix it??? it' sstrange that i can run all the pages that match
adminstatic-* rather well!!!
can you all show me what i did wrong ??
Thanks so much GD


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

Reply via email to