Solved: Weird namespace output
This is an open discussion with 4 replies, filed under XSLT.
Search
Try to add the prefixes like so:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:media="http://search.yahoo.com/mrss/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:exslt="http://exslt.org/common" extension-element-prefixes="media dc exslt">
Are you sure about the exslt
namespace? Shouldn't that be exsl
?
Are you sure about the
exslt
namespace? Shouldn't that beexsl
?
Good point. ;o)
I did not realise that the extension-element-prefixes="media dc exslt"
did that. Will note that down...
...However, it isn't making a bit of difference.
Scratch that, caching issues.
Works a treat Michael, thanks for that!
Are you sure about the
exslt
namespace? Shouldn't that beexsl
?
The shorthandle can be anything you like. xmlns:burp="http://exslt.org/common"
is valid too.
Also, try exclude-element-prefixes="media dc exslt"
.
Create an account or sign in to comment.
I have had to add namespaces to my xsl stylesheet to work with RSS feeds, no biggie.
The stylesheet has multiple templates for different actions, only one of which utilises the requirement of the namespaces, yet the output of every template includes these namespaces in a specific div element. I have no idea where this is coming from, and why it is only targeted at a specific div.
Anyone come across this before? I would post xsl, but sadly I'm not allowed.