Subject: XSL: applying template in different context
From: Peter-Paul Koch <ppk@xxxxxxxxxx>
Date: Mon, 13 Sep 1999 12:00:50 +0200
|
Hello,
I'm currently writing my very first XML/XSL page for displaying a file in
which
information is gathered about several tasks in a process of designing
mechanical components.
Provisional version: http://www.netlinq.nl/interest/xml/interest.xml
I have invented an element <task> which contains various data
fields about the task. I have also a <role> element which contains data
about the roles in this process (project manager, chief engineer etc., the
data is their names, email etc.).
I have written a separate <xsl:template> to display this role information.
I'm now writing the <xsl:template> for displaying the tasks. Each <task>
has a <supervisor> and a <performer>, which are roles. My problem is that I
want to include the complete output of the stylesheet for the correct roles
in the stylesheet for the task and I can't find out how to do it.
In the style sheet I'm messing about with <task> and its children, so my
currentNode is always a <task> or a lower data element.
I've now written a script that can read out a single element from a <role>
(the name), but what I really want to do is take the correct <role> as
currentNode, apply the template, then revert to the <task> for the
remainder of
the task template.
Is this at all possible? If so, how?
Also: I can't seem to access the HTML document properly through
document.all['div-name'].style
Am I required to use the new DOM? Simple HTML pages in IE5 can use the old
IE4 DOM.
Thanks for any information, and please remember I'm only a beginner so
don't use too many complex terms. <grin>
ppk
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|