Good afternoon all
I'm a sheer beginner so have rather trivial question. In my application I need to use some data coming from external files. For retrieving the data I use URL-generator, which works pretty well: <p:processor name="oxf:url-generator"> <p:input name="config"> <config> <url>http://wsasd464:8080/orbeon/images/bulb-large.gif</url> <content-type>image/gif</content-type> </config> </p:input> <p:output name="data" id="attachment" /> </p:processor> I can stream that data back to the browser in form of GIF image. The following <p:processor name="oxf:http-serializer"> <p:input name="config"> <config> <content-type>image/gif</content-type> </config> </p:input> <p:input name="data" href="#attachment" /> </p:processor> Produces nice html page with an image of the light bulb. What I need is to bind that data to my form and store it in the XML database as a pair of tags: <document xsi:type="xs:base64Binary" content-type="image/gif">R0lGODlhMAAwAPcAAPz8/v////7+/vz8/f39/fz8/Pr6/Pn =</document> My problem is that I cannot find this attachment in the context of my application. It's neither under /form/document nor under /form/attachment ... Well I have searched in all kind of weird locations but nothing worked. So please, tell me what I am doing wrong. Thank you in advance, Taras -- 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. 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Taras,
You run the URL generator in an XPL pipeline. The result of this, as you have figured out, can for example be sent to the HTTP serializer. It can also be transformed, for example with XSLT, and/or be stored into an XML database like eXist. You can also include the result in Base64 in a XForms instance. But the bottom line is that you have to do some work to get there. The data retrieved by the URL generator is not going to be automagically present in your form. -Erik Taras Bahnyuk wrote: > Good afternoon all > > I'm a sheer beginner so have rather trivial question. > In my application I need to use some data coming from external files. > For retrieving the data I use URL-generator, which works pretty well: > > <p:processor name="oxf:url-generator"> > <p:input name="config"> > <config> > > <url>http://wsasd464:8080/orbeon/images/bulb-large.gif</url> > <content-type>image/gif</content-type> > </config> > </p:input> > <p:output name="data" id="attachment" /> > </p:processor> > > I can stream that data back to the browser in form of GIF image. > The following > > <p:processor name="oxf:http-serializer"> > <p:input name="config"> > <config> > <content-type>image/gif</content-type> > </config> > </p:input> > <p:input name="data" href="#attachment" /> > </p:processor> > > Produces nice html page with an image of the light bulb. > > What I need is to bind that data to my form and store it in the XML > database as a pair of tags: > <document xsi:type="xs:base64Binary" > content-type="image/gif">R0lGODlhMAAwAPcAAPz8/v////7+/vz8/f39/fz8/Pr6/Pn > =</document> > > My problem is that I cannot find this attachment in the context of my > application. > It's neither under /form/document nor under /form/attachment ... > Well I have searched in all kind of weird locations but nothing worked. > > So please, tell me what I am doing wrong. > Thank you in advance, > > Taras -- 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 |
In reply to this post by Taras Bahnyuk
Eric, I agree with what you say.
I just don't know what must I do, this was actually the question. Let's make it more clear. Say, I have an xForms instance (/form), somewhere I have a file... Let's say an image. I use URL-generator to get this image encoded and placed in the <document>blah...blah...blah<document> Until now these steps work very well and are documented. Next, lets say I want include this <document><document> into my /form ... How do I refer to it? What is the common practice in this case? -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] Sent: dinsdag 30 augustus 2005 21:45 To: [hidden email] Subject: Re: [ops-users] URL-generator question Taras, You run the URL generator in an XPL pipeline. The result of this, as you have figured out, can for example be sent to the HTTP serializer. It can also be transformed, for example with XSLT, and/or be stored into an XML database like eXist. You can also include the result in Base64 in a XForms instance. But the bottom line is that you have to do some work to get there. The data retrieved by the URL generator is not going to be automagically present in your form. -Erik Taras Bahnyuk wrote: > Good afternoon all > > I'm a sheer beginner so have rather trivial question. > In my application I need to use some data coming from external files. > For retrieving the data I use URL-generator, which works pretty well: > > <p:processor name="oxf:url-generator"> > <p:input name="config"> > <config> > > <url>http://wsasd464:8080/orbeon/images/bulb-large.gif</url> > <content-type>image/gif</content-type> > </config> > </p:input> > <p:output name="data" id="attachment" /> > </p:processor> > > I can stream that data back to the browser in form of GIF image. > The following > > <p:processor name="oxf:http-serializer"> > <p:input name="config"> > <config> > <content-type>image/gif</content-type> > </config> > </p:input> > <p:input name="data" href="#attachment" /> > </p:processor> > > Produces nice html page with an image of the light bulb. > > What I need is to bind that data to my form and store it in the XML > database as a pair of tags: > <document xsi:type="xs:base64Binary" > content-type="image/gif">R0lGODlhMAAwAPcAAPz8/v////7+/vz8/f39/fz8/Pr6/Pn > =</document> > > My problem is that I cannot find this attachment in the context of my > application. > It's neither under /form/document nor under /form/attachment ... > Well I have searched in all kind of weird locations but nothing worked. > > So please, tell me what I am doing wrong. > Thank you in advance, > > Taras -- 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. 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi,
I'm also working on this here. Basically trying to get a page to dynamically display a remote image after it's URL is entered by user in an input field. I think the leads to this may be found in the both the Google translate and Flickr spell examples. The former request the Google service via REST and write the translated results into the xforms instance via a XSLT processor. The latter is doing similar thing with images retrieved from Flickr, and writes the binary into the instance (./images).. I haven't completely understood the flickr example though. In general, learning about how to access xforms instances from within XSL views. I gathered this is the "doc()" reference is only feasible after a "submission" event and not during the DOMActivate/DOMFocusIn events etc which updates the instance? Also attempting to dynamically display tabbed pane (widget:tabs) based on instance values.. Any info re. the above much appreciated.. Boon ----- Boon Low System Developer, EGEE Training UK National e-Science Centre http://homepages.ed.ac.uk/boon On 31 Aug 2005, at 11:39, Taras Bahnyuk wrote: > Eric, I agree with what you say. > > I just don't know what must I do, this was actually the question. > Let's make it more clear. > Say, I have an xForms instance (/form), somewhere I have a file... > Let's > say an image. > I use URL-generator to get this image encoded and placed in the > <document>blah...blah...blah<document> > Until now these steps work very well and are documented. > Next, lets say I want include this <document><document> into my /form > ... > How do I refer to it? > > What is the common practice in this case? > > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] > Sent: dinsdag 30 augustus 2005 21:45 > To: [hidden email] > Subject: Re: [ops-users] URL-generator question > > Taras, > > You run the URL generator in an XPL pipeline. The result of this, as > you have figured out, can for example be sent to the HTTP > serializer. It can also be transformed, for example with XSLT, and/or > be stored into an XML database like eXist. You can also include the > result in Base64 in a XForms instance. > > But the bottom line is that you have to do some work to get there. The > data retrieved by the URL generator is not going to be automagically > present in your form. > > -Erik > > Taras Bahnyuk wrote: > > >> Good afternoon all >> >> I'm a sheer beginner so have rather trivial question. >> In my application I need to use some data coming from external files. >> For retrieving the data I use URL-generator, which works pretty well: >> >> <p:processor name="oxf:url-generator"> >> <p:input name="config"> >> <config> >> >> <url>http://wsasd464:8080/orbeon/images/bulb-large.gif</url> >> <content-type>image/gif</content-type> >> </config> >> </p:input> >> <p:output name="data" id="attachment" /> >> </p:processor> >> >> I can stream that data back to the browser in form of GIF image. >> The following >> >> <p:processor name="oxf:http-serializer"> >> <p:input name="config"> >> <config> >> <content-type>image/gif</content-type> >> </config> >> </p:input> >> <p:input name="data" href="#attachment" /> >> </p:processor> >> >> Produces nice html page with an image of the light bulb. >> >> What I need is to bind that data to my form and store it in the XML >> database as a pair of tags: >> <document xsi:type="xs:base64Binary" >> >> >> > content-type="image/gif">R0lGODlhMAAwAPcAAPz8/v////7+/vz8/f39/fz8/ > Pr6/Pn > > >> =</document> >> >> My problem is that I cannot find this attachment in the context of my >> application. >> It's neither under /form/document nor under /form/attachment ... >> Well I have searched in all kind of weird locations but nothing >> >> > worked. > > >> >> So please, tell me what I am doing wrong. >> Thank you in advance, >> >> Taras >> >> > > > > > -- > 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. 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 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 |
Hi,
Just figured out a quick way to display remote image via URL after a DOMActivate/DOMFocusOut (from an input field) event. Did this without XML submission and a non-pipeline view (.xsl). Basically: In xforms model, bind the image URL with a calculate function to concat the URL with a HTML IMG tag: <xforms:bind nodeset="imageHTML" relevant="false()" calculate="concat('<img src="', ../image,'"/>')"/> And in xforms view, with the input with and the xforms:output tag to output the image as HTML: <xforms:input ref="image" xhtml:size="30"> <xforms:label class="fixed-width">Image URL</xforms:label> </xforms:input> <xforms:output ref="imageHTML" appearance="xxforms:html"/> No URL-generator, base64, pipeline etc.. Anyway, better get a grip with the various pipeline processors soon! And still trying to get the doc('input:instance') working within XSL views.. Regards Boon ----- Boon Low System Developer, EGEE Training UK National e-Science Centre http://homepages.ed.ac.uk/boon On 31 Aug 2005, at 12:02, Boon Low wrote: > Hi, > > I'm also working on this here. Basically trying to get a page to > dynamically display a remote image after it's URL is entered by > user in an input field. > > I think the leads to this may be found in the both the Google > translate and Flickr spell examples. The former request the Google > service via REST and write the translated results into the xforms > instance via a XSLT processor. The latter is doing similar thing > with images retrieved from Flickr, and writes the binary into the > instance (./images).. I haven't completely understood the flickr > example though. > > In general, learning about how to access xforms instances from > within XSL views. I gathered this is the "doc()" reference is only > feasible after a "submission" event and not during the DOMActivate/ > DOMFocusIn events etc which updates the instance? Also attempting > to dynamically display tabbed pane (widget:tabs) based on instance > values.. > > Any info re. the above much appreciated.. > > > Boon > > ----- > Boon Low > System Developer, EGEE Training > UK National e-Science Centre > http://homepages.ed.ac.uk/boon > > On 31 Aug 2005, at 11:39, Taras Bahnyuk wrote: > > > >> Eric, I agree with what you say. >> >> I just don't know what must I do, this was actually the question. >> Let's make it more clear. >> Say, I have an xForms instance (/form), somewhere I have a file... >> Let's >> say an image. >> I use URL-generator to get this image encoded and placed in the >> <document>blah...blah...blah<document> >> Until now these steps work very well and are documented. >> Next, lets say I want include this <document><document> into my /form >> ... >> How do I refer to it? >> >> What is the common practice in this case? >> >> >> -----Original Message----- >> From: Erik Bruchez [mailto:[hidden email]] >> Sent: dinsdag 30 augustus 2005 21:45 >> To: [hidden email] >> Subject: Re: [ops-users] URL-generator question >> >> Taras, >> >> You run the URL generator in an XPL pipeline. The result of this, as >> you have figured out, can for example be sent to the HTTP >> serializer. It can also be transformed, for example with XSLT, and/or >> be stored into an XML database like eXist. You can also include the >> result in Base64 in a XForms instance. >> >> But the bottom line is that you have to do some work to get there. >> The >> data retrieved by the URL generator is not going to be automagically >> present in your form. >> >> -Erik >> >> Taras Bahnyuk wrote: >> >> >> >>> Good afternoon all >>> >>> I'm a sheer beginner so have rather trivial question. >>> In my application I need to use some data coming from external >>> files. >>> For retrieving the data I use URL-generator, which works pretty >>> well: >>> >>> <p:processor name="oxf:url-generator"> >>> <p:input name="config"> >>> <config> >>> >>> <url>http://wsasd464:8080/orbeon/images/bulb-large.gif</url> >>> <content-type>image/gif</content-type> >>> </config> >>> </p:input> >>> <p:output name="data" id="attachment" /> >>> </p:processor> >>> >>> I can stream that data back to the browser in form of GIF image. >>> The following >>> >>> <p:processor name="oxf:http-serializer"> >>> <p:input name="config"> >>> <config> >>> <content-type>image/gif</content-type> >>> </config> >>> </p:input> >>> <p:input name="data" href="#attachment" /> >>> </p:processor> >>> >>> Produces nice html page with an image of the light bulb. >>> >>> What I need is to bind that data to my form and store it in the XML >>> database as a pair of tags: >>> <document xsi:type="xs:base64Binary" >>> >>> >>> >>> >> content-type="image/gif">R0lGODlhMAAwAPcAAPz8/v////7+/vz8/f39/fz8/ >> Pr6/Pn >> >> >> >>> =</document> >>> >>> My problem is that I cannot find this attachment in the context >>> of my >>> application. >>> It's neither under /form/document nor under /form/attachment ... >>> Well I have searched in all kind of weird locations but nothing >>> >>> >>> >> worked. >> >> >> >>> >>> So please, tell me what I am doing wrong. >>> Thank you in advance, >>> >>> Taras >>> >>> >>> >> >> >> >> >> -- >> 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. 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 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 |
Administrator
|
Hi Boon,
This is correct, if you add an appearance="xxforms:html" on an <xforms:output>, the value of the node you reference will be interpreted as HTML and rendered as such. For the case where you just want to render an image, in the future you will be able to use the mediatype="image/*" attribute on <xforms:output> and bind the control to a node that contains a URL to the image. Alex On 8/31/05, Boon Low <[hidden email]> wrote: > Hi, > > Just figured out a quick way to display remote image via URL after a > DOMActivate/DOMFocusOut (from an input field) event. Did this > without XML submission and a non-pipeline view (.xsl). Basically: > > In xforms model, bind the image URL with a calculate function to > concat the URL with a HTML IMG tag: > > <xforms:bind nodeset="imageHTML" relevant="false()" > calculate="concat('<img src="', ../image,'"/>')"/> > > And in xforms view, with the input with and the xforms:output tag to > output the image as HTML: > > <xforms:input ref="image" xhtml:size="30"> > <xforms:label class="fixed-width">Image URL</xforms:label> > </xforms:input> > > <xforms:output ref="imageHTML" appearance="xxforms:html"/> > > No URL-generator, base64, pipeline etc.. > > Anyway, better get a grip with the various pipeline processors soon! > And still trying to get the doc('input:instance') working within XSL > views.. > > Regards > > Boon > > > > ----- > Boon Low > System Developer, EGEE Training > UK National e-Science Centre > http://homepages.ed.ac.uk/boon > > On 31 Aug 2005, at 12:02, Boon Low wrote: > > > Hi, > > > > I'm also working on this here. Basically trying to get a page to > > dynamically display a remote image after it's URL is entered by > > user in an input field. > > > > I think the leads to this may be found in the both the Google > > translate and Flickr spell examples. The former request the Google > > service via REST and write the translated results into the xforms > > instance via a XSLT processor. The latter is doing similar thing > > with images retrieved from Flickr, and writes the binary into the > > instance (./images).. I haven't completely understood the flickr > > example though. > > > > In general, learning about how to access xforms instances from > > within XSL views. I gathered this is the "doc()" reference is only > > feasible after a "submission" event and not during the DOMActivate/ > > DOMFocusIn events etc which updates the instance? Also attempting > > to dynamically display tabbed pane (widget:tabs) based on instance > > values.. > > > > Any info re. the above much appreciated.. > > > > > > Boon > > > > ----- > > Boon Low > > System Developer, EGEE Training > > UK National e-Science Centre > > http://homepages.ed.ac.uk/boon > > > > On 31 Aug 2005, at 11:39, Taras Bahnyuk wrote: > > > > > > > >> Eric, I agree with what you say. > >> > >> I just don't know what must I do, this was actually the question. > >> Let's make it more clear. > >> Say, I have an xForms instance (/form), somewhere I have a file... > >> Let's > >> say an image. > >> I use URL-generator to get this image encoded and placed in the > >> <document>blah...blah...blah<document> > >> Until now these steps work very well and are documented. > >> Next, lets say I want include this <document><document> into my /form > >> ... > >> How do I refer to it? > >> > >> What is the common practice in this case? > >> > >> > >> -----Original Message----- > >> From: Erik Bruchez [mailto:[hidden email]] > >> Sent: dinsdag 30 augustus 2005 21:45 > >> To: [hidden email] > >> Subject: Re: [ops-users] URL-generator question > >> > >> Taras, > >> > >> You run the URL generator in an XPL pipeline. The result of this, as > >> you have figured out, can for example be sent to the HTTP > >> serializer. It can also be transformed, for example with XSLT, and/or > >> be stored into an XML database like eXist. You can also include the > >> result in Base64 in a XForms instance. > >> > >> But the bottom line is that you have to do some work to get there. > >> The > >> data retrieved by the URL generator is not going to be automagically > >> present in your form. > >> > >> -Erik > >> > >> Taras Bahnyuk wrote: > >> > >> > >> > >>> Good afternoon all > >>> > >>> I'm a sheer beginner so have rather trivial question. > >>> In my application I need to use some data coming from external > >>> files. > >>> For retrieving the data I use URL-generator, which works pretty > >>> well: > >>> > >>> <p:processor name="oxf:url-generator"> > >>> <p:input name="config"> > >>> <config> > >>> > >>> <url>http://wsasd464:8080/orbeon/images/bulb-large.gif</url> > >>> <content-type>image/gif</content-type> > >>> </config> > >>> </p:input> > >>> <p:output name="data" id="attachment" /> > >>> </p:processor> > >>> > >>> I can stream that data back to the browser in form of GIF image. > >>> The following > >>> > >>> <p:processor name="oxf:http-serializer"> > >>> <p:input name="config"> > >>> <config> > >>> <content-type>image/gif</content-type> > >>> </config> > >>> </p:input> > >>> <p:input name="data" href="#attachment" /> > >>> </p:processor> > >>> > >>> Produces nice html page with an image of the light bulb. > >>> > >>> What I need is to bind that data to my form and store it in the XML > >>> database as a pair of tags: > >>> <document xsi:type="xs:base64Binary" > >>> > >>> > >>> > >>> > >> content-type="image/gif">R0lGODlhMAAwAPcAAPz8/v////7+/vz8/f39/fz8/ > >> Pr6/Pn > >> > >> > >> > >>> =</document> > >>> > >>> My problem is that I cannot find this attachment in the context > >>> of my > >>> application. > >>> It's neither under /form/document nor under /form/attachment ... > >>> Well I have searched in all kind of weird locations but nothing > >>> > >>> > >>> > >> worked. > >> > >> > >> > >>> > >>> So please, tell me what I am doing wrong. > >>> Thank you in advance, > >>> > >>> Taras > >>> > >>> > >>> > >> > >> > >> > >> > >> -- > >> 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. 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 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
In reply to this post by Taras Bahnyuk
Taras Bahnyuk wrote:
> Eric, I agree with what you say. > > I just don't know what must I do, this was actually the question. > Let's make it more clear. > Say, I have an xForms instance (/form), somewhere I have a file... Let's > say an image. > I use URL-generator to get this image encoded and placed in the > <document>blah...blah...blah<document> > Until now these steps work very well and are documented. > Next, lets say I want include this <document><document> into my /form > ... > How do I refer to it? > > What is the common practice in this case? The pattern usually followed is the following: o Your page model retrieves the image document. You know how to do this. o You page model returns that document on its "data" output. o Your XSLT page view may now access that input as its default input. You can this way include the Base64 data into your page view's XForms instance. <xforms:model> <xforms:instance> <form> <first-name/> <last-name/> <my-image-in-base64><xsl:value-of select="/document"/></my-image-in-base64> </form> </xforms:instance> </xforms:model> -Erik -- 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 |
Administrator
|
In reply to this post by Boon Low
Boon,
There is a difference between obtaining an URL to an external image, and actually downloading image data and storing it into an XForms instance. In the first case, what you just want to do is generate some XHTML which links to the URL, such as: <xhtml:img src="http://example.org/my-image.jpg" alt="Something"/> In the second case, you may in fact want to store the image data into a database, or display it with XForms. As of version 1.0, XForms does not allow you to display images based on content. There is a proposal in the current draft of XForms 1.1 to do that, which we hope to implement. -Erik Boon Low wrote: > Hi, > > I'm also working on this here. Basically trying to get a page to > dynamically display a remote image after it's URL is entered by user in > an input field. > > I think the leads to this may be found in the both the Google translate > and Flickr spell examples. The former request the Google service via > REST and write the translated results into the xforms instance via a > XSLT processor. The latter is doing similar thing with images retrieved > from Flickr, and writes the binary into the instance (./images).. I > haven't completely understood the flickr example though. > > In general, learning about how to access xforms instances from within > XSL views. I gathered this is the "doc()" reference is only feasible > after a "submission" event and not during the DOMActivate/DOMFocusIn > events etc which updates the instance? Also attempting to dynamically > display tabbed pane (widget:tabs) based on instance values.. > > Any info re. the above much appreciated.. > > > Boon > > ----- > Boon Low > System Developer, EGEE Training > UK National e-Science Centre > http://homepages.ed.ac.uk/boon > > On 31 Aug 2005, at 11:39, Taras Bahnyuk wrote: > > >> Eric, I agree with what you say. >> >> I just don't know what must I do, this was actually the question. >> Let's make it more clear. >> Say, I have an xForms instance (/form), somewhere I have a file... Let's >> say an image. >> I use URL-generator to get this image encoded and placed in the >> <document>blah...blah...blah<document> >> Until now these steps work very well and are documented. >> Next, lets say I want include this <document><document> into my /form >> ... >> How do I refer to it? >> >> What is the common practice in this case? >> >> >> -----Original Message----- >> From: Erik Bruchez [mailto:[hidden email]] >> Sent: dinsdag 30 augustus 2005 21:45 >> To: [hidden email] >> Subject: Re: [ops-users] URL-generator question >> >> Taras, >> >> You run the URL generator in an XPL pipeline. The result of this, as >> you have figured out, can for example be sent to the HTTP >> serializer. It can also be transformed, for example with XSLT, and/or >> be stored into an XML database like eXist. You can also include the >> result in Base64 in a XForms instance. >> >> But the bottom line is that you have to do some work to get there. The >> data retrieved by the URL generator is not going to be automagically >> present in your form. >> >> -Erik >> >> Taras Bahnyuk wrote: >> >> >>> Good afternoon all >>> >>> I'm a sheer beginner so have rather trivial question. >>> In my application I need to use some data coming from external files. >>> For retrieving the data I use URL-generator, which works pretty well: >>> >>> <p:processor name="oxf:url-generator"> >>> <p:input name="config"> >>> <config> >>> >>> <url>http://wsasd464:8080/orbeon/images/bulb-large.gif</url> >>> <content-type>image/gif</content-type> >>> </config> >>> </p:input> >>> <p:output name="data" id="attachment" /> >>> </p:processor> >>> >>> I can stream that data back to the browser in form of GIF image. >>> The following >>> >>> <p:processor name="oxf:http-serializer"> >>> <p:input name="config"> >>> <config> >>> <content-type>image/gif</content-type> >>> </config> >>> </p:input> >>> <p:input name="data" href="#attachment" /> >>> </p:processor> >>> >>> Produces nice html page with an image of the light bulb. >>> >>> What I need is to bind that data to my form and store it in the XML >>> database as a pair of tags: >>> <document xsi:type="xs:base64Binary" >>> >>> >>> >> content-type="image/gif">R0lGODlhMAAwAPcAAPz8/v////7+/vz8/f39/fz8/ Pr6/Pn >> >> >>> =</document> >>> >>> My problem is that I cannot find this attachment in the context of my >>> application. >>> It's neither under /form/document nor under /form/attachment ... >>> Well I have searched in all kind of weird locations but nothing >>> >>> >> worked. >> >> >>> >>> So please, tell me what I am doing wrong. >>> Thank you in advance, >>> >>> Taras >>> >>> >> >> >> >> >> -- >> 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. 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 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 |
Administrator
|
In reply to this post by Boon Low
Boon Low wrote:
> Hi, > > Just figured out a quick way to display remote image via URL after a > DOMActivate/DOMFocusOut (from an input field) event. Did this without > XML submission and a non-pipeline view (.xsl). Basically: > > In xforms model, bind the image URL with a calculate function to concat > the URL with a HTML IMG tag: > > <xforms:bind nodeset="imageHTML" relevant="false()" > calculate="concat('<img src="', ../image,'"/>')"/> > > And in xforms view, with the input with and the xforms:output tag to > output the image as HTML: > > <xforms:input ref="image" xhtml:size="30"> > <xforms:label class="fixed-width">Image URL</xforms:label> > </xforms:input> > > <xforms:output ref="imageHTML" appearance="xxforms:html"/> > > No URL-generator, base64, pipeline etc.. > > Anyway, better get a grip with the various pipeline processors soon! > And still trying to get the doc('input:instance') working within XSL > views.. As I mentioned in another post, I believe the user user was trying to do something different by retrieving the actual content of the image from a remote server. -Erik -- 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 |
In reply to this post by Alessandro Vernet
This is certain is a useful feature. I also tested this with blog
type input with options to allow users to input html or plain text. Boon On 31 Aug 2005, at 22:34, Alessandro Vernet wrote: > Hi Boon, > > This is correct, if you add an appearance="xxforms:html" on an > <xforms:output>, the value of the node you reference will be > interpreted as HTML and rendered as such. > > For the case where you just want to render an image, in the future you > will be able to use the mediatype="image/*" attribute on > <xforms:output> and bind the control to a node that contains a URL to > the image. > > Alex > > On 8/31/05, Boon Low <[hidden email]> wrote: > >> Hi, >> >> Just figured out a quick way to display remote image via URL after a >> DOMActivate/DOMFocusOut (from an input field) event. Did this >> without XML submission and a non-pipeline view (.xsl). Basically: >> >> In xforms model, bind the image URL with a calculate function to >> concat the URL with a HTML IMG tag: >> >> <xforms:bind nodeset="imageHTML" relevant="false()" >> calculate="concat('<img src="', ../image,'"/>')"/> >> >> And in xforms view, with the input with and the xforms:output tag to >> output the image as HTML: >> >> <xforms:input ref="image" xhtml:size="30"> >> <xforms:label class="fixed-width">Image URL</xforms:label> >> </xforms:input> >> >> <xforms:output ref="imageHTML" appearance="xxforms:html"/> >> >> No URL-generator, base64, pipeline etc.. >> >> Anyway, better get a grip with the various pipeline processors soon! >> And still trying to get the doc('input:instance') working within XSL >> views.. >> >> Regards >> >> Boon >> >> >> >> ----- >> Boon Low >> System Developer, EGEE Training >> UK National e-Science Centre >> http://homepages.ed.ac.uk/boon >> >> On 31 Aug 2005, at 12:02, Boon Low wrote: >> >> >>> Hi, >>> >>> I'm also working on this here. Basically trying to get a page to >>> dynamically display a remote image after it's URL is entered by >>> user in an input field. >>> >>> I think the leads to this may be found in the both the Google >>> translate and Flickr spell examples. The former request the Google >>> service via REST and write the translated results into the xforms >>> instance via a XSLT processor. The latter is doing similar thing >>> with images retrieved from Flickr, and writes the binary into the >>> instance (./images).. I haven't completely understood the flickr >>> example though. >>> >>> In general, learning about how to access xforms instances from >>> within XSL views. I gathered this is the "doc()" reference is only >>> feasible after a "submission" event and not during the DOMActivate/ >>> DOMFocusIn events etc which updates the instance? Also attempting >>> to dynamically display tabbed pane (widget:tabs) based on instance >>> values.. >>> >>> Any info re. the above much appreciated.. >>> >>> >>> Boon >>> >>> ----- >>> Boon Low >>> System Developer, EGEE Training >>> UK National e-Science Centre >>> http://homepages.ed.ac.uk/boon >>> >>> On 31 Aug 2005, at 11:39, Taras Bahnyuk wrote: >>> >>> >>> >>> >>>> Eric, I agree with what you say. >>>> >>>> I just don't know what must I do, this was actually the question. >>>> Let's make it more clear. >>>> Say, I have an xForms instance (/form), somewhere I have a file... >>>> Let's >>>> say an image. >>>> I use URL-generator to get this image encoded and placed in the >>>> <document>blah...blah...blah<document> >>>> Until now these steps work very well and are documented. >>>> Next, lets say I want include this <document><document> into my / >>>> form >>>> ... >>>> How do I refer to it? >>>> >>>> What is the common practice in this case? >>>> >>>> >>>> -----Original Message----- >>>> From: Erik Bruchez [mailto:[hidden email]] >>>> Sent: dinsdag 30 augustus 2005 21:45 >>>> To: [hidden email] >>>> Subject: Re: [ops-users] URL-generator question >>>> >>>> Taras, >>>> >>>> You run the URL generator in an XPL pipeline. The result of >>>> this, as >>>> you have figured out, can for example be sent to the HTTP >>>> serializer. It can also be transformed, for example with XSLT, >>>> and/or >>>> be stored into an XML database like eXist. You can also include the >>>> result in Base64 in a XForms instance. >>>> >>>> But the bottom line is that you have to do some work to get there. >>>> The >>>> data retrieved by the URL generator is not going to be >>>> automagically >>>> present in your form. >>>> >>>> -Erik >>>> >>>> Taras Bahnyuk wrote: >>>> >>>> >>>> >>>> >>>>> Good afternoon all >>>>> >>>>> I'm a sheer beginner so have rather trivial question. >>>>> In my application I need to use some data coming from external >>>>> files. >>>>> For retrieving the data I use URL-generator, which works pretty >>>>> well: >>>>> >>>>> <p:processor name="oxf:url-generator"> >>>>> <p:input name="config"> >>>>> <config> >>>>> >>>>> <url>http://wsasd464:8080/orbeon/images/bulb-large.gif</url> >>>>> <content-type>image/gif</content-type> >>>>> </config> >>>>> </p:input> >>>>> <p:output name="data" id="attachment" /> >>>>> </p:processor> >>>>> >>>>> I can stream that data back to the browser in form of GIF image. >>>>> The following >>>>> >>>>> <p:processor name="oxf:http-serializer"> >>>>> <p:input name="config"> >>>>> <config> >>>>> <content-type>image/gif</content-type> >>>>> </config> >>>>> </p:input> >>>>> <p:input name="data" href="#attachment" /> >>>>> </p:processor> >>>>> >>>>> Produces nice html page with an image of the light bulb. >>>>> >>>>> What I need is to bind that data to my form and store it in the >>>>> XML >>>>> database as a pair of tags: >>>>> <document xsi:type="xs:base64Binary" >>>>> >>>>> >>>>> >>>>> >>>>> >>>> content-type="image/gif">R0lGODlhMAAwAPcAAPz8/v////7+/vz8/f39/fz8/ >>>> Pr6/Pn >>>> >>>> >>>> >>>> >>>>> =</document> >>>>> >>>>> My problem is that I cannot find this attachment in the context >>>>> of my >>>>> application. >>>>> It's neither under /form/document nor under /form/attachment ... >>>>> Well I have searched in all kind of weird locations but nothing >>>>> >>>>> >>>>> >>>>> >>>> worked. >>>> >>>> >>>> >>>> >>>>> >>>>> So please, tell me what I am doing wrong. >>>>> Thank you in advance, >>>>> >>>>> Taras >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> >>>> -- >>>> 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. 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 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 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 |
In reply to this post by Erik Bruchez
Erik,
You're welcome. Our requirement for remote image is to allow users to input URL, preview the image straight away, manipulate it (resize etc.) and then make decision whether it should be part of a resource description (metadata). The application would then manage the image on behalf of the user, e.g. tracking the content provenance, caching it immediately or later in a database. What I was doing is a precursor to doing something to the remote content. Our app also needs to interact with other XML data from distributed sources (accessible with different data access protocols). So all hands to find out how this would be done with OPS. Regards, Boon ----- Boon Low System Developer, EGEE Training UK National e-Science Centre http://homepages.ed.ac.uk/boon On 31 Aug 2005, at 23:54, Erik Bruchez wrote: > Boon Low wrote: > >> Hi, >> Just figured out a quick way to display remote image via URL after >> a DOMActivate/DOMFocusOut (from an input field) event. Did this >> without XML submission and a non-pipeline view (.xsl). Basically: >> In xforms model, bind the image URL with a calculate function to >> concat the URL with a HTML IMG tag: >> <xforms:bind nodeset="imageHTML" relevant="false()" >> calculate="concat('<img src="', ../image,'"/>')"/> >> And in xforms view, with the input with and the xforms:output tag >> to output the image as HTML: >> <xforms:input ref="image" xhtml:size="30"> >> <xforms:label class="fixed-width">Image URL</xforms:label> >> </xforms:input> >> <xforms:output ref="imageHTML" appearance="xxforms:html"/> >> No URL-generator, base64, pipeline etc.. >> Anyway, better get a grip with the various pipeline processors >> soon! And still trying to get the doc('input:instance') working >> within XSL views.. >> > > Thanks for explaining to the list the tip above! > > As I mentioned in another post, I believe the user user was trying > to do something different by retrieving the actual content of the > image from a remote server. > > -Erik > > > -- > 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 |
Administrator
|
Boon,
That makes sense. I would retrieve the image with the URL generator, then store it somewhere temporarily (database or filesystem). Then my "preview" page would retrieve the stored image, very much like the XForms Upload example does. -Erik Boon Low wrote: > Erik, > > You're welcome. Our requirement for remote image is to allow users to > input URL, preview the image straight away, manipulate it (resize etc.) > and then make decision whether it should be part of a resource > description (metadata). The application would then manage the image on > behalf of the user, e.g. tracking the content provenance, caching it > immediately or later in a database. > > What I was doing is a precursor to doing something to the remote > content. Our app also needs to interact with other XML data from > distributed sources (accessible with different data access protocols). > So all hands to find out how this would be done with OPS. > > Regards, > > Boon > > > > ----- > Boon Low > System Developer, EGEE Training > UK National e-Science Centre > http://homepages.ed.ac.uk/boon > > On 31 Aug 2005, at 23:54, Erik Bruchez wrote: > >> Boon Low wrote: >> >>> Hi, >>> Just figured out a quick way to display remote image via URL after >>> a DOMActivate/DOMFocusOut (from an input field) event. Did this >>> without XML submission and a non-pipeline view (.xsl). Basically: >>> In xforms model, bind the image URL with a calculate function to >>> concat the URL with a HTML IMG tag: >>> <xforms:bind nodeset="imageHTML" relevant="false()" >>> calculate="concat('<img src="', ../image,'"/>')"/> >>> And in xforms view, with the input with and the xforms:output tag >>> to output the image as HTML: >>> <xforms:input ref="image" xhtml:size="30"> >>> <xforms:label class="fixed-width">Image URL</xforms:label> >>> </xforms:input> >>> <xforms:output ref="imageHTML" appearance="xxforms:html"/> >>> No URL-generator, base64, pipeline etc.. >>> Anyway, better get a grip with the various pipeline processors >>> soon! And still trying to get the doc('input:instance') working >>> within XSL views.. >>> >> >> Thanks for explaining to the list the tip above! >> >> As I mentioned in another post, I believe the user user was trying to >> do something different by retrieving the actual content of the image >> from a remote server. >> >> -Erik -- 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 |