[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] filtering
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>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|