That's a brillant idea...

I check about it tomorrow.

Thanks

Richard

On Mon, Mar 21, 2011 at 5:05 PM, mart <[email protected]> wrote:

> Hi Richard,
>
> Yeah, I hate transforms too :( I haven't really worked with wordml,
> but... it all looks the same to me... I would definitely take the
> dictionary approach, should be fairly simple. If you like i can grap a
> web2py table, convert it to xml (that is how you are getting you
> xml?), then write a quick script to wrap code I already have that
> would probably do the job almost as is (i tend to automate pretty much
> everything work related) so i make things as reusable as possible ...,
> then you can simply drop it in a controller or in /modules (or use as
> is) and re-use any time you like. I'm sure we can get a decent wordml
> reference table on the Net somewhere. Let me know if that's what
> you're looking for and I can probably get it done tonight.
>
> Mart :)
>
> On Mar 21, 1:25 pm, Richard Vézina <[email protected]>
> 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 <[email protected]> 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 <[email protected]>
> > > 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 <[email protected]> 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 <[email protected]> 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!
>

Reply via email to