RE: xsl and xml CDATA or Not question
Thanks for your reply. I searched the faq but didn't find what I was looking for, but I could have not searched correctly. I used the <xsl:template match="Content"> <xsl:copy-of select="node()"/> </xsl:template> And got this xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" inserted into a lot of the code. Is there a way to get rid of that. Plus, my other question is now. This is my XML in content <Content> <br/> <br/> <center> <div id="TextOnlyLink"> <a href="/blah/en-us/text/home">[Text Only]</a> </div> <div id="centerImg"> <img src="/pub/en-us/images/soon.jpg" alt="the alt tag." width="712" height="223"/> </div> <p>blah blah blah <a href="Mailto://Sales@xxxxxxxxxxxxxxxxx">Sales@xxxxxxxxxxxxxxxxx</a> </p> </center> </Content> And this is my xsl so far for content <xsl:template match="Content" xml:space="preserve"> <xsl:copy-of select="node()"/> </xsl:template> What do I need to do to make changes to certain tags like the img tag in the Content html? For example I want to take the img tag and do this to it. [img: the alt tag.] I know its something like this but im missing something cause this doesn't work. <xsl:template match="img"> <xsl:for-each select="@*"> <xsl:if test="((name()='alt') or (name()='ALT') or (name()='Alt')) and (normalize-space(.)!='')"> [image: <xsl:value-of select="." />] </xsl:if> </xsl:for-each> <xsl:apply-templates /> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format