RE: [xsl] general problem followup

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

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: [xsl] 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