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

RE: Xalan to transform only selected elements of XML

Subject: RE: Xalan to transform only selected elements of XML
From: Heather Lindsay <heather.lindsay@xxxxxxxxxxxxx>
Date: Tue, 30 May 2000 16:09:20 -0400
xsl transform selected elements
<xsl:apply-templates/> will call all templates of the children of the
current node.  If no template is given for a particular node then the
default template is called which prints out the value of the given element
(if applicable).  

Say you have the following XML document:
<child1> text1 </child1>
<child2> text2 </child2>
<child3> text3 </child3>

And the following XSL:
<xsl:template match="/">     
	      <xsl:apply-template select="child1">

<xsl:template match="child1">
	<p><xsl:value-of select="."/></p>  

Then you get the following html output:
	<p> text1 </p>

If you only want some elements to get transformed then you only get those
elements that you want transformed.  There is no need to remove elements
from an XML file in order to only output some of the elements.

Hope this helps,
Do You Yahoo!?
Kick off your party with Yahoo! Invites.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.