W3C home > Mailing lists > Public > www-forms@w3.org > February 2007

Re: Inserting the current node to a remote target

From: Dustin Whitney <dustin.whitney@gmail.com>
Date: Fri, 2 Feb 2007 15:45:24 -0700
Message-ID: <23def8000702021445m5eae0e0fg8107cc7d320ee24c@mail.gmail.com>
To: "Clark, John" <CLARKJ2@ccf.org>
Cc: www-forms@w3.org

    I encountered a similar problem, and I believe the response I got was
something like, "XForms 1.0 doesn't support this, but a solution is being
provided in XForms 1.1". There is a fairly healthy forum at xforms.org, if
you want to ask this question there. What I'd also like to see is the
ability to copy a node along with all of its children into an instance,
rather than having to specify each child to be copied.


On 2/2/07, Clark, John <CLARKJ2@ccf.org> wrote:
> If you are within a particular XPath context, how can you insert the
> current context element (e.g. copy it) into a particular empty element?
> For example, say you have the following snippet (with the `xf` prefix
> bound to the XForms namespace and the `ev` prefix bound to the XML
> Events namespace):
>   <xf:group ref="what-you-want-to-copy">
>     <xf:trigger><xf:label>Do the copy</xf:label>
>       <xf:insert nodeset="instance('target')/location" origin="."
> ev:event="DOMActivate"/>
>     </xf:trigger>
>   </xf:group>
> As written, this will insert `what-you-want-to-copy` as the next sibling
> of `target/location` (by rule 1.d of the processing rules for the insert
> action), but we want it to be a child of `target/location` instead.  Now
> `nodeset="instance('target')/location/*"` doesn't work, because that's
> an empty node set, and we can't use the `current` attribute to change
> the insert context or we can no longer reference
> `what-you-want-to-copy`.  What's an XMLiphile to do?
> Take care,
>     John L. Clark  |  Systems Analyst
>                    |  Cardio-Thoracic Surgery Research
> Cleveland Clinic  |  9500 Euclid Ave.   |  Cleveland, OH 44195
>                    |  (216) 445-6011
> Cleveland Clinic is ranked one of the top 3 hospitals in
> America by U.S.News & World Report. Visit us online at
> http://www.clevelandclinic.org for a complete listing of
> our services, staff and locations.
> Confidentiality Note:  This message is intended for use
> only by the individual or entity to which it is addressed
> and may contain information that is privileged,
> confidential, and exempt from disclosure under applicable
> law.  If the reader of this message is not the intended
> recipient or the employee or agent responsible for
> delivering the message to the intended recipient, you are
> hereby notified that any dissemination, distribution or
> copying of this communication is strictly prohibited.  If
> you have received this communication in error,  please
> contact the sender immediately and destroy the material in
> its entirety, whether electronic or hard copy.  Thank you.
> ===================================
Received on Friday, 2 February 2007 22:45:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:55 UTC