I am finding a problem trying to use the <xxforms:variable> element. Here's an
example. Given this "cats.xml" data file (granted all the namespaces are not necessary): <?xml version="1.0" encoding="UTF-8"?> <cats xmlns="" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"> <cat color="brown" gender="F">Duchess</cat> <cat color="calico" gender="F">Princess</cat> <cat color="black" gender="M">King</cat> <cat color="tiger" gender="M">Prince</cat> </cats> ... and this "cats.xhtml" xforms page: <?xml version="1.0" encoding="UTF-8"?> <html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude"> <head> <title>CATS</title> <xforms:model id="main-model"> <!-- note: modify @src to point to above xml file --> <xforms:instance id="cats-instance" src="cats.xml"/> </xforms:model> </head> <body> <h1>--- Cats ---</h1> <ul> <xforms:repeat nodeset="instance( 'cats-instance' )/cat" id="cats-repeat"> <xxforms:variable name="type" select="@color" /> <li> <xforms:output value="$type" /> </li> </xforms:repeat> </ul> </body> </html> ... and this page flow: <config xmlns="http://www.orbeon.com/oxf/controller" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <page id="cats001" path-info="/cats/" view="cats.xhtml"/> <epilogue url="oxf:/config/epilogue.xpl"/> </config> ... I get the following error: 'Invalid element in XForms document: xxforms:variable" when attempting to run this example. If the xxforms:variable element is removed and "$type" replaced with "@color", the xforms page works fine. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
On Tue, Aug 19, 2008 at 9:04 AM, <[hidden email]> wrote:
> ... I get the following error: 'Invalid element in XForms document: > xxforms:variable" when attempting to run this example. If the xxforms:variable > element is removed and "$type" replaced with "@color", the xforms page works > fine. Could it be that you are using Orbeon Forms 3.6? <xxforms:variable> was introduced after the 3.6 release, and you will need to use a nightly build to use <xxforms:variable>. You can download the war of a nightly build from: http://forge.objectweb.org/nightlybuilds/ops/ops/ Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Yes, I was running 3.6 and 3.7 solves the problem! Thanks!
________________________________ From: [hidden email] on behalf of Alessandro Vernet Sent: Tue 8/19/2008 1:51 PM To: [hidden email] Subject: [ops-users] Re: xxforms:variable not working On Tue, Aug 19, 2008 at 9:04 AM, <[hidden email]> wrote: > ... I get the following error: 'Invalid element in XForms document: > xxforms:variable" when attempting to run this example. If the xxforms:variable > element is removed and "$type" replaced with "@color", the xforms page works > fine. Could it be that you are using Orbeon Forms 3.6? <xxforms:variable> was introduced after the 3.6 release, and you will need to use a nightly build to use <xxforms:variable>. You can download the war of a nightly build from: http://forge.objectweb.org/nightlybuilds/ops/ops/ Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet ************************************************************************************ This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. ************************************************************************************ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws winmail.dat (5K) Download Attachment |
Free forum by Nabble | Edit this page |