Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] filtering

From: "Daniel Heskia" <daniel@--------->
To:
Date: 11/1/2004 12:02:00 PM
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>


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent