Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#5392 closed defect (fixed)

Xsl, Xslt syntax highlighting

Reported by: damien Owned by: Emmanuel Blot
Priority: normal Milestone: 0.11
Component: version control/browser Version: devel
Severity: normal Keywords: xsl xslt
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

source:trunk/trac/mimeview/api.py@5388#L99

This line should be changed from

'text/xml':               ['xml'],

to

'text/xml':               ['xml','xsl','xslt'],

and line 100 should be removed since pygments handles xsl as 'text/xml'. This will fix xsl syntax highlighting, (I have tested it).

Attachments (0)

Change History (3)

in reply to:  description comment:1 by Emmanuel Blot, 17 years ago

Replying to damien:

and line 100 should be removed since pygments handles xsl as 'text/xml'. This will fix xsl syntax highlighting, (I have tested it).

I was a bit reluctant at first to drop text/xsl MIME type in favor of text/xml for XSL file. However, it appears that text/xsl has never been officially registered as a MIME type, it is mostly an IE thing.

However, there is another alternative for XSL files: application/xsl+xml. This MIME type works also with Pygments, and carries more information as text/xml does.

OTOH, api.py should not be defined for Pygments, as Pygments is only one choice in the mime converter galaxy.

See also RFC 3023, Appendix A: about the motivation for using +xml suffix.

As a side note, the following MIME types are recognized by Pygments as supported XML types:

  • text/xml
  • application/xml
  • image/svg+xml
  • application/rss+xml
  • application/atom+xml
  • application/xsl+xml
  • application/xslt+xml

comment:2 by Emmanuel Blot, 17 years ago

Owner: changed from Christian Boos to Emmanuel Blot
Status: newassigned

comment:3 by Emmanuel Blot, 17 years ago

Milestone: 0.11.10.11
Resolution: fixed
Status: assignedclosed

Implemented in [5901]

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Emmanuel Blot.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Emmanuel Blot to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.