cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Diethelm Guallar, Gonzalo" <Gonzalo.Dieth...@sonda.com>
Subject Getting URL parameter values
Date Thu, 08 Jun 2000 20:35:26 GMT
Hello,

This is my first post to this list. I must say I find
Cocoon an extremely interesting technology platform.
Please forgive me if this is too obvious, but I just
started getting into XML/XSL yesterday...

I'm writing a generic XSL formatter for a set of XML
files, each with a structure like this:

 File sys0.xml:
  <system name="sys0">
   <transaction name="t00">
    <field name="f000"/>
    <field name="f001"/>
    <field name="f002"/>
   </transaction>
   <transaction name="t01">
    <field name="f010"/>
    <field name="f011"/>
   </transaction>
   ...
   <transaction name="t0X">
    <field name="f0X0"/>
    <field name="f0X1"/>
   </transaction>
  </system>

 File sys1.xml:
  <system name="sys1">
  ...
  </system>

etc. When I visit sys0.xml, the URL will have a parameter
with the transaction name and (optionally) parameters
specifying the values for each field in the transaction.
I would like to generate a form with an input field for
each of the fields in the transaction, and set their
values to whatever was received in the URL. For example,
if I visit

  .../sys0.xml?trn=t00&f000=56&f002=99

I would like to generate a form with three fields, named
f000, f001 and f002, where f000 has a value of 56 and
f002 has a value of 99 (f001 will just be blank). The thing
is, how do I access the URL parameters from XSL? One
of the examples in Cocoon (samples/dcp/java/sample-page.xml)
does this using DCP, but I would rather not write any Java
code to do this... Can it be done directly from XSL? Notice
that I will NOT know beforehand what possible parameters
I could be getting; this information is defined in the XML
file for the given transaction. Therefore, I cannot just
predefine a lot of xsl:param items...

Thanks in advance,


-- 
Gonzalo A. Diethelm
gonzalo.diethelm@sonda.com

Mime
View raw message