[xsl] [XSLT] - Recognize an XML node

Subject: [xsl] [XSLT] - Recognize an XML node
From: "Nicola Martella" <nmartella@xxxxxxxxxxxxx>
Date: Thu, 15 Feb 2001 12:04:37 +0100
Hi.
I've a transformation little (?) problem.
A fragment of my XML is following:

<Routines>
   <Constants>
      <Constant Name="HKEY_CLASSES_ROOT" Scope="Private" RetType="" />
      <Constant Name="HKEY_CURRENT_USER" Scope="Private" RetType="" />
   </Constants>
      <Functions>
         <Function Name="bWriteRegValue" Scope="Private" RetType="Boolean"
/>
      </Functions>
</Routines>


At this sheet I apply a filter  extracting only rows conteining  "Scope"
attribute.
Result of this work is an HTML table with three rows (two for Constant and
one for Function) and  until here it's all ok.

Now, I need a title row each time element changes as, p.e., from Constant to
Function and name column title  must have "Constant" if its follow elements
are <Constant>, "Function" if its follow elements are <Function> (I cannot
use <Constants> and <Functions> because filter doesn't capture these
elements).

Constant          Scope
HKEY_CLASSES_ROOT   Private
HKEY_CURRENT_USER   Private
Function          Scope    RetType
bWriteRegValue      Private    Boolean

PS: I use "www.w3.org/TR/WD-xsl" namespace and MSXML 3.0.

Thanks & bye
Nicola



============== :-) ===============
Nicola Martella
SAP Italia Consulting S.r.l. - Milano
email1: nicola_martella@xxxxxxxxxxxxxxxxx (aziendale)
email2: nmartella@xxxxxxxxxxxxx (preferita per posta privata)
email3: nmartella@xxxxxxxxx (privata)
email4: nmartella@xxxxxxxxxxxxx (privata)
email5: nmartella@xxxxxx (privata)
Fax: 1782273706


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


Current Thread