Re: Re: Custom XBL component

Posted by Grégoire Neuville on
URL: https://discuss.orbeon.com/Custom-XBL-component-tp4196663p4197016.html

There is a variable available in outer scope (the scope of you main
xforms document) named fr-resources I think. So in the inner scope of
your component, you could access it this way :

<xxforms:variable name="fr-resources">
  <xxforms:sequence select="$fr-resources" xxbl:scope="outer" />
</xxforms:variable>

On 14 December 2011 21:59, marek2608 <[hidden email]> wrote:

> Yes it helps thanks alot.
>
> I am new to XBL and XForms in general so I am missing lots of subtilties at
> this point.
>
> I manage to rewrite the XBL as follows:
>
> <xbl:xbl 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"
>         xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
>         xmlns:xbl="http://www.w3.org/ns/xbl"
>         xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
>         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>         xmlns:oxf="http://www.orbeon.com/oxf/processors"
>         xmlns:exf="http://www.exforms.org/exf/1-0" >
>
>
>    <xbl:binding element="fr|hyperlink">
>        <xbl:template >
>            <xforms:group xbl:attr="model context ref bind"
> xxbl:scope="outer">
>                <xbl:content
> includes="xforms|label,xforms|help,xforms|hint,xforms|alert"/>
>                <xforms:group appearance="xxforms:internal"
> xxbl:scope="inner">
>                     <xxforms:variable name="binding">
>                         <xxforms:sequence select="." xxbl:scope="outer" />
>                     </xxforms:variable>
>                     <xxforms:variable name="label" value="????"/>
>                        <xforms:trigger ref="$binding" appearance="minimal" >
>                            <xforms:label ref="$label"/>
>                            <xforms:action ev:event="DOMActivate">
>                                <xforms:load ref="$label" show="new"/>
>                            </xforms:action>
>                        </xforms:trigger>
>            </xforms:group>
>          </xforms:group>
>        </xbl:template>
>    </xbl:binding>
> </xbl:xbl>
>
> My next question is: how can I set the label variable so it contains the
> value of the label provided by the user in the Form Builder, in the form's
> instance resources:
>            <xforms:instance id="fr-form-resources"
> xxforms:readonly="false">
>                <resources>
>                    <resource xml:lang="en">
>                        <control-1>
>                            <label>http://www.google.com</label>
>                            <hint/>
>                            <help/>
>                            <alert/>
>                        </control-1>
>
> My guess is using the binding element, but I'm not too sure how this would
> be expressed.
>
> Thanks again
>
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Custom-XBL-component-tp4196663p4196990.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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
>


--
Grégoire Neuville


--
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