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

filtering

Subject: filtering
From: "Daniel Heskia" <daniel@xxxxxxxxx>
Date: Mon, 1 Nov 2004 13:01:40 +0100
heskia
Hi.
I am trying to filter out data sets that do not have any data in the column
numbers specified in "header" of the xml.

The header specifies that columns 1, 2, 3 and 7 are crucial in this
particular instance and must not be empty. The values differ from time to
time (I cannot hardcode the numbers in the xsl), but the element names in
"header" (AAA, BBB etc.) are static for this type of data).

I need to test if the column numbers specified in the header are non-empty
for each each row. I have tried to assign the values of the header data to
variables and do something like: for each row, if test not(column[$_aaa]='')
create the element. This, however, I cannot get to work.

Does anyone have a good idea?

xml-input:

<root>
  <header>
    <AAA>1</AAA>
    <BBB>2</BBB>
    <CCC>7</CCC>
    <DDD>3</DDD>
 </header>
  <row>
    <column>Dude Looks like a Lady</column>
    <column>Local</column>
    <column>28-10-2004</column>
    <column>51,23</column>
    <column />
    <column>80563</column>
    <column>IE000000004</column>
  </row>
  <row>
    <column>Never Ending Story</column>
    <column>Test</column>
    <column>21-02-2003</column>
    <column>51,23</column>
    <column />
    <column>80563</column>
    <column />
  </row>
</root>

xml-output:
Note 1 element filtered out because column 7 was empty

<root>
  <flow>
    <total_in>2</total_in>
    <total_out>1</total_out>
  </flow>
  <success>
    <AAA>Dude Looks Like a Lady</AAA>
    <BBB>Local</BBB>
    <CCC>IE000000004</CCC>
    <DDD>28-10-2004</DDD>
  </success>
</root>

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.