[Nevow] how to generate XHMTL without whitespaces
Hi. Is it possible (and how) to generate XHTML documents without extra whitespaces? Thanks Manlio Perillo
On Mon, 25 Sep 2006 19:06:58 +0200 Manlio Perillo <manlio_perillo@libero.it> wrote:
Is it possible (and how) to generate XHTML documents without extra whitespaces?
No pun intended, just being curious: Do you want that feature for something else than saving a small amount of bandwidth? I would prefer generation of properly-indented XHTML as an option, which helps debugging -- but one can always call tidylib from the renderHTTP() method ;-) Cheers, -- There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU, Linux, etc, and those who know COBOL. It gets very difficult for me at parties, not knowing which group to socialise with :-) Sitaram Chamarty
Adrian Perez ha scritto:
On Mon, 25 Sep 2006 19:06:58 +0200 Manlio Perillo <manlio_perillo@libero.it> wrote:
Is it possible (and how) to generate XHTML documents without extra whitespaces?
No pun intended, just being curious: Do you want that feature for something else than saving a small amount of bandwidth?
No, I want this feature to avoid possible problems with whitespaces.
I would prefer generation of properly-indented XHTML as an option, which helps debugging -- but one can always call tidylib from the renderHTTP() method ;-)
No, please. This can kill the server... Regards Manlio Perillo
On Mon, 25 Sep 2006 22:12:46 +0200 Manlio Perillo <manlio_perillo@libero.it> wrote:
Adrian Perez ha scritto:
On Mon, 25 Sep 2006 19:06:58 +0200 Manlio Perillo <manlio_perillo@libero.it> wrote:
Is it possible (and how) to generate XHTML documents without extra whitespaces?
No pun intended, just being curious: Do you want that feature for something else than saving a small amount of bandwidth?
No, I want this feature to avoid possible problems with whitespaces.
Now I see the point... and now I realize that feature would make some of my template more readable. Unfortunately I don't know how to generate code without whitespaces, sorry :-\
I would prefer generation of properly-indented XHTML as an option, which helps debugging -- but one can always call tidylib from the renderHTTP() method ;-)
No, please. This can kill the server...
Of course performance would be like a pain in the ass, but I sometimes do that when checking generated code «by hand», but *only* when debugging ;-P Cheers, -- I'd like to meet the man who invented sex and see what he's working on now. -- "Experience is what you get when you don't get what you want" -- (Dan Stanford)
Adrian Perez wrote:
On Mon, 25 Sep 2006 19:06:58 +0200 Manlio Perillo <manlio_perillo@libero.it> wrote:
Is it possible (and how) to generate XHTML documents without extra whitespaces?
No pun intended, just being curious: Do you want that feature for something else than saving a small amount of bandwidth? I would prefer
Whitespace IS SIGNIFICANT in xhtml. You cannot just add it anywhere you want, like in prior versions of HTML In answer to the original posters question, stan and appropriately formatted disk xhtml templates work in my experience? What exactly is not working?
Phil Mayers ha scritto:
Adrian Perez wrote:
On Mon, 25 Sep 2006 19:06:58 +0200 Manlio Perillo <manlio_perillo@libero.it> wrote:
Is it possible (and how) to generate XHTML documents without extra whitespaces?
No pun intended, just being curious: Do you want that feature for something else than saving a small amount of bandwidth? I would prefer
Whitespace IS SIGNIFICANT in xhtml. You cannot just add it anywhere you want, like in prior versions of HTML
In answer to the original posters question, stan and appropriately formatted disk xhtml templates work in my experience?
Is this a question? ;-)
What exactly is not working?
One "problem" is with <n:invisible>: this template: <label>label: <select name="a_name" n:render="sequence" n:data="a_list"> <option n:pattern="item"> <n:invisible n:render="string" n:data="0" /> <n:attr name="label" n:render="string" n:data="1" /> </option> </select> </label> gives a: <label>label: <select name="a_name"><option label="a_label"> 1 </option><option label="another_label"> 2 </option></select> </label> I'm not having problems (now), I was just curious. Regards Manlio Perillo
Manlio Perillo wrote:
this template:
<label>label: <select name="a_name" n:render="sequence" n:data="a_list"> <option n:pattern="item"> <n:invisible n:render="string" n:data="0" /> <n:attr name="label" n:render="string" n:data="1" /> </option> </select> </label>
gives a:
<label>label: <select name="a_name"><option label="a_label">
1
</option><option label="another_label">
Erm - yes. Because your template has whitespace in it. Remove it and it should work - that is: <label>label:<select name="a_name" n:render="sequence" n:data="a_list"><option n:pattern="item">...
Phil Mayers ha scritto:
Manlio Perillo wrote:
this template:
<label>label: <select name="a_name" n:render="sequence" n:data="a_list"> <option n:pattern="item"> <n:invisible n:render="string" n:data="0" /> <n:attr name="label" n:render="string" n:data="1" /> </option> </select> </label>
gives a:
<label>label: <select name="a_name"><option label="a_label">
1
</option><option label="another_label">
Erm - yes. Because your template has whitespace in it. Remove it and it should work - that is:
<label>label:<select name="a_name" n:render="sequence" n:data="a_list"><option n:pattern="item">...
Ok, but I would like to have a readable template... This is the reason why I'm asking if it is possible to remove extra extra whitespaces. Regards Manlio Perillo
participants (3)
-
Adrian Perez
-
Manlio Perillo
-
Phil Mayers