I'm having trouble with the inserting attributes into an element from a template instance.
This is the code I'm using (which was working with the firefox extension): <xforms:insert ev:event="DOMActivate" context="instance('metadata')" nodeset="instance('metadata')//mods:mods/mods:titleInfo" at="index('titleInfo')" position="after" origin="instance('template')/mods:titleInfo/@type"/> I get the following error messge from Orbeon: Invalid Node in DOM4J content: org.dom4j.util.UserDataAttribute@11b97f1 [Attribute: name type value "select"] Any thoughts? Is my syntax wrong? Thanks, -WInona -- 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 |
Trying to insert an attribute as a nodeset might be a problem?
Thx via my iPhone , Arun 612-501-6345 [hidden email] On Oct 6, 2008, at 7:21 AM, "Winona Salesky" <[hidden email]> wrote: > I'm having trouble with the inserting attributes into an element > from a template instance. > This is the code I'm using (which was working with the firefox > extension): > > <xforms:insert ev:event="DOMActivate" context="instance('metadata')" > nodeset="instance('metadata')//mods:mods/mods:titleInfo" > at="index('titleInfo')" position="after" > origin="instance('template')/mods:titleInfo/@type"/> > > I get the following error messge from Orbeon: > Invalid Node in DOM4J content: > org.dom4j.util.UserDataAttribute@11b97f1 [Attribute: name type value > "select"] > > Any thoughts? Is my syntax wrong? > Thanks, > -WInona > > > > -- > 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 -- 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
|
In reply to this post by wsalesky
Winona,
This should work: <xforms:insert ev:event="DOMActivate" context="instance('metadata')//mods:mods/ mods:titleInfo[index('titleInfo')]" origin="instance('template')/mods:titleInfo/@type"/> The idea with xforms:insert is the following: * To insert *next to* an item, use the @nodeset attribute (optionally with @context, @at and @position). * To insert *into* an item, don't use @nodeset but use @context only. Here, you really want to insert *into* the element, not *next to* the element, so you can't use @nodeset. Now granted Orbeon Forms should not produce this error. As per XForms 1.1, if insertion of a particular node is not possible, it should simply NOP. I have fixed this in Orbeon Forms, which will still display a warning in the logs when that happens. -Erik On Oct 6, 2008, at 5:21 AM, Winona Salesky wrote: > I'm having trouble with the inserting attributes into an element > from a template instance. > This is the code I'm using (which was working with the firefox > extension): > > <xforms:insert ev:event="DOMActivate" context="instance('metadata')" > nodeset="instance('metadata')//mods:mods/mods:titleInfo" > at="index('titleInfo')" position="after" > origin="instance('template')/mods:titleInfo/@type"/> > > I get the following error messge from Orbeon: > Invalid Node in DOM4J content: > org.dom4j.util.UserDataAttribute@11b97f1 [Attribute: name type value > "select"] > > Any thoughts? Is my syntax wrong? > Thanks, > -WInona 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 |
Of course, thanks for pointing out the obvious.
-WInona On Mon, Oct 6, 2008 at 5:59 PM, Erik Bruchez <[hidden email]> wrote: Winona, -- 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 |