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

XML transformation using XSL - Urgent, Please HELP!! Thanks

  • From: Thushara Perera <thusharap@e...>
  • To: "XML-DEV (E-mail)" <xml-dev@l...>,"XSL News Group (E-mail)" <XSL-List@l...>
  • Date: Sat, 28 Apr 2001 09:00:06 +0600

xml transformation with xsl
Hi
 
I have an XML file like this:
 
<PRODUCTS>
<PRODUCT xml:lang="en">
    <PRODUCTID>1234</PRODUCTID>
    <MANUFACTURERCOMPANYID>1m1</MANUFACTURERCOMPANYID>
    <MANUFACTURERCOMPANYNAME>Manufactorer name</MANUFACTURERCOMPANYNAME>
    <PRODUCTQUALIFIER>MK</PRODUCTQUALIFIER>  <!-- Must be in the ASCII File -->
    <MANUFACTURERCOMPANYNAME2>Manufactorer name2</MANUFACTURERCOMPANYNAME2>
....
...
..
..
</PRODUCT>
</PRODUCTS>
 
 
In my output XML file, I need to get something like this:
 
<PRODUCTID QUALIFIER="MK">1234</PRODUCTID>
 
and I have an XSL file which transforms the XML file into another XML file and a part of the XSL is like below:
 
...
...
  <xsl:for-each select="PRODUCTID">
      <xsl:element name="PRODUCTID">
          <xsl:attribute name="PRODUCTQUALIFIER">
              <xsl:value-of select="PRODUCTQUALIFIER"/>
          </xsl:attribute>
          <xsl:value-of select="."/>
     </xsl:element>
  </xsl:for-each>
...
...
...
 
BUT this doesn't work. It gives a blank value ("") to my QUALIFIER. Could someone please tell me how to get it done ?
 
Thanks a lot and I really appreciate your help.
 
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.