XPath query bug

38 views
Skip to first unread message

ggte...@gmail.com

unread,
Jan 8, 2015, 6:09:06 PM1/8/15
to scrip...@googlegroups.com
Hi!

I have the simple xpath query, the one that in Scriptella 1.0 worked, but in Scriptella 1.1 not anymore.
This is a mistake or a feature? And what is the solution in the new version?

simple_xml.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<table>
   
<row>
       
<column name="column_name_0"><![CDATA[column_value_0]]></column>
       
<column name="column_name_1"><![CDATA[column_value_1]]></column>
       
<column name="column_name_2"><![CDATA[column_value_2]]></column>
       
<column name="column_name_3"><![CDATA[column_value_3]]></column>
       
<column name="column_name_4"><![CDATA[column_value_4]]></column>
   
</row>
</table>

etl.xml
<!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd">
<etl>
   
<connection id="in" driver="xpath" url="simple_xml.xml"/>
   
<connection id="out" driver="text" url="output.txt">
        eol=\r\n
   
</connection>

   
<query connection-id="in">
        /table/row
       
<script connection-id="out">
            column
[0]: ${column[0]}
            column
[1]: ${column[1]}
            column
[2]: ${column[2]}
            column
[3]: ${column[3]}
            column
[4]: ${column[4]}
       
</script>
   
</query>
</etl>

scriptella 1.0 output
column[0]: column_value_0
column
[1]: column_value_1
column
[2]: column_value_2
column
[3]: column_value_3
column
[4]: column_value_4

scriptella 1.1 output
column[0]: ${column[0]}
column
[1]: ${column[1]}
column
[2]: ${column[2]}
column
[3]: ${column[3]}
column
[4]: ${column[4]}

Thanks for help.

Reply all
Reply to author
Forward
0 new messages