Yes to much idea to make them all! R
On Mon, Mar 21, 2011 at 9:09 PM, villas <villa...@gmail.com> wrote: > Hi Richard, > > In my case I was making the XML fit a specification given to me by > someone else. It isn't very flexible to change it, but I doubt that > the specification will be changing much either. > > It is a pity there isn't a Zen of XML saying there should ideally be > just one obvious way of doing something. During my hours of research I > had so many ideas that I had to go and take an aspirin! > > -D > > > On Mar 21, 5:25 pm, Richard Vézina <ml.richard.vez...@gmail.com> > wrote: > > It is not bad for start... But what happen when you change your query in > > term of number of columns or rows? Do you have to make an other template > > each time... Personnaly I don't like xml that much, so I don't want to > have > > to get back at editing my template all the time. > > > > Richard > > > > On Mon, Mar 21, 2011 at 1:19 PM, villas <villa...@gmail.com> wrote: > > > Hi Richard > > > > > As a novice, the easiest solution I found was something like this: > > > > > * create wordml.xml template in views/default/ folder > > > * prepare the xml, place variables for the data > > > * create a wordml function in controller > > > * manipulate your data into the variables in the controller ready to > > > place in the template > > > * call the function with url wordml.xls > > > > > This is adequate for me, but may be too simple for your case. Mart > > > may have something better, but 'simple' is about my limit, and I > > > already lost almost a day studying other methods :-) > > > > > Good luck, D > > > > > On Mar 21, 1:42 pm, Richard Vézina <ml.richard.vez...@gmail.com> > > > wrote: > > > > Hello Mart, > > > > > > I need to generate WordML out of web2py... Is there a "easier" or > more > > > > integrated way then use xslt transformation that is the easiest way > that > > > > comes to my mind? > > > > > > Thanks > > > > > > Richard > > > > > > On Sun, Mar 20, 2011 at 8:20 PM, mart <msenecal...@gmail.com> wrote: > > > > > I use lots of XML to drive automation, file system structure, > > > > > validation, user initial input, etc, so pretty much everywhere I > make > > > > > use of xml. much of the data (that may be user or project specific) > is > > > > > submitted as XML, then use that to populate tables (which BTW - I > > > > > found lately to be a great way to share data between module > [something > > > > > that looks like a properties object]). I also frequently generate > and/ > > > > > or convert chunks of xml to dictionary objects (wrapper to make a > > > > > dictionary behave like an object - looks like web2py's storage) so > I > > > > > can run through data by doing a.b.c.d (which I find very useful at > > > > > times). These are some of the ways where I use xml on daily basis. > > > > > > > So my use of it in a web2py context goes more towards DAL > stand-alone > > > > > than in a 'over the web' context, but you're welcome to anything I > > > > > have if interested. I have lots of code and can probably make > samples > > > > > depending on what you need, - I mostly stick to etree (maybe just a > > > > > preference), because I like that I can reset .root anywhere i like > and > > > > > can easily group similar items). > > > > > > > Mart :) > > > > > > > On Mar 20, 3:58 pm, villas <villa...@gmail.com> wrote: > > > > > > OK I found a way (it was of course easier than I thought!). > > > > > > However, if anyone has any interesting XML resources/tips, I > would > > > > > > still be interested to learn more. > > > > > > Thanks! > > > > >