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

RE: XML/XML Transformation - Please Help !!!.....

  • From: Thushara Perera <thusharap@e...>
  • To: Wei-Chin Hsieh <whsieh@c...>,"XML-DEV (E-mail)" <xml-dev@l...>
  • Date: Mon, 30 Apr 2001 14:54:29 +0600

xml to xml transformation
Hi

Thanks for the info. BUT you have mis-understood my problem. I don't need to
just get the href.
Please see below:

Part of my XML file is:
..
..
..
 <URLADR>http:\\www.aaa.com</URLADR>
 <URLDESC>Homepage of aaa AS</URLDESC>
 <URLDESCLANGUAGE>en</URLDESCLANGUAGE>
 <URLDESC>Homepage of aaa AS NO</URLDESC>
 <URLDESCLANGUAGE>no</URLDESCLANGUAGE>
 <URLDESC>Homepage of aaa AS SE</URLDESC>
 <URLDESCLANGUAGE>se</URLDESCLANGUAGE>

 <URLADR>http:\\www.aaabbb.org</URLADR>
 <URLDESC>Demo of aaabbb.com</URLDESC>
 <URLDESCLANGUAGE>en</URLDESCLANGUAGE>
 <URLDESC>Demo of aaabbb.com NO</URLDESC>
 <URLDESCLANGUAGE>no</URLDESCLANGUAGE>
..
..
..

and I want to convert this to something like:
..
..
  <URLLIST>
    <URL>
      <URLADR>http://www.aaa.com</URLADR>
      <URLDESC xml:lang="en">Homepage of aaa AS></URLDESC>
      <URLDESC xml:lang="no">Homepage of aaa AS NO></URLDESC>
      <URLDESC xml:lang="se">Homepage of aaa AS SE></URLDESC>
    </URL>
    <URL>
      <URLADR>http://www.aaabbb.org</URLADR>
      <URLDESC xml:lang="en">Demo of aaabbb.com></URLDESC>
      <URLDESC xml:lang="no">Demo of aaabbb.com NO></URLDESC>
    </URL>
  </URLLIST>
..
..


-----Original Message-----
From: Wei-Chin Hsieh [mailto:whsieh@c...]
Sent: Monday, April 30, 2001 3:01 PM
To: Thushara Perera; XML-DEV (E-mail)
Subject: Re: XML/XML Transformation - Please Help !!!.....


Try this

<a><xsl:attribute name="href">
<xsl:value-of select="URLADR"/></xsl:attribute>
<xsl:value-of select="URLADR"/></a>

Wei-Chin Hsieh

----- Original Message -----
From: Thushara Perera
To: XML-DEV (E-mail)
Sent: Monday, April 30, 2001 2:58 AM
Subject: XML/XML Transformation - Please Help !!!.....


Hi

Could someone PLEASE tell me how to do the XML to XML transformation as
described below ?

Part of my XML file is:
..
..
..
 <URLADR>http:\\www.aaa.com</URLADR>
 <URLDESC>Homepage of aaa AS</URLDESC>
 <URLDESCLANGUAGE>en</URLDESCLANGUAGE>
 <URLDESC>Homepage of aaa AS NO</URLDESC>
 <URLDESCLANGUAGE>no</URLDESCLANGUAGE>
 <URLDESC>Homepage of aaa AS SE</URLDESC>
 <URLDESCLANGUAGE>se</URLDESCLANGUAGE>

 <URLADR>http:\\www.aaabbb.org</URLADR>
 <URLDESC>Demo of aaabbb.com</URLDESC>
 <URLDESCLANGUAGE>en</URLDESCLANGUAGE>
 <URLDESC>Demo of aaabbb.com NO</URLDESC>
 <URLDESCLANGUAGE>no</URLDESCLANGUAGE>
..
..
..

and I want to convert this to something like:
..
..
  <URLLIST>
    <URL>
      <URLADR>http://www.aaa.com</URLADR>
      <URLDESC xml:lang="en">Homepage of aaa AS></URLDESC>
      <URLDESC xml:lang="no">Homepage of aaa AS NO></URLDESC>
      <URLDESC xml:lang="se">Homepage of aaa AS SE></URLDESC>
    </URL>
    <URL>
      <URLADR>http://www.aaabbb.org</URLADR>
      <URLDESC xml:lang="en">Demo of aaabbb.com></URLDESC>
      <URLDESC xml:lang="no">Demo of aaabbb.com NO></URLDESC>
    </URL>
  </URLLIST>
..
..

Please tell me how to write the XSL file for this.

Thanks a lot

Thushara

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.