Hi all!

I'm working on a problem where the situation is that I have an XSP page 
with a form, and once it is submitted, I want to display an identical 
form, and to use the form content for the fields that were submitted if 
they exist, otherwise, I want to populate the fields with data from 
another source, something that's available in XML markup too. (Uhm, was 
that clear...? At least it was short... :-) )

I've been pounding my head against this problem for several days, and 
now, I'm trying to address it in a XSLT transformation by using the 
params that AxKit passes. 

For a named field, it is easy enough if I don't do any checking:

In my XSP, I have something like 
        <value><val:insert name="title"/></value>

and replace the title easily with $title, which is a query parameter:

   <xsl:template match="//val:insert">
    <xsl:value-of select="$title"/>
  </xsl:template>

But this is of little use, because I'd like to have a single template 
replacing all the possible parameters, so instead of $title, I should 
use the 
@name
(i.e. the name attribute of the val:insert element), to identify the 
parameter. That's a pure XSLT/XQuery question I guess, but I might as 
well ask: Any ideas on how to do that?

But then, I need to test whether a parameter exists... In XSP that's 
straightforward, thanks to the many good taglibs, but I haven't found 
anything on checking the parameters in XSLT, is it doable? 

Is there more documentation on the parameters AxKit pass to XSLT 
somewhere now? I remembered an old thread about them and found it in 
the archives, but that was about all. 

Kip, anything about that in your new book? It's in the mail on its way 
here... :-) 

Cheers,

Kjetil
-- 
Kjetil Kjernsmo
Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer
[EMAIL PROTECTED]  [EMAIL PROTECTED]  [EMAIL PROTECTED]
Homepage: http://www.kjetil.kjernsmo.net/        OpenPGP KeyID: 6A6A0BBC

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to