[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xsl and xml CDATA or Not question

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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.