I have an XML file (for a podcast) for which I'm creating an XSLT to work alongside it for display within a browser.
I have a few things I'd I'm trying t achieve using an XSL IF statment, which seems to be working perfectly except when the XML element/object name contains a colon (":")
One example is itunes:explicit (as well as an internal ID, such as myCustom:IDabc123</myCustom:ID>
I'm looking to achieve to things
- If /itunes:explicit=yes, display text in the channel description area
- if myCustom:ID is set/has a value, display the value when shown in a browser
My XSL looks something like this:
itunes:explicit
<xsl:if test="itunes:explicit=yes"><img src"..."/></xsl:if>myCustom:ID
<xsl:if test="myCustom:ID"><div>ID: <xsl:value-of select="myCustom:ID"/></xsl:if>
In example 2, I suspect ":" (sorry, I can't think how to clearly refer to this type of object) is the problem because if I change my XML object to simply be called and amend the XSL accordingly it works.
I'd really appreciate your help, I'm still trying to work my way through the world of XSL.
Thanks in advance.