[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Action request: mime-type of xml-dtd should be treated as text

From: John Niven <jniven_at_bravurasolutions.com>
Date: Tue, 5 Feb 2008 09:40:27 +1300

(Response follows original message)

-----Original Message-----
From: Mark Irving [mailto:Mark.Irving_at_informatix.co.uk]
Sent: Tuesday, 5 February 2008 01:23
To: users_at_subversion.tigris.org
Subject: Action request: mime-type of xml-dtd should be treated as text

I have a repository with a DTD file checked in and carrying the
property svn:mime-type value application/xml-dtd, the correct
type for it according to RFC 2043. It is inconvenient to do some
Subversion operations on it, such as "blame", because Subversion
thinks it is non-textual. It would be an improvement if XML mime
types were recognised as text, and specifically this one.

As far as I can tell, the enhancement should be to function
svn_mime_type_is_binary in subversion/libsvn_subr/validate.c. I
suggest the following additions to the mime types treated as
text.

application/xml-dtd
application/xml
application/*+xml

(The FAQ and the source agree that Subversion's text mime-types
are text/*, image/x-xbitmap and image/x-xpixmap.)

Do others agree? Should this be entered as a formal SVN issue?

  - Mark Irving.
-----Original Message ends-----

There was a discussion about Subversion's handling of XML files on this
list a few days ago (archived at
http://svn.haxx.se/users/archive-2008-02/0014.shtml) - the consensus
then seemed to be that this behaviour was by design, ie. that XML files
may very well contain binary content
(http://svn.haxx.se/users/archive-2008-02/0017.shtml). The workaround
was to delete the svn:mime-type property, or change it to "text/..."
(http://svn.haxx.se/users/archive-2008-02/0034.shtml).

FWIW I'm not too keen on changing mime-types - "application/xml-dtd" is
a correct mime-type for DTD files. Perhaps there should be an
additional property that specifies text vs. binary, instead of using
mime-type (or eol-style) to guess?

Hope this helps
John

--
John Niven 
Senior Developer
Bravura Solutions Limited
Level 1, Jonmer House, 95 Hurstmere Road 
Takapuna, Auckland
www.bravurasolutions.com 
This mail message (and attachments) may contain information that is
confidential to Bravura Solutions. If you are not the intended recipient
you cannot use, distribute or copy the message or attachments. In such
case, please notify the sender by return email immediately and erase all
copies of the message and attachments. Regardless of content, this
e-mail shall not operate to bind Bravura Solutions to any order or other
contract unless pursuant to explicit written agreement expressly
permitting the use of e-mail for such purpose. 	
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-02-04 21:40:58 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.