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

RE: general problem followup

Subject: RE: general problem followup
From: "Andrew Welch" <andrew@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Jan 2002 15:49:10 -0000
problem followup

Of course, I could always call another stylesheet - one that displays all
the elements - and pass to that the name/location of the node whose leaves I
want it to display... but the problem still arises of how do I found out
which XML file the stylesheet is currently being applied to?

Or is it possible to have a temporary node-set in javascript (taken from the
current xml), and apply the new stylesheet to that (so that it doesnt need
to know the name of the current xml file)?

So I guess Im asking, can you have a stylesheet that gets applied to some
xml, that has a funtion (or whatever) that will apply another stylesheet to
a section of the xml, without the stylesheet ever knowing the filename of
the xml...(!) ?

Once again, apologies to all that dont get my poor explanation, and the fact
that its a little heavy for a friday afternoon


andrew

===





-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Andrew Welch
Sent: Friday, January 18, 2002 2:36 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  general problem



Hi all,

Imagine I have a set of nodes like this:

<root>
<a>
  <b>
  <c>
  <d>
  <e>
</a>
<a>
  <b>
  <c>
  <d>
  <e>
</a>
</root>

I apply a stylesheet to the xml to output a table that displays certain
elements of each <a> such as:

<tr>
  <td>b , c, d</td>
</tr>

Say I want to include a button next to that row that, when clicked, opens a
window displaying -all- the elements for that <a>.

I can do this by calling a javascript function, passing the position of the
<a> node as a parameter, and using the DOM to extract the information I
want.  However, this currently relies on me hard-coding the name of the xml
file (xmlObj.load('xmlfile')) into the function, which then makes the
stylesheet useless for all but one xmlfile.

If you understand what Im asking ;) is there a better way of doing this?

Thanks to anyone on my wavelength, apolgies to everyone else

cheers

andrew

===


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



 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.