Repeated namespaces in media RSS
We wanted to add media thumbnails to our RSS feed. Once we added
xmlns:media="http://search.yahoo.com/mrss/"
, that
namespace appears as an attribute for every item
in
the feed. The hh and xalan namespaces don't do that. See attached
files.
- rss-media.rss 3.86 KB
- rss-media.xslt 3.75 KB
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Tim on 15 Jan, 2016 03:47 PM
Hi Michael,
When you have a moment, try modifying the first line of your XSLT Format by changing the
extension-element-prefixes="date-converter"
attribute/value to:Let me know if that does the trick.
Thanks
2 Posted by Michael McGinni... on 15 Jan, 2016 04:16 PM
But I don't have an `extension-element-prefixes="date-converter"`
attribute/value
in my XSLT format....
Support Staff 3 Posted by Tim on 15 Jan, 2016 04:28 PM
Bah, sorry - I had switched to another Format in my instance and copied the wrong info. Try adding this attribute to your
<xsl:stylesheet>
element:4 Posted by Michael McGinni... on 15 Jan, 2016 06:10 PM
No, that doesn't work. It removes the duplicate namespaces, but also
removes the `media:thumbnail` node from the RSS feed.
Support Staff 5 Posted by Tim on 15 Jan, 2016 07:16 PM
Can you attach your XML output prior to styling it? That will allow for me to play around with it to see if I can get something to work.
Also, can you verify that this isn't actually causing any problems but that you're just looking for a way to remove those extra attributes?
6 Posted by Michael McGinni... on 15 Jan, 2016 07:44 PM
I knew I forgot something. See attached.
No, this shouldn't actually cause any problems, but we've been surprised before. One of the systems which consume the feed is powered by https://www.apereo.org/projects/uportal
Support Staff 7 Posted by Tim on 15 Jan, 2016 09:49 PM
Thanks for attaching that. Try adding this attribute to your
I think those are the results you're looking for, but I'll wait to hear back.<xsl:stylesheet>
element:8 Posted by Michael McGinni... on 15 Jan, 2016 10:17 PM
That's much better. The namespace is still repeated for each thumbnail, but the feed is certainly valid according to the W3C.
Support Staff 9 Posted by Tim on 18 Jan, 2016 02:40 PM
Good deal. I've tried a few things to see if I can remove that namespace for the
<media:thumbnail>
element but haven't gotten anything to work yet. If I think of anything over the next few days I'll let you know, but otherwise it sounds like you're in good shape here with the additionalexclude-result-prefixes
attribute.Have a good one!
Tim closed this discussion on 18 Jan, 2016 02:40 PM.