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

Problem on XML+XSL

  • From: taherkordy@d...
  • To: xml-dev@l...
  • Date: Fri, 04 Jun 1999 10:42:56 +0330

xsl parameter xml
     Hi,
     I have some problems in writing XSL stylesheets.
     Suppose we have the following XML file(book.xml) that is
     extracted from the Book Table:
     
        <?xml version="1.0"?>
        <book>
                <title> Computer Networks </title>
                <category_id> 2 </category_id>
                ...
        </book>
     I also have a Parameters table and have extracted values
     for "category" parameter as follows(parameter.xml):
     
        <?xml version="1.0"?>
        <parameter>
                <category> 
                        <category_item id="1">Art</category_item>
                        <category_item id="2">Computer</category_item>
                        <category_item id="3">Physics</category_item>
                        ..
                </category>
        </parameter>
     
     I want to have the following Html file as the result of
     merging two XML files and an XSL file(what that I want to help me):
     
     <html>
     <body>
     Title :          
        <INPUT TYPE='text' NAME='txtTitle' VALUE="Computer Networks" >
     Category: 
        <SELECT NAME="category" SIZE=1> 
                <OPTION value='1'>Art
                <OPTION value='2' SELECTED>Computer
                <OPTION value='3'>Physics
        </SELECT>
     </body>
     </html>
     
     I have two quietions :
        
     1. I think that when reading from Book and Parameter
        table, I should make an XML file that have information about
        books and categrory parameters togother.
        Such as following XML:
     
        <?xml version="1.0"?>
        <book>
                <title> Computer Networks </title>
                <category> 
                        <category_item >
                                <description>Art</description>
                                <id>1</id>
                                <selected>false</selected>
                        </category item>
                        <category_item >
                                <description>Computer</description>
                                <id>2</id>
                                <selected>true</selected>
                        </category item>
                        <category_item >
                                <description>Physics</description>
                                <id>3</id>
                                <selected>false</selected>
                        </category item>
                </category>
                ...
        </book>
     
       I want to know that Is it right this idea ?
     
     
     2. I want to  write an XSL stylesheet for producing this HTML file
        that automatically selects "computer" option in category Combobox
        based on value of "category_id" in book.xml and "id"
        attribute in parameter.xml  
        Could you please help me for writing this XSL , 
        I'm new to XSL ? (I use LotusXSL parser) 
     
     
     Best Regards,
     Taherkordy@d...
     
     


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.