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

Re: to find all childrens for a parent

Subject: Re: to find all childrens for a parent
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 03 Sep 2003 18:38:47 -0400
javascript element parent
Laxman,

Assume your user selects a value you call 'server', which you pass into your XSL transformation as a run-time parameter matching the value of your attribute "server_id".

Given the input you have provided, and assuming DATA is your document element, the printers associated with the particular server will be returned by the XPath expression:

/DATA/Server[@server_id=$server]/Printer

Select these nodes in an apply-templates instruction and match them with a template to generate, for each of them, the HTML you need (<select> elements or whatever).

If you need us to be more specific, give us some sample output you would like to see. (I dare say, however, once you do that you'll discover your real problem: designing the HTML. This looks like a Javascript/VB question, not strictly an XSLT one.)

Cheers,
Wendell

At 05:23 PM 9/3/2003, you wrote:
Hi,
 I am fairly new to XML and XSL. I have a question for
the forum. I would greatly
appreciate if someone can help me out.

Below is the xml file.

<DATA>
  <Server server_id="s1" server_desc="abc">
   <Printer printer_id="p1" printer_desc="P1">
   <Printer printer_id="p2" printer_desc="P2">
   <Printer printer_id="p3" printer_desc="P3">
  </Server>
  <Server server_id="s2" server_desc="efg">
   <Printer printer_id="p4" printer_desc="P4">
   <Printer printer_id="p5" printer_desc="P5">
   <Printer printer_id="p6" printer_desc="P6">
  </Server>
</DATA>

I am tryring to build HTML <select> tag to show only
printers associated with that server when the user
select the server from the drop down box.
Can you please help me in providing the XSL.

Thanks in advance for your help.
Laxman Sanyasi


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.