I like the .tml approach better so far by a mile. I can see it easily and it's not too much brain work to get it onto "paper" so to speak.
On 03/04/2012, at 8:12 PM, Lance Java wrote: > I would still use .tml to generate XML. Tapestry is tied to http, it is > implemented as a http request filter. > > The only way to use tapestry without http is using tapx-templating, even > then you would still probably choose .tml for generating XML > > On Tuesday, 3 April 2012, Chris Mylonas <ch...@opencsta.org> wrote: >> I guess the MarkupWriter comes in handy for generating XML documents as > well >> >> does tapestry allow the output of say, >> >> <xml version=1.0 utf> >> >> </xml> >> >> >> That would come in handy for submitting xml documents to other services > without HTTP. >> >> >> On 03/04/2012, at 7:54 PM, Lance Java wrote: >> >>> I always favour .tml for generating markup. >>> >>> The MarkupWriter gives you complete control but in this case, I think > that >>> .tml would suit your use case better >>> >>> On Tuesday, 3 April 2012, Lance Java <lance.j...@googlemail.com> wrote: >>>> This should work: >>>> >>>> private static final String NEWLINE = >>> System.getProperty("line.separator"); >>>> ... >>>> >>>> writer.element("div", "class", "userbackground"); >>>> writer.writeRaw(NEWLINE); >>>> writer.element("div","id",currentPhone.getNumber(), "class","user"); >>>> ... >>>> >>>> On Tuesday, 3 April 2012, Chris Mylonas <ch...@opencsta.org> wrote: >>>>> Hi Tap List, >>>>> >>>>> >>>>> I've got production mode set to false and the parts of the html > document >>> that I haven't created come out quite nicely. >>>>> The parts I have rendered in my component (below) are coming out on one >>> line. It's the eye-sore of the document!! >>>>> >>>>> How do I fix this? >>>>> >>>>> >>>>> I'm also wondering what the advantages are of using code to generate > the >>> html if I've already built the template in html? >>>>> This >>>>> >>>>> writer.element("div", "class", "userbackground"); >>>>> writer.element("div","id",currentPhone.getNumber(), >>> "class","user"); >>>>> writer.element("div","class","infoline1"); >>>>> writer.element("div","class","name"); >>>>> writer.write(currentPhone.getName() + " " + >>> currentPhone.getNumber()); >>>>> writer.end(); >>>>> writer.end(); >>>>> writer.element("div","class","infoline2"); >>>>> writer.element("div","class","voicemail"); >>>>> writer.element("img","src","email.png"); >>>>> writer.end(); >>>>> writer.end(); >>>>> writer.end(); >>>>> writer.element("div", "class","currentcall >>> currentcallplaceholder"); >>>>> writer.writeRaw(" "); >>>>> writer.end(); >>>>> writer.end(); >>>>> writer.end(); >>>>> writer.element("div","class","spacer"); >>>>> writer.end(); >>>>> >>>>> VS >>>>> this >>>>> >>>>> writer.writeRaw("" + >>>>> "<div class=\"userbackground\">" + >>>>> "<div id=\"" + currentPhone.getNumber() + "\" class=\"user\">" + >>>>> "<div class=\"infoline1\">" + >>>>> "<div class=\"name\">" + currentPhone.getName() + " " + >>> currentPhone.getNumber() + "</div>" + >>>>> "</div>" + >>>>> "<div class=\"infoline2\">" + >>>>> "<div > class=--------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org