Hi,
having a spot of trouble getting xforms:repeat to work. Here is my code: View: ==== <html xmlns = "http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:aspic="http://www.cruk.com/aspic/editor/v1" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xi="http://orbeon.org/oxf/xml/xinclude" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsl:version="2.0"> <head> ... <xforms:model> <xforms:instance> <xi:include href="input:data"/> </xforms:instance> <!-- Do I need this next line? --> <xforms:bind nodeset="/results/users/aspic:user/aspic:username" type="xs:int"/> </xforms:model> ... </head> <body> ... <table width="50%"> <tr> <td> <b>Username</b> </td> <td> <b>Name</b> </td> <td> <b>Email</b> </td> </tr> <xforms:repeat nodeset="/results/users/aspic:user"> <tr> <td>username: <xforms:output ref="aspic:username"/></td> <td>name: <xforms:output ref="aspic:firstname"/>  <xforms:output ref="aspic:lastname"/></td> <td>email: <xforms:output ref="aspic:email"/></td> </tr> </xforms:repeat> </table> ... </body> </html> Instance: ======= <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> <xforms:instance> <results> <users xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> <aspic:user> <aspic:email/> <aspic:firstname/> <aspic:lastname/> <aspic:username/> <aspic:id/> </aspic:user> </users> <request-security> <auth-type/> <secure/> <remote-user/> <role/> </request-security> </results> </xforms:instance> </xforms:model> Resulting HTML: ============ <table width="50%"> <tr> <td><b>Username</b></td> <td><b>Name</b></td> <td><b>Email</b></td> </tr> <form id="wsrp_rewrite_form_1" action="/editor/users"> <input type="hidden" id="wsrp_rewrite_action_1" name="" value=""> <tr> <td>username: <input type="hidden" name="$node^thEAGko7jgc=" value=""> </td> <td>name: <input type="hidden" name="$node^kgJmi/61UQE=" value=""> <input type="hidden" name="$node^aPEU5B4O6yU=" value=""> </td> <td>email: <input type="hidden" name="$node^PAIYFi0+row=" value=""> </td> </tr> </form> </table> Can anyone tell me where I am going wrong? Thanks! Sincerely, Henrik Pettersen -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
<xforms:instance xmlns=""> ... Without this the <results> node may end up in the default namespace for your document, which would mean your nodeset of /results/users/... is empty, and the spec states that any controls bound to non-existent nodes are irrelevant (hidden). Adrian Henrik Pettersen wrote: Hi, -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Adrian,
Thank you for you help. I'm sure this was a problem, however, it does not seem to be the whole story. I removed the default namespace, and put every element in a namespace. I still cannot get xforms:repeat to work, even with this example: <xhtml:html xmlns="" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:aspic="http://www.cruk.com/aspic/editor/v1" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xi="http://orbeon.org/oxf/xml/xinclude" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:test="http://test.org" xsl:version="2.0"> <xhtml:head> ... <xforms:model> <xforms:instance id="test"> <test:results> <test:users> <test:user> <test:email>[hidden email]</test:email> <test:firstname>Henrik</test:firstname> <test:lastname>Pettersen</test:lastname> <test:username>admin</test:username> <test:id>0</test:id> </test:user> <test:user> <test:email>[hidden email]</test:email> <test:firstname>Henrik</test:firstname> <test:lastname>Pettersen</test:lastname> <test:username>henrikp</test:username> <test:id>1</test:id> </test:user> </test:users> </test:results> </xforms:instance> </xforms:model> </xhtml:head> <xhtml:body> ... <xforms:repeat nodeset="instance('test')/test:results/test:users/test:user"> <xhtml:td>username: <xforms:output ref="test:username"/></xhtml:td> </xforms:repeat> ... </xhtml:body> </xhtml:html> Can anyone spot the problem this time around? Thanks, everyone! Sincerely, Henrik Pettersen On 7/11/06, Adrian Baker <[hidden email]> wrote: > > Check that the <results> node really has a null namespace, ie > > <xforms:instance xmlns=""> > ... > > Without this the <results> node may end up in the default namespace for > your document, which would mean your nodeset of /results/users/... is empty, > and the spec states that any controls bound to non-existent nodes are > irrelevant (hidden). > > Adrian > > Henrik Pettersen wrote: > Hi, > > having a spot of trouble getting xforms:repeat to work. Here is my code: > > View: > ==== > <html xmlns = "http://www.w3.org/1999/xhtml" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:f="http://orbeon.org/oxf/xml/formatting" > xmlns:aspic="http://www.cruk.com/aspic/editor/v1" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:xi="http://orbeon.org/oxf/xml/xinclude" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xsl:version="2.0"> > > <head> > ... > <xforms:model> > <xforms:instance> > <xi:include href="input:data"/> > </xforms:instance> > <!-- Do I need this next line? --> > <xforms:bind > nodeset="/results/users/aspic:user/aspic:username" > type="xs:int"/> > </xforms:model> > ... > </head> > <body> > ... > <table width="50%"> > <tr> > <td> > <b>Username</b> > </td> > <td> > <b>Name</b> > </td> > <td> > <b>Email</b> > </td> > </tr> > <xforms:repeat nodeset="/results/users/aspic:user"> > <tr> > <td>username: <xforms:output ref="aspic:username"/></td> > <td>name: <xforms:output ref="aspic:firstname"/>  > <xforms:output ref="aspic:lastname"/></td> > <td>email: <xforms:output ref="aspic:email"/></td> > </tr> > </xforms:repeat> > </table> > ... > </body> > </html> > > > Instance: > ======= > <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms" > > xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> > <xforms:instance> > <results> > <users > xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> > <aspic:user> > <aspic:email/> > <aspic:firstname/> > <aspic:lastname/> > <aspic:username/> > <aspic:id/> > </aspic:user> > </users> > <request-security> > <auth-type/> > <secure/> > <remote-user/> > <role/> > </request-security> > </results> > </xforms:instance> > </xforms:model> > > Resulting HTML: > ============ > <table width="50%"> > <tr> > <td><b>Username</b></td> > <td><b>Name</b></td> > <td><b>Email</b></td> > </tr> > <form id="wsrp_rewrite_form_1" action="/editor/users"> > <input type="hidden" id="wsrp_rewrite_action_1" name="" value=""> > <tr> > <td>username: > <input type="hidden" name="$node^thEAGko7jgc=" value=""> > </td> > <td>name: > <input type="hidden" name="$node^kgJmi/61UQE=" value=""> > <input type="hidden" name="$node^aPEU5B4O6yU=" value=""> > </td> > <td>email: > <input type="hidden" name="$node^PAIYFi0+row=" value=""> > </td> > </tr> > </form> > </table> > > > Can anyone tell me where I am going wrong? > > Thanks! > > Sincerely, > Henrik Pettersen > > > ________________________________ > > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Henrik,
In your first email you had xforms:model/xforms:instance in the instance file, this is not necessary, you could have it start /results In the previously email you specify nodeset="instance('test')/test:results/test:users/test:user This will not bring back what you want because the root element test:results is already selected by the instance() function so it should be nodeset="instance('test')/test:users/test:user" That should work Ryan Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: Henrik Pettersen [mailto:[hidden email]] >Sent: 11 July 2006 22:30 >To: [hidden email] >Subject: Re: [ops-users] xforms:repeat > >Adrian, > >Thank you for you help. I'm sure this was a problem, however, it does >not seem to be the whole story. I removed the default namespace, and >put every element in a namespace. I still cannot get xforms:repeat to >work, even with this example: > ><xhtml:html xmlns="" > xmlns:xhtml="http://www.w3.org/1999/xhtml" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:f="http://orbeon.org/oxf/xml/formatting" > xmlns:aspic="http://www.cruk.com/aspic/editor/v1" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:xi="http://orbeon.org/oxf/xml/xinclude" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:test="http://test.org" > xsl:version="2.0"> > <xhtml:head> > ... > <xforms:model> > <xforms:instance id="test"> > <test:results> > <test:users> > <test:user> > ><test:email>[hidden email]</test:email> > <test:firstname>Henrik</test:firstname> > <test:lastname>Pettersen</test:lastname> > <test:username>admin</test:username> > <test:id>0</test:id> > </test:user> > <test:user> > <test:email>[hidden email]</test:email> > <test:firstname>Henrik</test:firstname> > <test:lastname>Pettersen</test:lastname> > <test:username>henrikp</test:username> > <test:id>1</test:id> > </test:user> > </test:users> > </test:results> > </xforms:instance> > </xforms:model> > </xhtml:head> > > <xhtml:body> > ... > <xforms:repeat >nodeset="instance('test')/test:results/test:users/test:user"> > <xhtml:td>username: <xforms:output ref="test:username"/></xhtml:td> > </xforms:repeat> > ... > </xhtml:body> ></xhtml:html> > >Can anyone spot the problem this time around? > >Thanks, everyone! > >Sincerely, >Henrik Pettersen > >On 7/11/06, Adrian Baker <[hidden email]> wrote: >> >> Check that the <results> node really has a null namespace, ie >> >> <xforms:instance xmlns=""> >> ... >> >> Without this the <results> node may end up in the default namespace for >> your document, which would mean your nodeset of /results/users/... is >empty, >> and the spec states that any controls bound to non-existent nodes are >> irrelevant (hidden). >> >> Adrian >> >> Henrik Pettersen wrote: >> Hi, >> >> having a spot of trouble getting xforms:repeat to work. Here is my code: >> >> View: >> ==== >> <html xmlns = "http://www.w3.org/1999/xhtml" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> xmlns:f="http://orbeon.org/oxf/xml/formatting" >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1" >> xmlns:xforms="http://www.w3.org/2002/xforms" >> xmlns:xi="http://orbeon.org/oxf/xml/xinclude" >> xmlns:ev="http://www.w3.org/2001/xml-events" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xsl:version="2.0"> >> >> <head> >> ... >> <xforms:model> >> <xforms:instance> >> <xi:include href="input:data"/> >> </xforms:instance> >> <!-- Do I need this next line? --> >> <xforms:bind >> nodeset="/results/users/aspic:user/aspic:username" >> type="xs:int"/> >> </xforms:model> >> ... >> </head> >> <body> >> ... >> <table width="50%"> >> <tr> >> <td> >> <b>Username</b> >> </td> >> <td> >> <b>Name</b> >> </td> >> <td> >> <b>Email</b> >> </td> >> </tr> >> <xforms:repeat nodeset="/results/users/aspic:user"> >> <tr> >> <td>username: <xforms:output ref="aspic:username"/></td> >> <td>name: <xforms:output ref="aspic:firstname"/>  >> <xforms:output ref="aspic:lastname"/></td> >> <td>email: <xforms:output ref="aspic:email"/></td> >> </tr> >> </xforms:repeat> >> </table> >> ... >> </body> >> </html> >> >> >> Instance: >> ======= >> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms" >> >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> >> <xforms:instance> >> <results> >> <users >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> >> <aspic:user> >> <aspic:email/> >> <aspic:firstname/> >> <aspic:lastname/> >> <aspic:username/> >> <aspic:id/> >> </aspic:user> >> </users> >> <request-security> >> <auth-type/> >> <secure/> >> <remote-user/> >> <role/> >> </request-security> >> </results> >> </xforms:instance> >> </xforms:model> >> >> Resulting HTML: >> ============ >> <table width="50%"> >> <tr> >> <td><b>Username</b></td> >> <td><b>Name</b></td> >> <td><b>Email</b></td> >> </tr> >> <form id="wsrp_rewrite_form_1" action="/editor/users"> >> <input type="hidden" id="wsrp_rewrite_action_1" name="" value=""> >> <tr> >> <td>username: >> <input type="hidden" name="$node^thEAGko7jgc=" value=""> >> </td> >> <td>name: >> <input type="hidden" name="$node^kgJmi/61UQE=" value=""> >> <input type="hidden" name="$node^aPEU5B4O6yU=" value=""> >> </td> >> <td>email: >> <input type="hidden" name="$node^PAIYFi0+row=" value=""> >> </td> >> </tr> >> </form> >> </table> >> >> >> Can anyone tell me where I am going wrong? >> >> Thanks! >> >> Sincerely, >> Henrik Pettersen >> >> >> ________________________________ >> >> >> -- >> 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 >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >> >> >> >> >> -- >> 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 >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >> >> >> -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Ryan,
thank you for your help. I feel that we are getting there now. I am still having some issues, though. Here is the code again, with the changes suggested by you: <xhtml:html xmlns="" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:aspic="http://www.cruk.com/aspic/editor/v1" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xi="http://orbeon.org/oxf/xml/xinclude" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:test="http://test.org" xsl:version="2.0"> <xhtml:head> <xhtml:meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <xhtml:title> xhtml:list all users </xhtml:title> <xforms:model> <xforms:instance id="test"> <test:results> <test:users> <test:user> <test:email>[hidden email]</test:email> <test:firstname>Henrik</test:firstname> <test:lastname>Pettersen</test:lastname> <test:username>admin</test:username> <test:id>0</test:id> </test:user> <test:user> <test:email>[hidden email]</test:email> <test:firstname>Henrik</test:firstname> <test:lastname>Pettersen</test:lastname> <test:username>henrikp</test:username> <test:id>1</test:id> </test:user> </test:users> <test:request-security> <test:secure>false</test:secure> </test:request-security> </test:results> </xforms:instance> </xforms:model> </xhtml:head> <xhtml:body> ... <xforms:repeat nodeset="instance('test')/test:users/test:user"> <xhtml:td>username: <xforms:output ref="test:username"/></xhtml:td> </xforms:repeat> ... </xhtml:body> </xhtml:html> This time around I am getting an error message: "The following error has occurred: Error Message An empty sequence is not allowed as the value of variable $current-repeat-index" And this is the stacktrace: " org.orbeon.oxf.common.ValidationException: Condition failed for every branch of choose: [ends-with( /request/request-path, '.css' ) or ends-with( /request/request-path, '.js' ), (/request/request-path = '/xforms-server-submit'), (/request/request-path = '/'), (/request/request-path = '/home'), (/request/request-path = '/login'), (/request/request-path = '/login-error'), (/request/request-path = '/ users'), (/request/request-path = '/config/theme/orbeon-layout.cssd')]: Condition failed for every branch of choose: [ends-with( /request/request-path, '.css' ) or ends-with( /request/request-path, '. js' ), (/request/request-path = '/xforms-server-submit'), (/request/request-path = '/'), (/request/request-path = '/home'), (/request/request-path = '/login'), (/request/request-path = '/login-error') , (/request/request-path = '/users'), (/request/request-path = '/config/theme/orbeon-layout.cssd')] at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:212) at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor$1.getKeyImpl(ConcreteChooseProcessor.java:129) at org.orbeon.oxf.processor.ProcessorImpl$6.getKey(ProcessorImpl.java:991) at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(ProcessorImpl.java:1181) at org.orbeon.oxf.processor.pipeline.TeeProcessor$1.getKeyImpl(TeeProcessor.java:79) at org.orbeon.oxf.processor.ProcessorImpl$6.getKey(ProcessorImpl.java:991) at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(ProcessorImpl.java:1181) at org.orbeon.oxf.processor.ProcessorImpl.getInputKey(ProcessorImpl.java:1191) at org.orbeon.oxf.processor.ProcessorImpl.getInputKeyValidity(ProcessorImpl.java:1222) at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:456) at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsDOM4J(ProcessorImpl.java:426) at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:185) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcessor.java:652) at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649) at org.orbeon.oxf.processor.PageFlowControllerProcessor.start(PageFlowControllerProcessor.java:416) at org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:86) at org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:95) at org.orbeon.oxf.servlet.OPSServletDelegate.service(OPSServletDelegate.java:144) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:74) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) " Almost there! Can anyone help me spot the error? Thank you all for your help so far! Sincerely, Henrik Pettersen On 7/11/06, Ryan Puddephatt <[hidden email]> wrote: > Henrik, > In your first email you had xforms:model/xforms:instance in the > instance file, this is not necessary, you could have it start /results > > In the previously email you specify > > nodeset="instance('test')/test:results/test:users/test:user > > This will not bring back what you want because the root element test:results > is already selected by the instance() function so it should be > > nodeset="instance('test')/test:users/test:user" > > That should work > > Ryan > > Ryan Puddephatt > Software Engineer > TFX Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotand > EH54 7DP > > * [hidden email] > ( 01506 407 110 > 7 01506 407 108 > > >-----Original Message----- > >From: Henrik Pettersen [mailto:[hidden email]] > >Sent: 11 July 2006 22:30 > >To: [hidden email] > >Subject: Re: [ops-users] xforms:repeat > > > >Adrian, > > > >Thank you for you help. I'm sure this was a problem, however, it does > >not seem to be the whole story. I removed the default namespace, and > >put every element in a namespace. I still cannot get xforms:repeat to > >work, even with this example: > > > ><xhtml:html xmlns="" > > xmlns:xhtml="http://www.w3.org/1999/xhtml" > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > xmlns:f="http://orbeon.org/oxf/xml/formatting" > > xmlns:aspic="http://www.cruk.com/aspic/editor/v1" > > xmlns:xforms="http://www.w3.org/2002/xforms" > > xmlns:xi="http://orbeon.org/oxf/xml/xinclude" > > xmlns:ev="http://www.w3.org/2001/xml-events" > > xmlns:xs="http://www.w3.org/2001/XMLSchema" > > xmlns:test="http://test.org" > > xsl:version="2.0"> > > <xhtml:head> > > ... > > <xforms:model> > > <xforms:instance id="test"> > > <test:results> > > <test:users> > > <test:user> > > > ><test:email>[hidden email]</test:email> > > <test:firstname>Henrik</test:firstname> > > <test:lastname>Pettersen</test:lastname> > > <test:username>admin</test:username> > > <test:id>0</test:id> > > </test:user> > > <test:user> > > <test:email>[hidden email]</test:email> > > <test:firstname>Henrik</test:firstname> > > <test:lastname>Pettersen</test:lastname> > > <test:username>henrikp</test:username> > > <test:id>1</test:id> > > </test:user> > > </test:users> > > </test:results> > > </xforms:instance> > > </xforms:model> > > </xhtml:head> > > > > <xhtml:body> > > ... > > <xforms:repeat > >nodeset="instance('test')/test:results/test:users/test:user"> > > <xhtml:td>username: <xforms:output ref="test:username"/></xhtml:td> > > </xforms:repeat> > > ... > > </xhtml:body> > ></xhtml:html> > > > >Can anyone spot the problem this time around? > > > >Thanks, everyone! > > > >Sincerely, > >Henrik Pettersen > > > >On 7/11/06, Adrian Baker <[hidden email]> wrote: > >> > >> Check that the <results> node really has a null namespace, ie > >> > >> <xforms:instance xmlns=""> > >> ... > >> > >> Without this the <results> node may end up in the default namespace for > >> your document, which would mean your nodeset of /results/users/... is > >empty, > >> and the spec states that any controls bound to non-existent nodes are > >> irrelevant (hidden). > >> > >> Adrian > >> > >> Henrik Pettersen wrote: > >> Hi, > >> > >> having a spot of trouble getting xforms:repeat to work. Here is my code: > >> > >> View: > >> ==== > >> <html xmlns = "http://www.w3.org/1999/xhtml" > >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > >> xmlns:f="http://orbeon.org/oxf/xml/formatting" > >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1" > >> xmlns:xforms="http://www.w3.org/2002/xforms" > >> xmlns:xi="http://orbeon.org/oxf/xml/xinclude" > >> xmlns:ev="http://www.w3.org/2001/xml-events" > >> xmlns:xs="http://www.w3.org/2001/XMLSchema" > >> xsl:version="2.0"> > >> > >> <head> > >> ... > >> <xforms:model> > >> <xforms:instance> > >> <xi:include href="input:data"/> > >> </xforms:instance> > >> <!-- Do I need this next line? --> > >> <xforms:bind > >> nodeset="/results/users/aspic:user/aspic:username" > >> type="xs:int"/> > >> </xforms:model> > >> ... > >> </head> > >> <body> > >> ... > >> <table width="50%"> > >> <tr> > >> <td> > >> <b>Username</b> > >> </td> > >> <td> > >> <b>Name</b> > >> </td> > >> <td> > >> <b>Email</b> > >> </td> > >> </tr> > >> <xforms:repeat nodeset="/results/users/aspic:user"> > >> <tr> > >> <td>username: <xforms:output ref="aspic:username"/></td> > >> <td>name: <xforms:output ref="aspic:firstname"/>  > >> <xforms:output ref="aspic:lastname"/></td> > >> <td>email: <xforms:output ref="aspic:email"/></td> > >> </tr> > >> </xforms:repeat> > >> </table> > >> ... > >> </body> > >> </html> > >> > >> > >> Instance: > >> ======= > >> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms" > >> > >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> > >> <xforms:instance> > >> <results> > >> <users > >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> > >> <aspic:user> > >> <aspic:email/> > >> <aspic:firstname/> > >> <aspic:lastname/> > >> <aspic:username/> > >> <aspic:id/> > >> </aspic:user> > >> </users> > >> <request-security> > >> <auth-type/> > >> <secure/> > >> <remote-user/> > >> <role/> > >> </request-security> > >> </results> > >> </xforms:instance> > >> </xforms:model> > >> > >> Resulting HTML: > >> ============ > >> <table width="50%"> > >> <tr> > >> <td><b>Username</b></td> > >> <td><b>Name</b></td> > >> <td><b>Email</b></td> > >> </tr> > >> <form id="wsrp_rewrite_form_1" action="/editor/users"> > >> <input type="hidden" id="wsrp_rewrite_action_1" name="" value=""> > >> <tr> > >> <td>username: > >> <input type="hidden" name="$node^thEAGko7jgc=" value=""> > >> </td> > >> <td>name: > >> <input type="hidden" name="$node^kgJmi/61UQE=" value=""> > >> <input type="hidden" name="$node^aPEU5B4O6yU=" value=""> > >> </td> > >> <td>email: > >> <input type="hidden" name="$node^PAIYFi0+row=" value=""> > >> </td> > >> </tr> > >> </form> > >> </table> > >> > >> > >> Can anyone tell me where I am going wrong? > >> > >> Thanks! > >> > >> Sincerely, > >> Henrik Pettersen > >> > >> > >> ________________________________ > >> > >> > >> -- > >> 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 > >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > >> > >> > >> > >> > >> -- > >> 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 > >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > >> > >> > >> > > > > > > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Henrik,
This looks like the url for the page is incorrect. The options are /login-error /login /home /users Have you got the correct url? Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: Henrik Pettersen [mailto:[hidden email]] >Sent: 11 July 2006 23:48 >To: [hidden email] >Subject: Re: [ops-users] xforms:repeat > >Ryan, > >thank you for your help. I feel that we are getting there now. I am >still having some issues, though. Here is the code again, with the >changes suggested by you: > ><xhtml:html xmlns="" > xmlns:xhtml="http://www.w3.org/1999/xhtml" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:f="http://orbeon.org/oxf/xml/formatting" > xmlns:aspic="http://www.cruk.com/aspic/editor/v1" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:xi="http://orbeon.org/oxf/xml/xinclude" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:test="http://test.org" > xsl:version="2.0"> > <xhtml:head> > <xhtml:meta http-equiv="Content-Type" content="text/html; >charset=UTF-8" /> > <xhtml:title> xhtml:list all users </xhtml:title> > <xforms:model> > <xforms:instance id="test"> > <test:results> > <test:users> > <test:user> > ><test:email>[hidden email]</test:email> > <test:firstname>Henrik</test:firstname> > <test:lastname>Pettersen</test:lastname> > <test:username>admin</test:username> > <test:id>0</test:id> > </test:user> > <test:user> > <test:email>[hidden email]</test:email> > <test:firstname>Henrik</test:firstname> > <test:lastname>Pettersen</test:lastname> > <test:username>henrikp</test:username> > <test:id>1</test:id> > </test:user> > </test:users> > <test:request-security> > <test:secure>false</test:secure> > </test:request-security> > </test:results> > </xforms:instance> > </xforms:model> > </xhtml:head> > > <xhtml:body> > ... > <xforms:repeat nodeset="instance('test')/test:users/test:user"> > <xhtml:td>username: <xforms:output ref="test:username"/></xhtml:td> > </xforms:repeat> > ... > </xhtml:body> ></xhtml:html> > >This time around I am getting an error message: > >"The following error has occurred: >Error Message >An empty sequence is not allowed as the value of variable $current-repeat- >index" > >And this is the stacktrace: > >" >org.orbeon.oxf.common.ValidationException: Condition failed for every >branch of choose: [ends-with( /request/request-path, '.css' ) or >ends-with( /request/request-path, '.js' ), (/request/request-path > = '/xforms-server-submit'), (/request/request-path = '/'), >(/request/request-path = '/home'), (/request/request-path = '/login'), >(/request/request-path = '/login-error'), (/request/request-path = '/ >users'), (/request/request-path = >'/config/theme/orbeon-layout.cssd')]: Condition failed for every >branch of choose: [ends-with( /request/request-path, '.css' ) or >ends-with( /request/request-path, '. >js' ), (/request/request-path = '/xforms-server-submit'), >(/request/request-path = '/'), (/request/request-path = '/home'), >(/request/request-path = '/login'), (/request/request-path = >'/login-error') >, (/request/request-path = '/users'), (/request/request-path = >'/config/theme/orbeon-layout.cssd')] > at >org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(Conc >reteChooseProcessor.java:212) > at >org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor$1.getKeyIm >pl(ConcreteChooseProcessor.java:129) > at >org.orbeon.oxf.processor.ProcessorImpl$6.getKey(ProcessorImpl.java:991) > at >org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(Processor >Impl.java:1181) > at >org.orbeon.oxf.processor.pipeline.TeeProcessor$1.getKeyImpl(TeeProcessor.ja >va:79) > at >org.orbeon.oxf.processor.ProcessorImpl$6.getKey(ProcessorImpl.java:991) > at >org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(Processor >Impl.java:1181) > at >org.orbeon.oxf.processor.ProcessorImpl.getInputKey(ProcessorImpl.java:1191) > at >org.orbeon.oxf.processor.ProcessorImpl.getInputKeyValidity(ProcessorImpl.ja >va:1222) > at >org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl >.java:456) > at >org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsDOM4J(ProcessorImpl. >java:426) > at >org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(Conc >reteChooseProcessor.java:185) > at >org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcesso >r.java:652) > at >org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:5 >15) > at >org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor >.java:649) > at >org.orbeon.oxf.processor.PageFlowControllerProcessor.start(PageFlowControll >erProcessor.java:416) > at >org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:86) > at >org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:95) > at >org.orbeon.oxf.servlet.OPSServletDelegate.service(OPSServletDelegate.java:1 >44) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:74) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio >nFilterChain.java:252) > at >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC >hain.java:173) > at >org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j >ava:213) > at >org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j >ava:178) > at >org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas >e.java:432) > at >org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12 >6) > at >org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 >5) > at >org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav >a:107) > at >org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) > at >org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) > at >org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.process >Connection(Http11BaseProtocol.java:664) > at >org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.ja >va:527) > at >org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerW >orkerThread.java:80) > at >org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja >va:684) > at java.lang.Thread.run(Thread.java:595) >" > >Almost there! Can anyone help me spot the error? > >Thank you all for your help so far! > >Sincerely, >Henrik Pettersen > > >On 7/11/06, Ryan Puddephatt <[hidden email]> wrote: >> Henrik, >> In your first email you had xforms:model/xforms:instance in the >> instance file, this is not necessary, you could have it start /results >> >> In the previously email you specify >> >> nodeset="instance('test')/test:results/test:users/test:user >> >> This will not bring back what you want because the root element >test:results >> is already selected by the instance() function so it should be >> >> nodeset="instance('test')/test:users/test:user" >> >> That should work >> >> Ryan >> >> Ryan Puddephatt >> Software Engineer >> TFX Group - IT UK >> 1 Michaelson Square >> Livingston >> West Lothian >> Scotand >> EH54 7DP >> >> * [hidden email] >> ( 01506 407 110 >> 7 01506 407 108 >> >> >-----Original Message----- >> >From: Henrik Pettersen [mailto:[hidden email]] >> >Sent: 11 July 2006 22:30 >> >To: [hidden email] >> >Subject: Re: [ops-users] xforms:repeat >> > >> >Adrian, >> > >> >Thank you for you help. I'm sure this was a problem, however, it does >> >not seem to be the whole story. I removed the default namespace, and >> >put every element in a namespace. I still cannot get xforms:repeat to >> >work, even with this example: >> > >> ><xhtml:html xmlns="" >> > xmlns:xhtml="http://www.w3.org/1999/xhtml" >> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> > xmlns:f="http://orbeon.org/oxf/xml/formatting" >> > xmlns:aspic="http://www.cruk.com/aspic/editor/v1" >> > xmlns:xforms="http://www.w3.org/2002/xforms" >> > xmlns:xi="http://orbeon.org/oxf/xml/xinclude" >> > xmlns:ev="http://www.w3.org/2001/xml-events" >> > xmlns:xs="http://www.w3.org/2001/XMLSchema" >> > xmlns:test="http://test.org" >> > xsl:version="2.0"> >> > <xhtml:head> >> > ... >> > <xforms:model> >> > <xforms:instance id="test"> >> > <test:results> >> > <test:users> >> > <test:user> >> > >> ><test:email>[hidden email]</test:email> >> > <test:firstname>Henrik</test:firstname> >> > <test:lastname>Pettersen</test:lastname> >> > <test:username>admin</test:username> >> > <test:id>0</test:id> >> > </test:user> >> > <test:user> >> > <test:email>[hidden email]</test:email> >> > <test:firstname>Henrik</test:firstname> >> > <test:lastname>Pettersen</test:lastname> >> > <test:username>henrikp</test:username> >> > <test:id>1</test:id> >> > </test:user> >> > </test:users> >> > </test:results> >> > </xforms:instance> >> > </xforms:model> >> > </xhtml:head> >> > >> > <xhtml:body> >> > ... >> > <xforms:repeat >> >nodeset="instance('test')/test:results/test:users/test:user"> >> > <xhtml:td>username: <xforms:output >ref="test:username"/></xhtml:td> >> > </xforms:repeat> >> > ... >> > </xhtml:body> >> ></xhtml:html> >> > >> >Can anyone spot the problem this time around? >> > >> >Thanks, everyone! >> > >> >Sincerely, >> >Henrik Pettersen >> > >> >On 7/11/06, Adrian Baker <[hidden email]> wrote: >> >> >> >> Check that the <results> node really has a null namespace, ie >> >> >> >> <xforms:instance xmlns=""> >> >> ... >> >> >> >> Without this the <results> node may end up in the default namespace >for >> >> your document, which would mean your nodeset of /results/users/... is >> >empty, >> >> and the spec states that any controls bound to non-existent nodes are >> >> irrelevant (hidden). >> >> >> >> Adrian >> >> >> >> Henrik Pettersen wrote: >> >> Hi, >> >> >> >> having a spot of trouble getting xforms:repeat to work. Here is my >code: >> >> >> >> View: >> >> ==== >> >> <html xmlns = "http://www.w3.org/1999/xhtml" >> >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> >> xmlns:f="http://orbeon.org/oxf/xml/formatting" >> >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1" >> >> xmlns:xforms="http://www.w3.org/2002/xforms" >> >> xmlns:xi="http://orbeon.org/oxf/xml/xinclude" >> >> xmlns:ev="http://www.w3.org/2001/xml-events" >> >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> >> xsl:version="2.0"> >> >> >> >> <head> >> >> ... >> >> <xforms:model> >> >> <xforms:instance> >> >> <xi:include href="input:data"/> >> >> </xforms:instance> >> >> <!-- Do I need this next line? --> >> >> <xforms:bind >> >> nodeset="/results/users/aspic:user/aspic:username" >> >> type="xs:int"/> >> >> </xforms:model> >> >> ... >> >> </head> >> >> <body> >> >> ... >> >> <table width="50%"> >> >> <tr> >> >> <td> >> >> <b>Username</b> >> >> </td> >> >> <td> >> >> <b>Name</b> >> >> </td> >> >> <td> >> >> <b>Email</b> >> >> </td> >> >> </tr> >> >> <xforms:repeat nodeset="/results/users/aspic:user"> >> >> <tr> >> >> <td>username: <xforms:output ref="aspic:username"/></td> >> >> <td>name: <xforms:output ref="aspic:firstname"/>  >> >> <xforms:output ref="aspic:lastname"/></td> >> >> <td>email: <xforms:output ref="aspic:email"/></td> >> >> </tr> >> >> </xforms:repeat> >> >> </table> >> >> ... >> >> </body> >> >> </html> >> >> >> >> >> >> Instance: >> >> ======= >> >> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms" >> >> >> >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> >> >> <xforms:instance> >> >> <results> >> >> <users >> >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> >> >> <aspic:user> >> >> <aspic:email/> >> >> <aspic:firstname/> >> >> <aspic:lastname/> >> >> <aspic:username/> >> >> <aspic:id/> >> >> </aspic:user> >> >> </users> >> >> <request-security> >> >> <auth-type/> >> >> <secure/> >> >> <remote-user/> >> >> <role/> >> >> </request-security> >> >> </results> >> >> </xforms:instance> >> >> </xforms:model> >> >> >> >> Resulting HTML: >> >> ============ >> >> <table width="50%"> >> >> <tr> >> >> <td><b>Username</b></td> >> >> <td><b>Name</b></td> >> >> <td><b>Email</b></td> >> >> </tr> >> >> <form id="wsrp_rewrite_form_1" action="/editor/users"> >> >> <input type="hidden" id="wsrp_rewrite_action_1" name="" value=""> >> >> <tr> >> >> <td>username: >> >> <input type="hidden" name="$node^thEAGko7jgc=" value=""> >> >> </td> >> >> <td>name: >> >> <input type="hidden" name="$node^kgJmi/61UQE=" >value=""> >> >> <input type="hidden" name="$node^aPEU5B4O6yU=" value=""> >> >> </td> >> >> <td>email: >> >> <input type="hidden" name="$node^PAIYFi0+row=" value=""> >> >> </td> >> >> </tr> >> >> </form> >> >> </table> >> >> >> >> >> >> Can anyone tell me where I am going wrong? >> >> >> >> Thanks! >> >> >> >> Sincerely, >> >> Henrik Pettersen >> >> >> >> >> >> ________________________________ >> >> >> >> >> >> -- >> >> You receive this message as a subscriber of the ops- >[hidden email] >> >> mailing list. >> >> To unsubscribe: mailto:[hidden email] >> >> For general help: mailto:[hidden email]?subject=help >> >> ObjectWeb mailing lists service home page: >http://www.objectweb.org/wws >> >> >> >> >> >> >> >> >> >> -- >> >> You receive this message as a subscriber of the ops- >[hidden email] >> >> mailing list. >> >> To unsubscribe: mailto:[hidden email] >> >> For general help: mailto:[hidden email]?subject=help >> >> ObjectWeb mailing lists service home page: >http://www.objectweb.org/wws >> >> >> >> >> >> >> >> >> >> >> >> >> -- >> 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 >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >> >> >> -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Ryan,
the URL that I am using is this: http://localhost:8080/editor/users Here is my pageflow definiton: <c:page path-info="/users" xforms="oxf:/users/users.xforms.xml" view="oxf:/users/users.view.xsl" model="oxf:/users/users.model.xpl" /> Also, if I comment out the <xforms:repeat> element like this: <!--xforms:repeat nodeset="instance('test')/test:users/test:user"> username: <xforms:output ref="test:username"/> </xforms:repeat--> I do not get any error messages. Also, rendering my data using xsl:for-each works like a peach (just not xforms:repeat). I am running: java version "1.5.0_06" apache-tomcat-5.5.17 ops-3.0.1.200602032326 Thanks for all your help! Sincerely, Henrik Pettersen On 7/12/06, Ryan Puddephatt <[hidden email]> wrote: > Henrik, > This looks like the url for the page is incorrect. The options are > /login-error > /login > /home > /users > > Have you got the correct url? > > Ryan Puddephatt > Software Engineer > TFX Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotand > EH54 7DP > > * [hidden email] > ( 01506 407 110 > 7 01506 407 108 > > > >-----Original Message----- > >From: Henrik Pettersen [mailto:[hidden email]] > >Sent: 11 July 2006 23:48 > >To: [hidden email] > >Subject: Re: [ops-users] xforms:repeat > > > >Ryan, > > > >thank you for your help. I feel that we are getting there now. I am > >still having some issues, though. Here is the code again, with the > >changes suggested by you: > > > ><xhtml:html xmlns="" > > xmlns:xhtml="http://www.w3.org/1999/xhtml" > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > xmlns:f="http://orbeon.org/oxf/xml/formatting" > > xmlns:aspic="http://www.cruk.com/aspic/editor/v1" > > xmlns:xforms="http://www.w3.org/2002/xforms" > > xmlns:xi="http://orbeon.org/oxf/xml/xinclude" > > xmlns:ev="http://www.w3.org/2001/xml-events" > > xmlns:xs="http://www.w3.org/2001/XMLSchema" > > xmlns:test="http://test.org" > > xsl:version="2.0"> > > <xhtml:head> > > <xhtml:meta http-equiv="Content-Type" content="text/html; > >charset=UTF-8" /> > > <xhtml:title> xhtml:list all users </xhtml:title> > > <xforms:model> > > <xforms:instance id="test"> > > <test:results> > > <test:users> > > <test:user> > > > ><test:email>[hidden email]</test:email> > > <test:firstname>Henrik</test:firstname> > > <test:lastname>Pettersen</test:lastname> > > <test:username>admin</test:username> > > <test:id>0</test:id> > > </test:user> > > <test:user> > > <test:email>[hidden email]</test:email> > > <test:firstname>Henrik</test:firstname> > > <test:lastname>Pettersen</test:lastname> > > <test:username>henrikp</test:username> > > <test:id>1</test:id> > > </test:user> > > </test:users> > > <test:request-security> > > <test:secure>false</test:secure> > > </test:request-security> > > </test:results> > > </xforms:instance> > > </xforms:model> > > </xhtml:head> > > > > <xhtml:body> > > ... > > <xforms:repeat nodeset="instance('test')/test:users/test:user"> > > <xhtml:td>username: <xforms:output ref="test:username"/></xhtml:td> > > </xforms:repeat> > > ... > > </xhtml:body> > ></xhtml:html> > > > >This time around I am getting an error message: > > > >"The following error has occurred: > >Error Message > >An empty sequence is not allowed as the value of variable $current-repeat- > >index" > > > >And this is the stacktrace: > > > >" > >org.orbeon.oxf.common.ValidationException: Condition failed for every > >branch of choose: [ends-with( /request/request-path, '.css' ) or > >ends-with( /request/request-path, '.js' ), (/request/request-path > > = '/xforms-server-submit'), (/request/request-path = '/'), > >(/request/request-path = '/home'), (/request/request-path = '/login'), > >(/request/request-path = '/login-error'), (/request/request-path = '/ > >users'), (/request/request-path = > >'/config/theme/orbeon-layout.cssd')]: Condition failed for every > >branch of choose: [ends-with( /request/request-path, '.css' ) or > >ends-with( /request/request-path, '. > >js' ), (/request/request-path = '/xforms-server-submit'), > >(/request/request-path = '/'), (/request/request-path = '/home'), > >(/request/request-path = '/login'), (/request/request-path = > >'/login-error') > >, (/request/request-path = '/users'), (/request/request-path = > >'/config/theme/orbeon-layout.cssd')] > > at > >org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(Conc > >reteChooseProcessor.java:212) > > at > >org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor$1.getKeyIm > >pl(ConcreteChooseProcessor.java:129) > > at > >org.orbeon.oxf.processor.ProcessorImpl$6.getKey(ProcessorImpl.java:991) > > at > >org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(Processor > >Impl.java:1181) > > at > >org.orbeon.oxf.processor.pipeline.TeeProcessor$1.getKeyImpl(TeeProcessor.ja > >va:79) > > at > >org.orbeon.oxf.processor.ProcessorImpl$6.getKey(ProcessorImpl.java:991) > > at > >org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(Processor > >Impl.java:1181) > > at > >org.orbeon.oxf.processor.ProcessorImpl.getInputKey(ProcessorImpl.java:1191) > > at > >org.orbeon.oxf.processor.ProcessorImpl.getInputKeyValidity(ProcessorImpl.ja > >va:1222) > > at > >org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl > >.java:456) > > at > >org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsDOM4J(ProcessorImpl. > >java:426) > > at > >org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(Conc > >reteChooseProcessor.java:185) > > at > >org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcesso > >r.java:652) > > at > >org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:5 > >15) > > at > >org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor > >.java:649) > > at > >org.orbeon.oxf.processor.PageFlowControllerProcessor.start(PageFlowControll > >erProcessor.java:416) > > at > >org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:86) > > at > >org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:95) > > at > >org.orbeon.oxf.servlet.OPSServletDelegate.service(OPSServletDelegate.java:1 > >44) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > at org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:74) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > at > >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio > >nFilterChain.java:252) > > at > >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC > >hain.java:173) > > at > >org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j > >ava:213) > > at > >org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j > >ava:178) > > at > >org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas > >e.java:432) > > at > >org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12 > >6) > > at > >org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 > >5) > > at > >org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav > >a:107) > > at > >org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) > > at > >org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) > > at > >org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.process > >Connection(Http11BaseProtocol.java:664) > > at > >org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.ja > >va:527) > > at > >org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerW > >orkerThread.java:80) > > at > >org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja > >va:684) > > at java.lang.Thread.run(Thread.java:595) > >" > > > >Almost there! Can anyone help me spot the error? > > > >Thank you all for your help so far! > > > >Sincerely, > >Henrik Pettersen > > > > > >On 7/11/06, Ryan Puddephatt <[hidden email]> wrote: > >> Henrik, > >> In your first email you had xforms:model/xforms:instance in the > >> instance file, this is not necessary, you could have it start /results > >> > >> In the previously email you specify > >> > >> nodeset="instance('test')/test:results/test:users/test:user > >> > >> This will not bring back what you want because the root element > >test:results > >> is already selected by the instance() function so it should be > >> > >> nodeset="instance('test')/test:users/test:user" > >> > >> That should work > >> > >> Ryan > >> > >> Ryan Puddephatt > >> Software Engineer > >> TFX Group - IT UK > >> 1 Michaelson Square > >> Livingston > >> West Lothian > >> Scotand > >> EH54 7DP > >> > >> * [hidden email] > >> ( 01506 407 110 > >> 7 01506 407 108 > >> > >> >-----Original Message----- > >> >From: Henrik Pettersen [mailto:[hidden email]] > >> >Sent: 11 July 2006 22:30 > >> >To: [hidden email] > >> >Subject: Re: [ops-users] xforms:repeat > >> > > >> >Adrian, > >> > > >> >Thank you for you help. I'm sure this was a problem, however, it does > >> >not seem to be the whole story. I removed the default namespace, and > >> >put every element in a namespace. I still cannot get xforms:repeat to > >> >work, even with this example: > >> > > >> ><xhtml:html xmlns="" > >> > xmlns:xhtml="http://www.w3.org/1999/xhtml" > >> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > >> > xmlns:f="http://orbeon.org/oxf/xml/formatting" > >> > xmlns:aspic="http://www.cruk.com/aspic/editor/v1" > >> > xmlns:xforms="http://www.w3.org/2002/xforms" > >> > xmlns:xi="http://orbeon.org/oxf/xml/xinclude" > >> > xmlns:ev="http://www.w3.org/2001/xml-events" > >> > xmlns:xs="http://www.w3.org/2001/XMLSchema" > >> > xmlns:test="http://test.org" > >> > xsl:version="2.0"> > >> > <xhtml:head> > >> > ... > >> > <xforms:model> > >> > <xforms:instance id="test"> > >> > <test:results> > >> > <test:users> > >> > <test:user> > >> > > >> ><test:email>[hidden email]</test:email> > >> > <test:firstname>Henrik</test:firstname> > >> > <test:lastname>Pettersen</test:lastname> > >> > <test:username>admin</test:username> > >> > <test:id>0</test:id> > >> > </test:user> > >> > <test:user> > >> > <test:email>[hidden email]</test:email> > >> > <test:firstname>Henrik</test:firstname> > >> > <test:lastname>Pettersen</test:lastname> > >> > <test:username>henrikp</test:username> > >> > <test:id>1</test:id> > >> > </test:user> > >> > </test:users> > >> > </test:results> > >> > </xforms:instance> > >> > </xforms:model> > >> > </xhtml:head> > >> > > >> > <xhtml:body> > >> > ... > >> > <xforms:repeat > >> >nodeset="instance('test')/test:results/test:users/test:user"> > >> > <xhtml:td>username: <xforms:output > >ref="test:username"/></xhtml:td> > >> > </xforms:repeat> > >> > ... > >> > </xhtml:body> > >> ></xhtml:html> > >> > > >> >Can anyone spot the problem this time around? > >> > > >> >Thanks, everyone! > >> > > >> >Sincerely, > >> >Henrik Pettersen > >> > > >> >On 7/11/06, Adrian Baker <[hidden email]> wrote: > >> >> > >> >> Check that the <results> node really has a null namespace, ie > >> >> > >> >> <xforms:instance xmlns=""> > >> >> ... > >> >> > >> >> Without this the <results> node may end up in the default namespace > >for > >> >> your document, which would mean your nodeset of /results/users/... is > >> >empty, > >> >> and the spec states that any controls bound to non-existent nodes are > >> >> irrelevant (hidden). > >> >> > >> >> Adrian > >> >> > >> >> Henrik Pettersen wrote: > >> >> Hi, > >> >> > >> >> having a spot of trouble getting xforms:repeat to work. Here is my > >code: > >> >> > >> >> View: > >> >> ==== > >> >> <html xmlns = "http://www.w3.org/1999/xhtml" > >> >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > >> >> xmlns:f="http://orbeon.org/oxf/xml/formatting" > >> >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1" > >> >> xmlns:xforms="http://www.w3.org/2002/xforms" > >> >> xmlns:xi="http://orbeon.org/oxf/xml/xinclude" > >> >> xmlns:ev="http://www.w3.org/2001/xml-events" > >> >> xmlns:xs="http://www.w3.org/2001/XMLSchema" > >> >> xsl:version="2.0"> > >> >> > >> >> <head> > >> >> ... > >> >> <xforms:model> > >> >> <xforms:instance> > >> >> <xi:include href="input:data"/> > >> >> </xforms:instance> > >> >> <!-- Do I need this next line? --> > >> >> <xforms:bind > >> >> nodeset="/results/users/aspic:user/aspic:username" > >> >> type="xs:int"/> > >> >> </xforms:model> > >> >> ... > >> >> </head> > >> >> <body> > >> >> ... > >> >> <table width="50%"> > >> >> <tr> > >> >> <td> > >> >> <b>Username</b> > >> >> </td> > >> >> <td> > >> >> <b>Name</b> > >> >> </td> > >> >> <td> > >> >> <b>Email</b> > >> >> </td> > >> >> </tr> > >> >> <xforms:repeat nodeset="/results/users/aspic:user"> > >> >> <tr> > >> >> <td>username: <xforms:output ref="aspic:username"/></td> > >> >> <td>name: <xforms:output ref="aspic:firstname"/>  > >> >> <xforms:output ref="aspic:lastname"/></td> > >> >> <td>email: <xforms:output ref="aspic:email"/></td> > >> >> </tr> > >> >> </xforms:repeat> > >> >> </table> > >> >> ... > >> >> </body> > >> >> </html> > >> >> > >> >> > >> >> Instance: > >> >> ======= > >> >> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms" > >> >> > >> >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> > >> >> <xforms:instance> > >> >> <results> > >> >> <users > >> >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> > >> >> <aspic:user> > >> >> <aspic:email/> > >> >> <aspic:firstname/> > >> >> <aspic:lastname/> > >> >> <aspic:username/> > >> >> <aspic:id/> > >> >> </aspic:user> > >> >> </users> > >> >> <request-security> > >> >> <auth-type/> > >> >> <secure/> > >> >> <remote-user/> > >> >> <role/> > >> >> </request-security> > >> >> </results> > >> >> </xforms:instance> > >> >> </xforms:model> > >> >> > >> >> Resulting HTML: > >> >> ============ > >> >> <table width="50%"> > >> >> <tr> > >> >> <td><b>Username</b></td> > >> >> <td><b>Name</b></td> > >> >> <td><b>Email</b></td> > >> >> </tr> > >> >> <form id="wsrp_rewrite_form_1" action="/editor/users"> > >> >> <input type="hidden" id="wsrp_rewrite_action_1" name="" value=""> > >> >> <tr> > >> >> <td>username: > >> >> <input type="hidden" name="$node^thEAGko7jgc=" value=""> > >> >> </td> > >> >> <td>name: > >> >> <input type="hidden" name="$node^kgJmi/61UQE=" > >value=""> > >> >> <input type="hidden" name="$node^aPEU5B4O6yU=" value=""> > >> >> </td> > >> >> <td>email: > >> >> <input type="hidden" name="$node^PAIYFi0+row=" value=""> > >> >> </td> > >> >> </tr> > >> >> </form> > >> >> </table> > >> >> > >> >> > >> >> Can anyone tell me where I am going wrong? > >> >> > >> >> Thanks! > >> >> > >> >> Sincerely, > >> >> Henrik Pettersen > >> >> > >> >> > >> >> ________________________________ > >> >> > >> >> > >> >> -- > >> >> You receive this message as a subscriber of the ops- > >[hidden email] > >> >> mailing list. > >> >> To unsubscribe: mailto:[hidden email] > >> >> For general help: mailto:[hidden email]?subject=help > >> >> ObjectWeb mailing lists service home page: > >http://www.objectweb.org/wws > >> >> > >> >> > >> >> > >> >> > >> >> -- > >> >> You receive this message as a subscriber of the ops- > >[hidden email] > >> >> mailing list. > >> >> To unsubscribe: mailto:[hidden email] > >> >> For general help: mailto:[hidden email]?subject=help > >> >> ObjectWeb mailing lists service home page: > >http://www.objectweb.org/wws > >> >> > >> >> > >> >> > >> > >> > >> > >> > >> > >> > >> -- > >> 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 > >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > >> > >> > >> > > > > > > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
All,
Fixed the problem. Somehow I was not using the latest/correct version of orbeon presentation server. Reinitialized my application with new/clean OPS container code, and problem disapeared. Henrik On 7/12/06, Henrik Pettersen <[hidden email]> wrote: > Ryan, > > the URL that I am using is this: > > http://localhost:8080/editor/users > > Here is my pageflow definiton: > > <c:page path-info="/users" > xforms="oxf:/users/users.xforms.xml" > view="oxf:/users/users.view.xsl" > model="oxf:/users/users.model.xpl" > /> > > Also, if I comment out the <xforms:repeat> element like this: > > <!--xforms:repeat nodeset="instance('test')/test:users/test:user"> > username: <xforms:output ref="test:username"/> > </xforms:repeat--> > > I do not get any error messages. Also, rendering my data using > xsl:for-each works like a peach (just not xforms:repeat). > > I am running: > > java version "1.5.0_06" > apache-tomcat-5.5.17 > ops-3.0.1.200602032326 > > Thanks for all your help! > > Sincerely, > Henrik Pettersen > > On 7/12/06, Ryan Puddephatt <[hidden email]> wrote: > > Henrik, > > This looks like the url for the page is incorrect. The options are > > /login-error > > /login > > /home > > /users > > > > Have you got the correct url? > > > > Ryan Puddephatt > > Software Engineer > > TFX Group - IT UK > > 1 Michaelson Square > > Livingston > > West Lothian > > Scotand > > EH54 7DP > > > > * [hidden email] > > ( 01506 407 110 > > 7 01506 407 108 > > > > > > >-----Original Message----- > > >From: Henrik Pettersen [mailto:[hidden email]] > > >Sent: 11 July 2006 23:48 > > >To: [hidden email] > > >Subject: Re: [ops-users] xforms:repeat > > > > > >Ryan, > > > > > >thank you for your help. I feel that we are getting there now. I am > > >still having some issues, though. Here is the code again, with the > > >changes suggested by you: > > > > > ><xhtml:html xmlns="" > > > xmlns:xhtml="http://www.w3.org/1999/xhtml" > > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > > xmlns:f="http://orbeon.org/oxf/xml/formatting" > > > xmlns:aspic="http://www.cruk.com/aspic/editor/v1" > > > xmlns:xforms="http://www.w3.org/2002/xforms" > > > xmlns:xi="http://orbeon.org/oxf/xml/xinclude" > > > xmlns:ev="http://www.w3.org/2001/xml-events" > > > xmlns:xs="http://www.w3.org/2001/XMLSchema" > > > xmlns:test="http://test.org" > > > xsl:version="2.0"> > > > <xhtml:head> > > > <xhtml:meta http-equiv="Content-Type" content="text/html; > > >charset=UTF-8" /> > > > <xhtml:title> xhtml:list all users </xhtml:title> > > > <xforms:model> > > > <xforms:instance id="test"> > > > <test:results> > > > <test:users> > > > <test:user> > > > > > ><test:email>[hidden email]</test:email> > > > <test:firstname>Henrik</test:firstname> > > > <test:lastname>Pettersen</test:lastname> > > > <test:username>admin</test:username> > > > <test:id>0</test:id> > > > </test:user> > > > <test:user> > > > <test:email>[hidden email]</test:email> > > > <test:firstname>Henrik</test:firstname> > > > <test:lastname>Pettersen</test:lastname> > > > <test:username>henrikp</test:username> > > > <test:id>1</test:id> > > > </test:user> > > > </test:users> > > > <test:request-security> > > > <test:secure>false</test:secure> > > > </test:request-security> > > > </test:results> > > > </xforms:instance> > > > </xforms:model> > > > </xhtml:head> > > > > > > <xhtml:body> > > > ... > > > <xforms:repeat nodeset="instance('test')/test:users/test:user"> > > > <xhtml:td>username: <xforms:output ref="test:username"/></xhtml:td> > > > </xforms:repeat> > > > ... > > > </xhtml:body> > > ></xhtml:html> > > > > > >This time around I am getting an error message: > > > > > >"The following error has occurred: > > >Error Message > > >An empty sequence is not allowed as the value of variable $current-repeat- > > >index" > > > > > >And this is the stacktrace: > > > > > >" > > >org.orbeon.oxf.common.ValidationException: Condition failed for every > > >branch of choose: [ends-with( /request/request-path, '.css' ) or > > >ends-with( /request/request-path, '.js' ), (/request/request-path > > > = '/xforms-server-submit'), (/request/request-path = '/'), > > >(/request/request-path = '/home'), (/request/request-path = '/login'), > > >(/request/request-path = '/login-error'), (/request/request-path = '/ > > >users'), (/request/request-path = > > >'/config/theme/orbeon-layout.cssd')]: Condition failed for every > > >branch of choose: [ends-with( /request/request-path, '.css' ) or > > >ends-with( /request/request-path, '. > > >js' ), (/request/request-path = '/xforms-server-submit'), > > >(/request/request-path = '/'), (/request/request-path = '/home'), > > >(/request/request-path = '/login'), (/request/request-path = > > >'/login-error') > > >, (/request/request-path = '/users'), (/request/request-path = > > >'/config/theme/orbeon-layout.cssd')] > > > at > > >org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(Conc > > >reteChooseProcessor.java:212) > > > at > > >org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor$1.getKeyIm > > >pl(ConcreteChooseProcessor.java:129) > > > at > > >org.orbeon.oxf.processor.ProcessorImpl$6.getKey(ProcessorImpl.java:991) > > > at > > >org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(Processor > > >Impl.java:1181) > > > at > > >org.orbeon.oxf.processor.pipeline.TeeProcessor$1.getKeyImpl(TeeProcessor.ja > > >va:79) > > > at > > >org.orbeon.oxf.processor.ProcessorImpl$6.getKey(ProcessorImpl.java:991) > > > at > > >org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(Processor > > >Impl.java:1181) > > > at > > >org.orbeon.oxf.processor.ProcessorImpl.getInputKey(ProcessorImpl.java:1191) > > > at > > >org.orbeon.oxf.processor.ProcessorImpl.getInputKeyValidity(ProcessorImpl.ja > > >va:1222) > > > at > > >org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl > > >.java:456) > > > at > > >org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsDOM4J(ProcessorImpl. > > >java:426) > > > at > > >org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(Conc > > >reteChooseProcessor.java:185) > > > at > > >org.orbeon.oxf.processor.pipeline.PipelineProcessor$11.run(PipelineProcesso > > >r.java:652) > > > at > > >org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:5 > > >15) > > > at > > >org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor > > >.java:649) > > > at > > >org.orbeon.oxf.processor.PageFlowControllerProcessor.start(PageFlowControll > > >erProcessor.java:416) > > > at > > >org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:86) > > > at > > >org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:95) > > > at > > >org.orbeon.oxf.servlet.OPSServletDelegate.service(OPSServletDelegate.java:1 > > >44) > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > at org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:74) > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > at > > >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio > > >nFilterChain.java:252) > > > at > > >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC > > >hain.java:173) > > > at > > >org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j > > >ava:213) > > > at > > >org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j > > >ava:178) > > > at > > >org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas > > >e.java:432) > > > at > > >org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12 > > >6) > > > at > > >org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 > > >5) > > > at > > >org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav > > >a:107) > > > at > > >org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) > > > at > > >org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) > > > at > > >org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.process > > >Connection(Http11BaseProtocol.java:664) > > > at > > >org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.ja > > >va:527) > > > at > > >org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerW > > >orkerThread.java:80) > > > at > > >org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja > > >va:684) > > > at java.lang.Thread.run(Thread.java:595) > > >" > > > > > >Almost there! Can anyone help me spot the error? > > > > > >Thank you all for your help so far! > > > > > >Sincerely, > > >Henrik Pettersen > > > > > > > > >On 7/11/06, Ryan Puddephatt <[hidden email]> wrote: > > >> Henrik, > > >> In your first email you had xforms:model/xforms:instance in the > > >> instance file, this is not necessary, you could have it start /results > > >> > > >> In the previously email you specify > > >> > > >> nodeset="instance('test')/test:results/test:users/test:user > > >> > > >> This will not bring back what you want because the root element > > >test:results > > >> is already selected by the instance() function so it should be > > >> > > >> nodeset="instance('test')/test:users/test:user" > > >> > > >> That should work > > >> > > >> Ryan > > >> > > >> Ryan Puddephatt > > >> Software Engineer > > >> TFX Group - IT UK > > >> 1 Michaelson Square > > >> Livingston > > >> West Lothian > > >> Scotand > > >> EH54 7DP > > >> > > >> * [hidden email] > > >> ( 01506 407 110 > > >> 7 01506 407 108 > > >> > > >> >-----Original Message----- > > >> >From: Henrik Pettersen [mailto:[hidden email]] > > >> >Sent: 11 July 2006 22:30 > > >> >To: [hidden email] > > >> >Subject: Re: [ops-users] xforms:repeat > > >> > > > >> >Adrian, > > >> > > > >> >Thank you for you help. I'm sure this was a problem, however, it does > > >> >not seem to be the whole story. I removed the default namespace, and > > >> >put every element in a namespace. I still cannot get xforms:repeat to > > >> >work, even with this example: > > >> > > > >> ><xhtml:html xmlns="" > > >> > xmlns:xhtml="http://www.w3.org/1999/xhtml" > > >> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > >> > xmlns:f="http://orbeon.org/oxf/xml/formatting" > > >> > xmlns:aspic="http://www.cruk.com/aspic/editor/v1" > > >> > xmlns:xforms="http://www.w3.org/2002/xforms" > > >> > xmlns:xi="http://orbeon.org/oxf/xml/xinclude" > > >> > xmlns:ev="http://www.w3.org/2001/xml-events" > > >> > xmlns:xs="http://www.w3.org/2001/XMLSchema" > > >> > xmlns:test="http://test.org" > > >> > xsl:version="2.0"> > > >> > <xhtml:head> > > >> > ... > > >> > <xforms:model> > > >> > <xforms:instance id="test"> > > >> > <test:results> > > >> > <test:users> > > >> > <test:user> > > >> > > > >> ><test:email>[hidden email]</test:email> > > >> > <test:firstname>Henrik</test:firstname> > > >> > <test:lastname>Pettersen</test:lastname> > > >> > <test:username>admin</test:username> > > >> > <test:id>0</test:id> > > >> > </test:user> > > >> > <test:user> > > >> > <test:email>[hidden email]</test:email> > > >> > <test:firstname>Henrik</test:firstname> > > >> > <test:lastname>Pettersen</test:lastname> > > >> > <test:username>henrikp</test:username> > > >> > <test:id>1</test:id> > > >> > </test:user> > > >> > </test:users> > > >> > </test:results> > > >> > </xforms:instance> > > >> > </xforms:model> > > >> > </xhtml:head> > > >> > > > >> > <xhtml:body> > > >> > ... > > >> > <xforms:repeat > > >> >nodeset="instance('test')/test:results/test:users/test:user"> > > >> > <xhtml:td>username: <xforms:output > > >ref="test:username"/></xhtml:td> > > >> > </xforms:repeat> > > >> > ... > > >> > </xhtml:body> > > >> ></xhtml:html> > > >> > > > >> >Can anyone spot the problem this time around? > > >> > > > >> >Thanks, everyone! > > >> > > > >> >Sincerely, > > >> >Henrik Pettersen > > >> > > > >> >On 7/11/06, Adrian Baker <[hidden email]> wrote: > > >> >> > > >> >> Check that the <results> node really has a null namespace, ie > > >> >> > > >> >> <xforms:instance xmlns=""> > > >> >> ... > > >> >> > > >> >> Without this the <results> node may end up in the default namespace > > >for > > >> >> your document, which would mean your nodeset of /results/users/... is > > >> >empty, > > >> >> and the spec states that any controls bound to non-existent nodes are > > >> >> irrelevant (hidden). > > >> >> > > >> >> Adrian > > >> >> > > >> >> Henrik Pettersen wrote: > > >> >> Hi, > > >> >> > > >> >> having a spot of trouble getting xforms:repeat to work. Here is my > > >code: > > >> >> > > >> >> View: > > >> >> ==== > > >> >> <html xmlns = "http://www.w3.org/1999/xhtml" > > >> >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > >> >> xmlns:f="http://orbeon.org/oxf/xml/formatting" > > >> >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1" > > >> >> xmlns:xforms="http://www.w3.org/2002/xforms" > > >> >> xmlns:xi="http://orbeon.org/oxf/xml/xinclude" > > >> >> xmlns:ev="http://www.w3.org/2001/xml-events" > > >> >> xmlns:xs="http://www.w3.org/2001/XMLSchema" > > >> >> xsl:version="2.0"> > > >> >> > > >> >> <head> > > >> >> ... > > >> >> <xforms:model> > > >> >> <xforms:instance> > > >> >> <xi:include href="input:data"/> > > >> >> </xforms:instance> > > >> >> <!-- Do I need this next line? --> > > >> >> <xforms:bind > > >> >> nodeset="/results/users/aspic:user/aspic:username" > > >> >> type="xs:int"/> > > >> >> </xforms:model> > > >> >> ... > > >> >> </head> > > >> >> <body> > > >> >> ... > > >> >> <table width="50%"> > > >> >> <tr> > > >> >> <td> > > >> >> <b>Username</b> > > >> >> </td> > > >> >> <td> > > >> >> <b>Name</b> > > >> >> </td> > > >> >> <td> > > >> >> <b>Email</b> > > >> >> </td> > > >> >> </tr> > > >> >> <xforms:repeat nodeset="/results/users/aspic:user"> > > >> >> <tr> > > >> >> <td>username: <xforms:output ref="aspic:username"/></td> > > >> >> <td>name: <xforms:output ref="aspic:firstname"/>  > > >> >> <xforms:output ref="aspic:lastname"/></td> > > >> >> <td>email: <xforms:output ref="aspic:email"/></td> > > >> >> </tr> > > >> >> </xforms:repeat> > > >> >> </table> > > >> >> ... > > >> >> </body> > > >> >> </html> > > >> >> > > >> >> > > >> >> Instance: > > >> >> ======= > > >> >> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms" > > >> >> > > >> >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> > > >> >> <xforms:instance> > > >> >> <results> > > >> >> <users > > >> >> xmlns:aspic="http://www.cruk.com/aspic/editor/v1"> > > >> >> <aspic:user> > > >> >> <aspic:email/> > > >> >> <aspic:firstname/> > > >> >> <aspic:lastname/> > > >> >> <aspic:username/> > > >> >> <aspic:id/> > > >> >> </aspic:user> > > >> >> </users> > > >> >> <request-security> > > >> >> <auth-type/> > > >> >> <secure/> > > >> >> <remote-user/> > > >> >> <role/> > > >> >> </request-security> > > >> >> </results> > > >> >> </xforms:instance> > > >> >> </xforms:model> > > >> >> > > >> >> Resulting HTML: > > >> >> ============ > > >> >> <table width="50%"> > > >> >> <tr> > > >> >> <td><b>Username</b></td> > > >> >> <td><b>Name</b></td> > > >> >> <td><b>Email</b></td> > > >> >> </tr> > > >> >> <form id="wsrp_rewrite_form_1" action="/editor/users"> > > >> >> <input type="hidden" id="wsrp_rewrite_action_1" name="" value=""> > > >> >> <tr> > > >> >> <td>username: > > >> >> <input type="hidden" name="$node^thEAGko7jgc=" value=""> > > >> >> </td> > > >> >> <td>name: > > >> >> <input type="hidden" name="$node^kgJmi/61UQE=" > > >value=""> > > >> >> <input type="hidden" name="$node^aPEU5B4O6yU=" value=""> > > >> >> </td> > > >> >> <td>email: > > >> >> <input type="hidden" name="$node^PAIYFi0+row=" value=""> > > >> >> </td> > > >> >> </tr> > > >> >> </form> > > >> >> </table> > > >> >> > > >> >> > > >> >> Can anyone tell me where I am going wrong? > > >> >> > > >> >> Thanks! > > >> >> > > >> >> Sincerely, > > >> >> Henrik Pettersen > > >> >> > > >> >> > > >> >> ________________________________ > > >> >> > > >> >> > > >> >> -- > > >> >> You receive this message as a subscriber of the ops- > > >[hidden email] > > >> >> mailing list. > > >> >> To unsubscribe: mailto:[hidden email] > > >> >> For general help: mailto:[hidden email]?subject=help > > >> >> ObjectWeb mailing lists service home page: > > >http://www.objectweb.org/wws > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> -- > > >> >> You receive this message as a subscriber of the ops- > > >[hidden email] > > >> >> mailing list. > > >> >> To unsubscribe: mailto:[hidden email] > > >> >> For general help: mailto:[hidden email]?subject=help > > >> >> ObjectWeb mailing lists service home page: > > >http://www.objectweb.org/wws > > >> >> > > >> >> > > >> >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> -- > > >> 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 > > >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > >> > > >> > > >> > > > > > > > > > > > > > > -- > > 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 > > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > > > > > -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |