Hi All,
I have a piece of code that displays images stored in Base64Binary. The instances used for the same gets populated from a "GET" submission to the database. The code looks as shown below <xhtml:table> <xhtml:tr> <xhtml:td> <xforms:output ref="instance('company-data')/section-1/logo-file" mediatype="image/*"/> </xhtml:td> <xhtml:td> <xforms:output ref="instance('sponsor-data')/section-1/logo-file" mediatype="image/*"/> </xhtml:td> </xhtml:tr> </xhtml:table> The above piece of code is repetitive across the entire application. So I tried putting this in a file and include the file using <xi:include>. The problem is that the images appear on body load, but any activity on the page (like clicking on links, or filling input box etc) loses the images. If I include this piece of code in the file instead of doing an <xi:include> it works perfectly fine. A detailed analysis using firebug shows me that orbeon creates an image under the dynamic folder (/XXXXX/xforms-server/dynamic/b5b3e3f222f7d4fd8eae65b9f8d15e9c) in its engine and gives the browser a unique handle (b5b3e3f222f7d4fd8eae65b9f8d15e9c) to this image, on any activity the unique handle is changing (happens for <xi:include but not if the code is written directly in the file). Can anybody explain me whats going on here? How is the orbeon engine handling this include ? regards --SD |
Administrator
|
SD,
That's probably because, unfortunately, xi:include adds an xml:base attribute by default, which changes the base for URL resolution. Not sure why anybody thought this would ever be useful! The good news is that you can override this: xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" <xi:include href="my URL" xxi:omit-xml-base="true"/> -Erik On Wed, Apr 13, 2011 at 9:33 AM, SD <[hidden email]> wrote: > Hi All, > > I have a piece of code that displays images stored in Base64Binary. The > instances used for the same gets populated from a "GET" submission to the > database. The code looks as shown below > > > > > > > > > > > > > The above piece of code is repetitive across the entire application. So I > tried putting this in a file and include the file using . The problem is > that the images appear on body load, but any activity on the page (like > clicking on links, or filling input box etc) loses the images. If I include > this piece of code in the file instead of doing an it works perfectly fine. > > A detailed analysis using firebug shows me that orbeon creates an image > under the dynamic folder > (/XXXXX/xforms-server/dynamic/b5b3e3f222f7d4fd8eae65b9f8d15e9c) in its > engine and gives the browser a unique handle > (b5b3e3f222f7d4fd8eae65b9f8d15e9c) to this image, on any activity the unique > handle is changing (happens for <xi:include but not if the code is written > directly in the file). > > Can anybody explain me whats going on here? How is the orbeon engine > handling this include ? > > regards > --SD > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/xi-include-not-displaying-images-correctly-tp3447670p3447670.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 > > -- 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 |