problem with incusion of svg in xslt view

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with incusion of svg in xslt view

Blanc Frédéric
Hi!

I must generate svg files (that's ok) and integrate them in xslt view : here is my problem :

I don't know exactly the best way of doing this :
using

<embed src="file.svg".../>

don't work. All the xslt view display correctly except the area of the svg picture : ops error : Cannot load "/apps/is/page-flow.xml" with webapp loader.

It's the same with the

<object src="file.svg".../>

So I decided to bind the model.xpl where I generate the svg files with the view but I want to have your opinion about having perhaps 10 svg files of 1000 lines each in the instance... Is it the right way of integrating svg in xslt pages with ops?

Thank's you for your attention and h ave a nice day!

Frédéric

-----------------------------------------------------
Romandie Annonces : http://annonces.romandie.com
Petites annonces 100% gratuites entre romands
-----------------------------------------------------




--
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
Reply | Threaded
Open this post in threaded view
|

Re: problem with incusion of svg in xslt view

Daniel E. Renfer
Here's how I've been doing it, and it seems to work for me. (both in
Firefox and in IE+Adobe plugin)

<object
    type="image/svg+xml"
    data="file.svg"
    width="425"
    height="85">Alt text</object>

--
Daniel E. Renfer
http://kronkltd.net/

On 1/22/07, Blanc Frédéric <[hidden email]> wrote:

> Hi!
>
> I must generate svg files (that's ok) and integrate them in xslt view : here
> is my problem :
>
> I don't know exactly the best way of doing this :
> using
>
> <embed src="file.svg".../>
>
> don't work. All the xslt view display correctly except the area of the svg
> picture : ops error : Cannot load "/apps/is/page-flow.xml" with webapp
> loader.
>
> It's the same with the
>
> <object src="file.svg".../>
>
> So I decided to bind the model.xpl where I generate the svg files with the
> view but I want to have your opinion about having perhaps 10 svg files of
> 1000 lines each in the instance... Is it the right way of integrating svg in
> xslt pages with ops?
>
> Thank's you for your attention and h ave a nice day!
>
> Frédéric
>
>
>
> -----------------------------------------------------
>  Romandie Annonces : http://annonces.romandie.com
>  Petites annonces 100% gratuites entre romands
>  -----------------------------------------------------


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: problem with incusion of svg in xslt view

f.blanc
In reply to this post by Blanc Frédéric
Thanks Daniel. I've try to include an svg file with your code :

<object
type="image/svg+xml"
data="file.svg"
width="425"
height="85">Alt text
</object>

but without success :o(. The xslt page displays normally except for the tag object that render an orbeon fault (in a box with the size of the object).

I've try to make svg files directly served in the page-flow.xml (with or without mime/type)

<files path-info="*.svg" mime-type="image/svg+xml"/>

but always the same error. The only way that works (in my case...) is to use the XInclude processor

<xi:include href="file.svg" xxi:omit-xml-base="true"/>

But now I have another related question : is it possible to refresh an image or a svg file (when they have changed on the disc) as soon as the XForms Instance changes? I've already look at the chart demo but all tips are welcome :o)

Thank you for your attention

Frédéric


--
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
Reply | Threaded
Open this post in threaded view
|

Re: problem with incusion of svg in xslt view

Erik Bruchez
Administrator
> But now I have another related question : is it possible to refresh an
> image or a svg file (when they have changed on the disc) as soon as the
> XForms Instance changes? I've already look at the chart demo but all
> tips are welcome :o)

Are you talking about refreshing just an area of the page, or the entire
page?

xforms:output/@mediatype="text/html" allows dynamically replacing HTML
in a page, but it is currently not able to replace XML, including SVG.

You could possibly use an iframe to do this and reload the iframe?
That's not very clean and iframe have other drawbacks...

-Erik

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: problem with incusion of svg in xslt view

f.blanc
In reply to this post by Blanc Frédéric
But now I have another related question : is it possible to refresh an image or a svg file (when they have changed on the disc) as soon as the XForms Instance changes? I've already look at the chart demo but all tips are welcome :o)

Are you talking about refreshing just an area of the page, or the entire page?

I must refresh images (jpg) or svg that are generated on-the-fly (call of xpl processor that generate the image).
xforms:output/@mediatype="text/html" allows dynamically replacing HTML in a page, but it is currently not able to replace XML, including SVG.

The tag <xforms:output ...> with the attribute mediatype is exactly what I need. But I have two questions about that.
What I want is that as soon as the user have changed a value in a select-box (for example), an xpl file is called, generate images and these images must be updated on-the-fly in the page.
Given the following code,
<xforms:model>
  <xforms:instance id="budget">
      <images>
          <currency>CHF</currency>
          <
image-1-uri/>
          <image-2-uri/>
     
</images>
  </xforms:instance>
  <
xforms:bind nodeset="image-1-uri" type="xs:anyURI"
calculate="xxforms:call-xpl ('oxf:/mydir/genereImg1.xpl', ('input', 'xpath'), (instance('budget')/input), 'formatted-output')/*, 'html')"/>
 
<xforms:bind nodeset="image-2-uri" type="xs:anyURI" calculate="xxforms:call-xpl ('oxf:/mydir/genereImg2.xpl', ('input', 'xpath'), (instance('budget')/input), 'formatted-output')/*, 'html')"/>
</xforms:model>
...
<
xforms:output mediatype="
image/jpeg" ref="image-1-uri"/>
...
<xforms:output mediatype="image/jpeg" ref="image-2-uri"/>
...
<xforms:select1 ref="instance('budget')/currency" appearance="minimal">
    <xforms:label>Devise : </xforms:label>
    <xforms:item>
        <xforms:label>CHF</xforms:label>
        <xforms:value>CHF</xforms:value>
    </xforms:item>
    <xforms:item>
        <xforms:label>EU</xforms:label>
        <xforms:value>EU</xforms:value>
    </xforms:item>
</xforms:select1>


I need that when the user select, for example, "EU" in a select-box bound to images/currency, the image is generated on the disc (the new replace the old one) and update dynamically. Here I have bind the nodeset <image-1-uri/> and <image-2-uri/> with the calculate attribute but I think that changing the control value will not update the image. If I call the xpl file when changing the value of the control, then the image will be updated on disc but not in the page... Isn't it? Is it a solution to do that? (when control changes, then the xpl file is called, write the new image on the disc and the image is updated on-the-fly)

Another question : All the processors I use have no output. Is it possible to call an xpl file without output using xxforms:call-xpl ? Or must I use a factice on?

Thank you for your attention.

Frédéric


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: problem with incusion of svg in xslt view

Alessandro Vernet
Administrator
On 1/29/07, Frédéric Blanc <[hidden email]> wrote:
> But now I have another related question : is it possible to refresh an image
> or a svg file (when they have changed on the disc) as soon as the XForms
> Instance changes? I've already look at the chart demo but all tips are
> welcome :o)

Frédéric,

Yes: you can refresh an image when a new selection is done in a drop
down. In general  I prefer to use a submission instead of
xxforms:call-xpl(). In your <xforms:select1> have a:

<xforms:send submission="generate-image" ev:event="xforms-value-changed"/>

Then that submission will do:

<xforms:submission id="generate-image" method="post"
    action="/service/generate-image" ref="instance('budget')"
    replace="instance"/>

In your page-flow.xml:

<page path-info="/service/generate-image" view="your-pipepline.xpl"/>

You might have to always generate a different image name, so the
browser actually reloads the image.

Alex
--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws