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

RE: XSL Question

  • From: craig.patterson@p...
  • To: r_kommineni@y..., xml-dev@l...
  • Date: Fri, 23 Mar 2001 08:52:49 +0800

craig patterson
> am trying to write an xsl trasnformation that outputs
> the nodes based on what is present inside input node. 
> so here the output should be device and interface. 

Is possible as follows:

<?xml version='1.0'?>
<xsl:stylesheet 
		version="1.0" 
		xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:variable name="target"><xsl:value-of
select="/Condition/input"/></xsl:variable>
		
<xsl:template match="/">
	<xsl:apply-templates select="*"/>
</xsl:template>
		
<xsl:template match="*">
	<xsl:if test="name()=$target">
		<xsl:value-of select="."/>
		<xsl:value-of select="'&#x0a;'"/>
	</xsl:if>
	<xsl:apply-templates select="*"/>
</xsl:template>
</xsl:stylesheet>

Regards,
Craig Patterson
mailto:craig.patterson@p...



************************************************************************************************
This email message and any attached files may contain information that is 
confidential and subject of legal privilege intended only for use by the individual 
or entity to whom they are addressed. If you are not the intended recipient or the 
person responsible for delivering the message to the intended recipient be 
advised that you have received this message in error and that any use, copying, 
circulation, forwarding, printing or publication of this message or attached files is 
strictly forbidden, as is the disclosure of the information contained therein.
If you have received this message in error, please notify the sender immediately 
and delete it from your Inbox.
************************************************************************************************

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.