Quote:
Originally Posted by Martin Honnen
I think the main issue is to use a positional predicate [1] e.g.
|
Thanks for your reply but that won't work either. The above example could actually be
Code:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='test.xsl'?>
<chars>
<char type="letter">A</char>
<char type="letter">B</char>
<char type="letter">C</char>
<char type="letter">D</char>
<char type="digit">1</char>
<char type="digit">2</char>
<char type="digit">3</char>
<char type="">4</char>
<char type="">5</char>
</chars>
desired output: CHARACTERS:
letter A B C D
digit 1 2 3 (digit) 4 (digit) 5
result: CHARACTERS:
letter A B C D
digit 1 2 3 (digit) 4
() 5
or
Code:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='test.xsl'?>
<chars>
<char type="letter">A</char>
<char type="letter">B</char>
<char type="letter">C</char>
<char type="letter">D</char>
<char type="digit">1</char>
<char type="">2</char>
<char type="">3</char>
<char type="digit">4</char>
<char type="digit">5</char>
</chars>
desired output: CHARACTERS:
letter A B C D
digit 1 (digit) 2 (digit) 3 4 5
result: CHARACTERS:
letter A B C D
digit 1 (digit) 2
() 3 4 5
predicate [1] works only for the first case and it's not flexible...