Am i crazy or does
the <xforms:insert/> not listen to its "at" attribute?
In the example below
it always copies the node after itself. How do i get it to copy to the position
i want?
Kind regards,
Teun
<?xml version="1.0"
encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"> <head> <title>XForms Bookcast</title> <xforms:model schema="/apps/xforms-bookcast/schema.xsd">
<xforms:instance
id="books-instance">
<books xmlns=""> <book> <title>Aaa</title> <author>111</author> </book> <book> <title>Bbb</title> <author>222</author> </book> <book> <title>Ccc</title> <author>333</author> </book> </books> </xforms:instance>
</xforms:model>
</head> <body> <table class="books-table"> <xforms:repeat nodeset="book" id="book-repeat"> <tr> <td> <xforms:trigger appearance="minimal"> <xforms:action ev:event="DOMActivate"> <xforms:insert nodeset="." at="1" position="before"/> </xforms:action> <xforms:label>Copy to top</xforms:label> </xforms:trigger> </td> <td class="form-td"> <xforms:input ref="title"> <xforms:label class="books-label">Title . .</xforms:label> </xforms:input> <br/> <xforms:input ref="author"> <xforms:label class="books-label">Author</xforms:label> </xforms:input> </td> </tr> </xforms:repeat> </table> </body> </html> -- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. -- 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
|
Teun,
If you are trying to copy the current row as the first row, you probably want to write something like this: <xforms:insert nodeset="../book" at="1" position="before" origin="../book[index('book-repeat')]"/> or: <xforms:insert context=".." origin="book[index('book-repeat')]"/> -Erik Teun van Eijsden wrote: > Am i crazy or does the <xforms:insert/> not listen to its "at" attribute? > In the example below it always copies the node after itself. How do i > get it to copy to the position i want? > > Kind regards, Teun > > > <?xml version="1.0" encoding="utf-8"?> > <html xmlns="http://www.w3.org/1999/xhtml" > xmlns:xhtml="http://www.w3.org/1999/xhtml" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"> > <head> > <title>XForms Bookcast</title> > <xforms:model schema="/apps/xforms-bookcast/schema.xsd"> > > <xforms:instance id="books-instance"> > <books xmlns=""> > <book> > <title>Aaa</title> > <author>111</author> > </book> > <book> > <title>Bbb</title> > <author>222</author> > </book> > <book> > <title>Ccc</title> > <author>333</author> > </book> > </books> > </xforms:instance> > > </xforms:model> > </head> > <body> > <table class="books-table"> > <xforms:repeat nodeset="book" id="book-repeat"> > <tr> > <td> > <xforms:trigger appearance="minimal"> > <xforms:action ev:event="DOMActivate"> > <xforms:insert nodeset="." at="1" > position="before"/> > </xforms:action> > <xforms:label>Copy to top</xforms:label> > </xforms:trigger> > </td> > <td class="form-td"> > <xforms:input ref="title"> > <xforms:label class="books-label">Title . > .</xforms:label> > </xforms:input> > <br/> > <xforms:input ref="author"> > <xforms:label > class="books-label">Author</xforms:label> > </xforms:input> > </td> > </tr> > </xforms:repeat> > </table> > </body> > </html> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- The information contained in this communication and any attachments > is confidential and may be privileged, and is for the sole use of the > intended recipient(s). Any unauthorized review, use, disclosure or > distribution is prohibited. Unless explicitly stated otherwise in the > body of this communication or the attachment thereto (if any), the > information is provided on an AS-IS basis without any express or implied > warranties or liabilities. To the extent you are relying on this > information, you are doing so at your own risk. If you are not the > intended recipient, please notify the sender immediately by replying to > this message and destroy all copies of this message and any attachments. > ASML is neither liable for the proper and complete transmission of the > information contained in this communication, nor for any delay in its > receipt. > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 it works! Thanks man.
Teun -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez Sent: Tuesday, October 09, 2007 23:28 To: [hidden email] Subject: Re: [ops-users] insert node at top Teun, If you are trying to copy the current row as the first row, you probably want to write something like this: <xforms:insert nodeset="../book" at="1" position="before" origin="../book[index('book-repeat')]"/> or: <xforms:insert context=".." origin="book[index('book-repeat')]"/> -Erik Teun van Eijsden wrote: > Am i crazy or does the <xforms:insert/> not listen to its "at" attribute? > In the example below it always copies the node after itself. How do i > get it to copy to the position i want? > > Kind regards, Teun > > > <?xml version="1.0" encoding="utf-8"?> <html > xmlns="http://www.w3.org/1999/xhtml" > xmlns:xhtml="http://www.w3.org/1999/xhtml" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"> > <head> > <title>XForms Bookcast</title> > <xforms:model schema="/apps/xforms-bookcast/schema.xsd"> > > <xforms:instance id="books-instance"> > <books xmlns=""> > <book> > <title>Aaa</title> > <author>111</author> > </book> > <book> > <title>Bbb</title> > <author>222</author> > </book> > <book> > <title>Ccc</title> > <author>333</author> > </book> > </books> > </xforms:instance> > > </xforms:model> > </head> > <body> > <table class="books-table"> > <xforms:repeat nodeset="book" id="book-repeat"> > <tr> > <td> > <xforms:trigger appearance="minimal"> > <xforms:action ev:event="DOMActivate"> > <xforms:insert nodeset="." at="1" > position="before"/> > </xforms:action> > <xforms:label>Copy to top</xforms:label> > </xforms:trigger> > </td> > <td class="form-td"> > <xforms:input ref="title"> > <xforms:label class="books-label">Title . > .</xforms:label> > </xforms:input> > <br/> > <xforms:input ref="author"> > <xforms:label > class="books-label">Author</xforms:label> > </xforms:input> > </td> > </tr> > </xforms:repeat> > </table> > </body> > </html> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- The information contained in this communication and any attachments > is confidential and may be privileged, and is for the sole use of the > intended recipient(s). Any unauthorized review, use, disclosure or > distribution is prohibited. Unless explicitly stated otherwise in the > body of this communication or the attachment thereto (if any), the > information is provided on an AS-IS basis without any express or > implied warranties or liabilities. To the extent you are relying on > this information, you are doing so at your own risk. If you are not > the intended recipient, please notify the sender immediately by > replying to this message and destroy all copies of this message and > ASML is neither liable for the proper and complete transmission of the > information contained in this communication, nor for any delay in its > receipt. > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. -- 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 |
Free forum by Nabble | Edit this page |