Closed Bug 286073 Opened 20 years ago Closed 7 years ago

internal code should use application/xml rather than text/xml

Categories

(Core :: XSLT, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: annevk, Assigned: peterv)

References

Details

Attachments

(1 file, 2 obsolete files)

For current usage, see:
 <http://lxr.mozilla.org/seamonkey/search?string=text%2Fxml>

Per RFC 3023 section 8.4 text/xml default to US-ASCII over HTTP when no
'charset' parameter is supplied. In order to avoid that we should switch our
internal code to use application/xml in which case the XML document can decide
about the character encoding.

If this is just switch and replace work, please say so and I'll provide a patch.
If not, if someone might be able to give guidelines or do the work himself that
would be great.
Should be just a search-n-replace. Though text/xml should still always work so
in some cases you should just add "application/xml".

Though you should make sure the content-policy implementors can deal.
Attached patch patch #1 (obsolete) — Splinter Review
Attachment #177380 - Flags: review?(bugmail)
So did you check that content-policy implementors can deal with this?
O sorry about that. I wanted to make a note that I wasn't sure what you meant by
that.
I did the check now. It seems to be ok. (I must admit Boris Zbarsky did explain
everything to me for which I am very grateful.)
You are changing the type passed to the NS_CheckContentLoadPolicy call. Are you
sure that won't break anything?
Ah, sorry, i should read all bugmail before replying :)

I'll review in a bit
Comment on attachment 177380 [details] [diff] [review]
patch #1

if bz says the contentpolicy change is ok then that's all I need :)

r=me
Attachment #177380 - Flags: review?(bugmail) → review+
Attachment #177380 - Flags: superreview?(peterv)
Comment on attachment 177380 [details] [diff] [review]
patch #1

>Index: extensions/transformiix/source/xslt/txOutputFormat.cpp
>===================================================================

>@@ -125,17 +125,17 @@ void txOutputFormat::setFromDefaults()
> 
>             if (mOmitXMLDeclaration == eNotSet)
>                 mOmitXMLDeclaration = eFalse;
> 
>             if (mIndent == eNotSet)
>                 mIndent = eFalse;
> 
>             if (mMediaType.IsEmpty())
>-                mMediaType.AppendLiteral("text/xml");
>+                mMediaType.AppendLiteral("application/xml");

Actually, the XSLT spec says the default is text/xml. See
http://www.w3.org/TR/xslt#output I think we should add a charset parameter with
the correct encoding (which should be stored in mEncoding).
Attachment #177380 - Flags: superreview?(peterv) → superreview-
Attached patch patch #2 (obsolete) — Splinter Review
s+sr=peterv, per discussion on IRC. peterv will update txOutputFormat.cpp if
needed.

I contacted the WG about the specification:
 <http://lists.w3.org/Archives/Public/xsl-editors/2005JanMar/0045.html>
Attachment #177380 - Attachment is obsolete: true
Attachment #177498 - Flags: superreview+
Attachment #177498 - Flags: review+
Attached patch patch #3Splinter Review
Take into account some additional comment made on IRC by timeless. (Again with
approval from peterv.)
Attachment #177498 - Attachment is obsolete: true
Attachment #177535 - Flags: superreview+
Attachment #177535 - Flags: review+
Assignee: peterv → bug
peterv said he would address comment 9 if needed.
Assignee: bug → peterv
QA Contact: keith → xslt
I no longer think this is worth doing. text/xml is fine.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: