cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Rolappe" <m_rola...@web.de>
Subject AW: pass attributes to phpgenerator
Date Sun, 26 Jan 2003 16:35:52 GMT
hi johannes,

I think you should be matching the request parameter(s) via the respective
matcher, i.e. RequestParameterMatcher. the default (WildcardURI) matcher
most probably only matches on the URI.

so (from the top of my head) it would be something like:

<!--php try-->
<map:pipeline>
<map:match pattern="one2.php>
   <map:match type="request-parameter" pattern="myparam">

       <map:generate type="php" src="daten/one.php">
           <map:parameter name="myparam" value="{1}"/> <!-- param matched by
request-parameter matcher -->
       </map:generate>
   </map:match>

   <map:transform src="stylesheets/try1.xsl"/>
   <map:serialize type="xml"/>
</map:match>
</map:pipeline>

-----Urspr√ľngliche Nachricht-----
Von: cocoon-users-return-45362-m_rolappe=web.de@xml.apache.org
[mailto:cocoon-users-return-45362-m_rolappe=web.de@xml.apache.org]Im Auftrag
von Johannes Stein
Gesendet: Sonntag, 26. Januar 2003 04:19
An: cocoon-users@xml.apache.org
Betreff: pass attributes to phpgenerator


hello people!

after some hours of configuration, i finally got the c2 phpgenerator
set up correctly. next thing would be to pass http-attributes as
parameters to the php-script. i tried something like this in the sitemap:

<!--php try-->
<map:pipeline>
<map:match pattern="one2.php?myparam=**">
   <map:generate type="php" src="daten/one.php">
      <map:parameter name="myparam" value="{1}"/>
    </map:generate>
   <map:transform src="stylesheets/try1.xsl"/>
   <map:serialize type="xml"/>
</map:match>
</map:pipeline>

then i called the url one2.php?myparam=three, but the variable myparam isn't
available
in the php-script, referring to it seems to result in a php errormessage
(which is no valid xml, therefore i do not see anything of it).

i'd be delighted if anyone had some experience to share on this problem!

Thank you,  johannes


---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message