[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Problem on XML+XSL
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|