Open Bug 310915 Opened 19 years ago Updated 2 years ago

The descriptive text for prettyprint should be more helpful

Categories

(Core :: XML, defect)

defect

Tracking

()

People

(Reporter: jwatt, Unassigned)

Details

The text displayed in the gray area at the top of source code displayed by
prettyprint is currently:

  "This XML file does not appear to have any style information associated with
   it. The document tree is shown below."

Our SVG implementation is the first SVG implementation to absolutely insist that
the required namespaces be explicitly declared. Unfortunately SVG authors have
been used to writing SVG without them for four years or more. There are now
hundreds of thousands of "SVG documents" out there without namespace
declarations. For many (perhaps most) SVG authors the message above is proving
to be confusing, offputting, and frequently results in them contacting us
directly for help. "Why does Mozilla need me to use a stylesheet to be able to
render my SVG?!" I'd like to change the above text to something clearer and more
helpful. Something that will help authors quickly identify the problem and find
out how to resolve it. Perhaps the default text could be changed to something like:

  "This XML file is not a recognised XML language, and it does not appear to
   have any style information associated with it. The document tree is shown
   below."

Additionally, if the root element is an 'svg' element, I'd like to add the
following sentence which is a link to a doc on the SVG Project site explaining
what they are doing wrong, and how they can fix it.

  "If this document is intended to be SVG click here to learn why it hasn't been
recognised."
I should say that making the first changed would be trivial. Adding the
additional link text based on the root element being 'svg' is more difficult (at
least for me) since I don't know XSL.
I suggest changing the "This XML file is not a recognised XML language" part to
"This XML file uses an unrecognized XML dialect" (because the file does not
contain any languages at all). 

The rest looks fine to me.
How about always showing:

This XML file is not a recognised as a known language, and it does not appear to
have any style information associated with it. Learn more about &brandShortName;
xml policy _here_. The document tree is shown below.
Is this something you want for 1.8?
Because you want to change a dtd (prettyprint.dtd), so it has l10n impact, right?
If we're considering this for branch, I'm going to have a little late-l10n
fit... we're freezing beta2 tonight, and I really don't think we want to have
any l10n changes after then.
(In reply to comment #2)
> "This XML file uses an unrecognized XML dialect" (because the file does not
> contain any languages at all). 

This puts correctness of terms above helpfulness to the average content author.
I believe the average author would be confused by "dialect" whereas they
wouldn't be confused by "language". Besides that I'd rather replace the word
"uses" with "contains" in your suggestion to emphesise it's the whole file that
isn't recognised, not some subpart of it.
Yes, I would like this change for 1.5, but I understand this is impossibly late
in the game. I'm just very concerned about this issue. If we can get something
approved and committed by tonight, great. If not, I guess we missed the boat.

sicking: do you have a suggestion for the URL that would be used as the link?
How about:

This XML file is not recognised as a known language, and it does not appear to
have any style information associated with it. <a
href="http://www.mozilla.org/prettyprint.html">Click here if you expected
&brandShortName; to recognise this file</a>. The document tree is shown below.
I veto this for 1.5 as much as I can.

To get anything helpful, please create verbose documents on devmo first, then
we can find out if that document is adopted in localizations on devmo and then
find a good wording (which should be consistent with the docs linked to) to show
in pretty print.

1.5 is really not the target to teach folks about XML, sob.
Okay, forgetting the link and doc for a minute, I'd like to at the very least
change the text to something that confuses less:

  "This XML file is not recognised as a known language, and it does not appear
   to have any style information associated with it. The document tree is shown
   below."

Now back to the link/doc. I already have a section of a document which is aimed
at this problem. It's specific to SVG, but I'd be happy to make it generic and
more verbose.

  http://jwatt.org/svg/authoring/#namespace-binding

I don't think we want it on devmo where anyone can change it since this would be
a direct link from firefox/moz. I think we'd want it somewhere that's more
restricted on the main mozilla.org site.
We show the document tree for known languages too (XBL comes to mind, as does
XForms).    So "not a recognized XML language" would be false (though the fact
that we show this stuff for XForms might well be a bug, fwiw).
Are l10n changes possible on the 1.8.1 branch?  Or no?
Flags: blocking1.9a1?
Yes, they are.
So let's get this fixed before branch l10 freeze?
Flags: blocking1.8.1?
Reading through the bug, there seems to be some confusion on what the UE should 
be, Mike, do you have a suggestion?

If we intend to link to a website (which may be useful), that website should
exist, likely on devmo, and we should have an l10n policy on what that URL is
allowed to be.

Not sure I'm convinced that showing parts depending on guesstimates is going to
be a good way forwards, but Mike can probably say something to that, too.
Not going to block 1.8.1 for this bug.
Flags: blocking1.8.1? → blocking1.8.1-
Flags: blocking1.9a1? → blocking1.9-
Assignee: xml → nobody
QA Contact: ashshbhatt → xml
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.