Text inside xml prettyprinting should be monospace, pre-formatted by default

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Text inside xml prettyprinting should be monospace, pre-formatted by default

Martijn-4
This is from https://bugzilla.mozilla.org/show_bug.cgi?id=327276
Axel asked me to discuss this in the xml newsgroup (which is now this
mailing list, right?)

Reasons (for me) why xml prettyprinting of text inside xml prettyprint
should be monospaced, pre-formatted:
- IE6 is doing it.
- It makes text inside xml ofter more readable, because everything is
not thrown on one line.
_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: Text inside xml prettyprinting should be monospace, pre-formatted by default

Axel Hecht-2
Martijn wrote:
> This is from https://bugzilla.mozilla.org/show_bug.cgi?id=327276
> Axel asked me to discuss this in the xml newsgroup (which is now this
> mailing list, right?)
>
> Reasons (for me) why xml prettyprinting of text inside xml prettyprint
> should be monospaced, pre-formatted:
> - IE6 is doing it.

Not something I consider a primary reason.

> - It makes text inside xml ofter more readable, because everything is
> not thrown on one line.

I think the rationale for not doing that is that we don't do a
view-source, but a pretty printing, which is supposedly doing something
close to what you will see in the end. And in the case of text nodes,
whitspace:pre is not the default.

I think we should stick with what we have. We may want to expose the
whitespace:pre version better, or maybe even make that selection stick
(can we do that by persist, I wouldn't want to add a pref for this?).

Axel
_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: Text inside xml prettyprinting should be monospace, pre-formatted by default

Jonas Sicking
Axel Hecht wrote:

> Martijn wrote:
>> This is from https://bugzilla.mozilla.org/show_bug.cgi?id=327276
>> Axel asked me to discuss this in the xml newsgroup (which is now this
>> mailing list, right?)
>>
>> Reasons (for me) why xml prettyprinting of text inside xml prettyprint
>> should be monospaced, pre-formatted:
>> - IE6 is doing it.
>
> Not something I consider a primary reason.

Agreed. To me this argument falls behind pretty much everything else.

>> - It makes text inside xml ofter more readable, because everything is
>> not thrown on one line.
>
> I think the rationale for not doing that is that we don't do a
> view-source, but a pretty printing, which is supposedly doing something
> close to what you will see in the end. And in the case of text nodes,
> whitspace:pre is not the default.

using whitespace:pre is no guarantee that things will wrap. If you have
everything on a single line in the xml then you'd get that in the
prettyprint too.

> I think we should stick with what we have. We may want to expose the
> whitespace:pre version better, or maybe even make that selection stick
> (can we do that by persist, I wouldn't want to add a pref for this?).

Sticking is complicated since xbl runs with the privileges of the page.
And the page should certainly not be able to muck around with my
prettyprint settings.

It is a good idea to make switching between the monospaced and normal
stylesheets though.

Patches accepted :)

/ Jonas
_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml