RE: [xsl] xsl and xml CDATA or Not question

Subject: RE: [xsl] xsl and xml CDATA or Not question
From: "John Hamman" <John@xxxxxxxxxxxxxxxxx>
Date: Fri, 12 Mar 2004 11:38:56 -0500
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


Current Thread