specifying URL parameters in itemset action?

Your question is a good one, and your own solution is not
bad either.

Here is how I would have written it based on my
understanding of XPath:

<selectOne selectUI="menu">
  <itemset nodeset="books/book" >
    <caption ref="name" />
    <value ref="id" />
    <action>
       <loadURI href="concat('http://host/borrow.asp?book_id=',
	id, 
	 "borrower;",
 borrower)"/>
    </action>
  </itemset>
</selectOne>

Above I have assumed that:

0)  the book structure has a borrower
  child that holds the name of the person who borrowed it.


1) I assume that when you used "ericfoo" as the value of
   param borrower, you were 
treating "ericfoo" as a literal --that seemed strange.


2) I'm using ';' to separate params in the GET url

given book
<book >
<id>1111</id>
<borrower Eric Foo</borrower>
</book>

That will load URI of the form:

"http://host/borrow.asp?book_id=1111;borrower=Eric+Foo"


>>>>> "Eric" == Eric Fu <ericfu@etrieve.com> writes:

    Eric> No response to my question. I searched around the
    Eric> current draft and it doesn't appear to have a
    Eric> clear answer in there either.

    Eric> So I will use the following syntax for the mean
    Eric> time and hope the working group will have
    Eric> something like this in mind for the future:

    Eric> <selectOne selectUI="menu"> <itemset
    Eric> nodeset="books/book" > <caption ref="name" />
    Eric> <value ref="id" /> <action> <loadURI
    Eric> href="http://host/borrow.asp"> <param
    Eric> name="book_id" ref="id" /> <param name="borrower"
    Eric> value="ericfu" /> </action> </itemset>
    Eric> </selectOne>


    Eric> That will load URI of the form:
    Eric> "http://host/borrow.asp?book_id=1111&borrower=ericfu"



    Eric> - Eric



    Eric> -----Original Message----- From: Eric Fu
    Eric> [mailto:ericfu@etrieve.com] Sent: Tuesday,
    Eric> December 18, 2001 5:01 PM To: 'www-forms@w3.org'
    Eric> Subject: How to specify URL parameters in itemset
    Eric> action?


    Eric> What is the correct way to specify actions in an
    Eric> "itemset".

    Eric> for example, in the following, how do you put the
    Eric> book id as the URI parameter in the actoin:

    Eric> <selectOne selectUI="menu"> <itemset
    Eric> nodeset="books/book" > <caption ref="name" />
    Eric> <value ref="id" /> <action> <loadURI
    Eric> href="http://host/borrow.asp?book_id=????" />
    Eric> </action> </itemset> </selectOne>


    Eric> More specifically, I would like the above expanded
    Eric> into something like the following:

    Eric> <selectOne selectUI="menu"> <choices> <item>
    Eric> <caption>book_title_1</caption>
    Eric> <value>book1</value> <action> <loadURI
    Eric> href="http://host/borrow.asp?book_id=book1" />
    Eric> </action> </item> <item>
    Eric> <caption>book_title_2</caption>
    Eric> <value>book2</value> <action> <loadURI
    Eric> href="http://host/borrow.asp?book_id=book2" />
    Eric> </action> </item> </choices> </selectOne>


    Eric> - Eric

-- 
Best Regards,
--raman
------------------------------------------------------------

IBM Research: Human Language Technologies
Phone:        1 (408) 927 2608
Fax:        1 (408) 927 3012
Email:        tvraman@us.ibm.com
WWW:      http://www.cs.cornell.edu/home/raman
PGP:          http://emacspeak.sf.net/raman.asc
Snail:        IBM Almaden Research Center,
              650 Harry Road
              San Jose 95120

Received on Wednesday, 19 December 2001 16:59:47 UTC