| | |
XForms Select1 itemset model instance
Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2007
Posts: 1
Reputation:
Solved Threads: 0
Dear all
See XHTML document below,
Question and comments are with the text
Thx
Bernt
<!-- Why does not this work ????????????
I just want to have different options for each question !!!!!!
I know I can make a new model for each selection (but that is not what I wanna do)
<xforms:itemset model="allowedAnswers" nodeset="instance('A')/xforms:opt1/xforms:answ">
according to hundres of tutorial and books this is how to do it
I'm using FireFox with the Xforms plug-in and I cannot use IEXPLORE with plug-in
because IEXPLORE does work well with file protocol (only http)
-->
<!-- Neither this work ????????????
<xforms:itemset model="allowedAnswers" instance="B" nodeset="/xforms:opt1/xforms:answ">
The line below works but it always pick the first instance
-->
See XHTML document below,
Question and comments are with the text
Thx
Bernt
XML, XSLT and XPATH Syntax (Toggle Plain Text)
<?xml version="1.0" encoding="UTF-16"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms"> <head> <link href="EWIN_XFORMS.css" rel="stylesheet"/> <title>XForms Itemset Example</title> <xforms:model id="main"> <xforms:instance> <xforms:DOCUMENT documentName="MyReportXX"> <xforms:STATUS MYCHOICE="1" REMARK=""> </xforms:STATUS> <xforms:STATUS MYCHOICE="11" REMARK=""> </xforms:STATUS> </xforms:DOCUMENT> </xforms:instance> <xforms:bind nodeset="/xforms:DOCUMENT/xforms:STATUS[1]/@MYCHOICE" id="MC1"/> <xforms:bind nodeset="/xforms:DOCUMENT/xforms:STATUS[2]/@MYCHOICE" id="MC2"/> <xforms:bind nodeset="/xforms:DOCUMENT/xforms:STATUS[1]/@REMARK" id="REM1"/> <xforms:bind nodeset="/xforms:DOCUMENT/xforms:STATUS[2]/@REMARK" id="REM2"/> <xforms:submission id="Save" action="file//:LocalFile.xml" method="put"></xforms:submission> </xforms:model> <xforms:model id="allowedAnswers" xslns=""> <xforms:instance id="A"> <xforms:opt1> <xforms:answ> <xforms:ALLOWED_ANSWER_TEXT>Medium</xforms:ALLOWED_ANSWER_TEXT> <xforms:ANSWER_CODE>1</xforms:ANSWER_CODE> </xforms:answ> <xforms:answ> <xforms:ALLOWED_ANSWER_TEXT>Some Good some bad</xforms:ALLOWED_ANSWER_TEXT> <xforms:ANSWER_CODE>2</xforms:ANSWER_CODE> </xforms:answ> <xforms:answ> <xforms:ALLOWED_ANSWER_TEXT>Happy</xforms:ALLOWED_ANSWER_TEXT> <xforms:ANSWER_CODE>3</xforms:ANSWER_CODE> </xforms:answ> </xforms:opt1> </xforms:instance> <xforms:instance id="B"> <xforms:opt1> <xforms:answ> <xforms:ALLOWED_ANSWER_TEXT>BB I don't think</xforms:ALLOWED_ANSWER_TEXT> <xforms:ANSWER_CODE>11</xforms:ANSWER_CODE> </xforms:answ> <xforms:answ> <xforms:ALLOWED_ANSWER_TEXT>I was not there</xforms:ALLOWED_ANSWER_TEXT> <xforms:ANSWER_CODE>12</xforms:ANSWER_CODE> </xforms:answ> </xforms:opt1> </xforms:instance> </xforms:model> </head> <body> <!-- Itemset example --> <xforms:select1 bind="MC1" appearance="minimal"> <xforms:label>What do u think about when u see snow?</xforms:label>
I just want to have different options for each question !!!!!!
I know I can make a new model for each selection (but that is not what I wanna do)
<xforms:itemset model="allowedAnswers" nodeset="instance('A')/xforms:opt1/xforms:answ">
according to hundres of tutorial and books this is how to do it
I'm using FireFox with the Xforms plug-in and I cannot use IEXPLORE with plug-in
because IEXPLORE does work well with file protocol (only http)
-->
XML, XSLT and XPATH Syntax (Toggle Plain Text)
<xforms:itemset model="allowedAnswers" nodeset="/xforms:opt1/xforms:answ"> <xforms:label ref="xforms:ALLOWED_ANSWER_TEXT"></xforms:label> <xforms:value ref="xforms:ANSWER_CODE"></xforms:value> </xforms:itemset> </xforms:select1> <xforms:input bind="REM1"> <xforms:label>Remark:</xforms:label> </xforms:input> <xforms:select1 bind="MC2" appearance="minimal"> <xforms:label>What do u think about the weather last week in October 6 years ago?</xforms:label>
<xforms:itemset model="allowedAnswers" instance="B" nodeset="/xforms:opt1/xforms:answ">
The line below works but it always pick the first instance
-->
XML, XSLT and XPATH Syntax (Toggle Plain Text)
<xforms:itemset model="allowedAnswers" nodeset="/xforms:opt1/xforms:answ"> <xforms:label ref="xforms:ALLOWED_ANSWER_TEXT"/> <xforms:value ref="xforms:ANSWER_CODE"/> </xforms:itemset> </xforms:select1> <xforms:input bind="REM2"> <xforms:label>Remark:</xforms:label> </xforms:input> <xforms:submit submission="Save"><label>Save</label></xforms:submit> <xforms:submit submission="Submit"><label>Submit</label></xforms:submit> </body> </html>
![]() |
Similar Threads
- IBM X20 LCD Bulb (Monitors, Displays and Video Cards)
- Send data on a serial port (C++)
- Toshiba 2805-series HDD upgrade (Storage)
- Please Please Help!! (Troubleshooting Dead Machines)
- Graphics in Pixel,Mode13h:Part 1 (C++)
- Saving and opeing a JTable (Java)
- MySQL - logical model from a conceptual model (MySQL)
- NEWS - MySQL Database To Get New Features (MySQL)
Other Threads in the XML, XSLT and XPATH Forum
- Previous Thread: need some help in WML
- Next Thread: XSLT - inserting new elements
| Thread Tools | Search this Thread |
api blogger blogging code delete development dynamiccreationofnvariablesinxslt error firstthreecharacterofastringrequired flipbook gdata google html include java link linspire linux microsoft news node openoffice overwrite precedence programming rss standards swf template transform variable w3c web xml xmlnotloading xmlonserver xsl xslt





