Well thnx alot for the elaboration It is very useful...yet I am facing troubles using the repeat tag...and how would you see xforms..will it be able to integrate with visual svg tools from adobe and others... also I am still not very sure why it did not work on example.com...and if there is a server I can try my work with.....or do I need a special local machine set up...to be able to extract data from.other xml files and post requests... thnx again..xforms actually is the nicest thing I experienced after mango...as I hate scripts.. kojo --- Mark Birbeck <[EMAIL PROTECTED]> wrote:
> Kojo, > > Without getting more of an idea of how the file is > currently structured, I'm > not sure what particular part of the problem is > going to be the most > important for you to solve. For example, if it's > simply the management of a > large number of controls, then the XForms <repeat> > element is ideal -- it > iterates across a nodeset, and renders a template > for each node. So, if you > had 23 elements called 'data' in your instance data, > you might do this: > > <xf:repeat nodeset="data"> > <xf:trigger appearance="minimal"> > <xf:label> > <svg:svg width="100" height="100" > viewBox="0 0 100 100"> > <svg:rect fill="green" x="0" y="0" > height="100" width="100" /> > </svg:svg> > </xf:label> > ... > </xf:trigger> > </xf:repeat> > > and you would get 23 buttons. (I'm sure you don't > mean that you have 23 > identical buttons, but this technique may account > for at least some of > them.) > > On you other hand, you might be talking about how > you actually 'wire' the > XForms data to the SVG 'widgets'. This is best done > through events, and a > very simple example is here (the bars in the bar > chart are updated with the > current temperature, obtained from a weather web > service): > > > <http://www.formsplayer.com/demo/web-services/weather-svg.html> > > The script in this example is only concerned with > taking the data from the > XForms instance and putting it into the correct > places to get the height of > the bars, labels, etc. Although ideally we would > even get rid of this > script, at least it does mean that by using XForms > we're not having to write > all the other script to send and receive data > requests, validate the data, > send change events to the UI, and so on. If you can > reduce your script to > perform just this purpose -- essentially connecting > the model to the view -- > then the final step will be to replace this script > with XBL or a close > relative. > > For example, the script in the weather demo that > takes a value from the data > and uses it to set the height of a bar can be > replaced with a simple > declarative statement in XBL 1.0. > > Anyway, if you are able to post parts of your form > to this list it would > help, and I think it might be an interesting > exercise to see how it could be > converted to declarative mark-up using XForms and > SVG (and others may be > able to see how much of it can be done in Mozilla, > too). > > Regards, > > Mark > > > > Mark Birbeck > CEO > x-port.net Ltd. > > e: [EMAIL PROTECTED] > t: +44 (0) 20 7689 9232 > w: http://www.formsPlayer.com/ > > Download our XForms processor from > http://www.formsPlayer.com/ > > > -----Original Message----- > > From: A.M.Shourbagui > [mailto:[EMAIL PROTECTED] > > Sent: 19 December 2004 02:08 > > To: [EMAIL PROTECTED] > > Subject: RE: [svg-developers] Re: SVG post server > request... > > > > > > > > Well I have tried it and it works fine it just > needs > > some enhancements to be imlemented.. > > Yet I think it is ideal with my project as I have > a > > web server with very very limited > capabilities...so I > > want to get rid of scripting as much as possible > .. > > but I do have a large svg file and around 23 > > buttons..how can I integrate xforms with each svg > > button...is there a scenario for that... > > thnx a million > > Kojo > > --- Mark Birbeck <[EMAIL PROTECTED]> wrote: > > > > > Jeff, > > > > > > To show how powerful XForms + SVG is, I took > your > > > snippet of code, and > > > turned it into XForms + SVG -- your SVG > rectangle is > > > still used to initiate > > > the submission, but the submission and event > > > handling is defined in terms of > > > XForms rather than bits of script. > > > > > > I've also replaced your alerts with XForms > messages, > > > which allows me to show > > > off some additional features, namely putting > further > > > SVG in the messages. > > > > > > Finally, I've put a bit more SVG into the > > > mouseover/hint to show how easy > > > that is -- not something that's very easy to do > > > without even more script in > > > SVG. > > > > > > The entire mark-up is here, and a link to a live > > > form on our server is at > > > the end: > > > > > > <?xml version="1.0" encoding="utf-8"?> > > > <html > > > xmlns="http://www.w3.org/1999/xhtml" > > > xmlns:ev="http://www.w3.org/2001/xml-events" > > > xmlns:xf="http://www.w3.org/2002/xforms" > > > xmlns:svg="http://www.w3.org/2000/svg" > > > > > > > <head> > > > <xf:model> > > > <!-- > > > The data we want to submit > > > --> > > > <xf:instance> > > > <test xmlns="" /> > > > </xf:instance> > > > > > > <!-- > > > This is the actual submission -- send > the > > > data > > > referred to, to the specified URL, and > put > > > the > > > returned value in the same instance. > > > --> > > > <xf:submission id="s1" > > > action="http://example.org" > > > method="post" replace="instance"> > > > <!-- > > > The event xforms-submit happens on > the > > > reqest, > > > but before the work is done. We show > a > > > modal > > > message at this point. Note that the > > > message > > > has SVG in it. > > > --> > > > <xf:message level="modal" > > > ev:event="xforms-submit"> > > > About to post because you pressed > the > > > red square that looks > > > like this > > > <svg:svg width="25" height="25" > > > viewBox="0 0 100 100"> > > > <svg:rect fill="red" x="0" y="0" > > > height="100" width="100" /> > > > </svg:svg> > === message truncated === __________________________________ Do you Yahoo!? Dress up your holiday email, Hollywood style. Learn more. http://celebrity.mail.yahoo.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/1U_rlB/TM --------------------------------------------------------------------~-> ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

