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

Re: Number of scans required ??

Subject: Re: Number of scans required ??
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 14 Aug 2003 15:34:20 +0100
ns client 5.5
> As of now i have shown that there is only one table 

the test file you showed appeared to have two tables,
The output below doesn't quite match what you said you want but I
couldn't see how your requested output related to your input.

input xml

<Root>
<Tables>
<TABLE NAME="Client_Agent">
  <ROW>
    <COLUMN NAME="Agent Name">eXpress NS Client</COLUMN>
    <COLUMN NAME="Product Version">5.5.0.517</COLUMN>
    <COLUMN NAME="Build Number">517</COLUMN>
  </ROW>

  <ROW>
     <COLUMN NAME="Agent Name">eXpress Inventory Solution</COLUMN>
     <COLUMN NAME="Product Version">5.5.0.424</COLUMN>
     <COLUMN NAME="Build Number">424</COLUMN>
  </ROW>
</TABLE>



<TABLE NAME="Client_Agent">
  <ROW>
    <COLUMN NAME="Agent Name">eXpress NS Client</COLUMN>
    <COLUMN NAME="Install Path">C:\Program Files\ABC\eXpress\NS 
Client\Software Delivery\Software 
Packages\{01B54EB5-3679-4C73-9E10-E169D5EA8C59}</COLUMN>
    <COLUMN NAME="Product Version">5.5.0.519</COLUMN>
    <COLUMN NAME="Build Number">519</COLUMN>

  </ROW>

  <ROW>
     <COLUMN NAME="Agent Name">eXpress Inventory Solution</COLUMN>
     <COLUMN NAME="Install Path">C:\Program Files\ABC\eXpress\NS      
Client\Software Delivery\Software 
Packages\{01B54EB5-4579-4C73-9E10-E169D5DA9E59}</COLUMN>
     <COLUMN NAME="Product Version">5.5.0.428</COLUMN>
     <COLUMN NAME="Build Number">428</COLUMN>
  </ROW>
</TABLE>
</Tables>
</Root>


xsl

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="text"/>


<xsl:template match="TABLE">
<xsl:for-each select="ROW[1]/COLUMN/@NAME">
  <xsl:value-of select="."/>
  <xsl:if test="position()!=last()">,</xsl:if>
</xsl:for-each>
<xsl:text>&#10;</xsl:text>
<xsl:for-each select="ROW">
  <xsl:for-each select="COLUMN">
    <xsl:value-of select="normalize-space(.)"/>
    <xsl:if test="position()!=last()">,</xsl:if>
  </xsl:for-each>
  <xsl:text>&#10;</xsl:text>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>


result


Agent Name,Product Version,Build Number
eXpress NS Client,5.5.0.517,517
eXpress Inventory Solution,5.5.0.424,424




Agent Name,Install Path,Product Version,Build Number
eXpress NS Client,C:\Program Files\ABC\eXpress\NS Client\Software Delivery\Software Packages\{01B54EB5-3679-4C73-9E10-E169D5EA8C59},5.5.0.519,519
eXpress Inventory Solution,C:\Program Files\ABC\eXpress\NS Client\Software Delivery\Software Packages\{01B54EB5-4579-4C73-9E10-E169D5DA9E59},5.5.0.428,428




________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 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.