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

Re: HOW XSLT WILL BE, WHEN XML2XML TRANSFORMATION

Subject: Re: HOW XSLT WILL BE, WHEN XML2XML TRANSFORMATION
From: Marian Olteanu <mou_softwin@xxxxxxxxx>
Date: Sat, 4 Dec 2004 02:34:37 -0800 (PST)
xml2xml
--- Arul Kumar <arulxml@xxxxxxxxxxxx> wrote:

> Hallow everybody,
> 
> I am processing XML to XML transformation by using xslt, in the meantime 
> I would like to clarify with you regarding the below one:
> 
> Input XML:
> <para>
> Text before equation
>     <equation>Equation text</equation>
>         Text before/after equation
>     <equation>Equation text</equation>
> Text after equation
> </para>
> 
> 
> Output XML:
> <p>Text before equation</p>
> <eqn>Equation text</eqn>
> <p>Text before/after equation</p>
> <eqn>Equation text</eqn>
> <p>Text after equation</p>
> 
> Please advise, how can I able to get above Output XML by using xslt, and 
> how the XSLT will be?
> 
> Best regards
> Arul Kumar

I would say:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="para/text()">
	<p>
		<xsl:value-of select="."/>
	</p>
</xsl:template>

<xsl:template match="para/equation">
	<eqn>
		<xsl:apply-templates/>
	</eqn>
</xsl:template>
</xsl:stylesheet>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


-----------------------------------
Marian
http://www.utdallas.edu/~mgo031000/



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

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.