WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 7 years ago

#1380 closed enhancement (wontfix)

Add Optional XSL styling to feeds output

Reported by: jrconlin Owned by:
Milestone: Priority: lowest
Severity: trivial Version: 1.5.1
Component: Template Keywords: bg|has-patch
Focuses: Cc:

Description

It would be very helpful to allow folks to optionally specify an XSL style sheet for the various output feeds.

Currently, I accomplish this by adding the following code:
wp-rss2.php
Line: 15
<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>';
if (RSS_XSL_STYLE_SHEET) -- jrc
echo '<?xml-stylesheet href="'.RSS_XSL_STYLE_SHEET.'" type="text/xsl" media="screen"?>'."\n";
?>

(obviously replicated where appropriate in the other feed files as well).

In my wp-config.php file I specify the define as:

define('RSS_XSL_STYLE_SHEET','http://blog.unitedheroes.net/isb.xsl');
Again, obviously, the usual portability wrappers could be used instead of the hardcoded path.

Attachments (1)

xsl-patch.txt (608 bytes) - added by elidourado 8 years ago.
check theme dir for rss2.xsl file, use if there

Download all attachments as: .zip

Change History (8)

comment:1 jrconlin9 years ago

  • Patch set to No

comment:2 skippy9 years ago

  • Keywords bg|needs-patch added
  • Owner changed from anonymous to skippy
  • Priority changed from normal to lowest
  • Status changed from new to assigned

There was a discussion on the hackers list re: XSLT. I think the final opinion was "No thanks."

comment:3 davidhouse8 years ago

  • Owner skippy deleted
  • Status changed from assigned to new

I don't think that's now the current opinion of the hackers mailing list, especially taking into account the positive emails that have been flying around the latest thread.

Unassigning as I guess skippy doesn't want this any more.

elidourado8 years ago

check theme dir for rss2.xsl file, use if there

comment:4 elidourado8 years ago

  • Keywords bg|has-patch added; bg|needs-patch removed

comment:5 ketsugi8 years ago

  • Type changed from defect to enhancement

comment:6 error8 years ago

For the moment, at least, I'd rather see this done in a plugin, and any patches that WP might need should enable the plugin to add the necessary details into the XML declaration, rather than simply adding things to the XML declaration. For instance, an add_action('rss_xml_declaration'); hook.

comment:7 foolswisdom7 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Closing as WONTFIX for now. No traction in two years.

Note: See TracTickets for help on using tickets.