Just getting to grips with a large scale Abbot testing project and was thinking that using entity includes for pulling in chunks of XML into a script would be useful.
The only way I could get this to work was to hack Script.java and change the method at line 331 to:
public void load(Reader reader, String fileName)
And then pass this file name as the system id to:
Document doc = builder.build(reader, fileName);
I also disabled schema validation as external dtd entity includes and external schema validation don't play nicely.
Perhaps this could become a system property? Whether you want schema validation enabled or not, then entity includes would just work with this flag disabled.
To include any xml data into a script file:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Declare the external includes
-->
<!DOCTYPE SYSTEM [
<!ENTITY someName SYSTEM "./some_file.xml">
]>
<AWTTestScript>
&someName;
....
</AWTTestScript>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi guys,
Just getting to grips with a large scale Abbot testing project and was thinking that using entity includes for pulling in chunks of XML into a script would be useful.
The only way I could get this to work was to hack Script.java and change the method at line 331 to:
public void load(Reader reader, String fileName)
And then pass this file name as the system id to:
Document doc = builder.build(reader, fileName);
I also disabled schema validation as external dtd entity includes and external schema validation don't play nicely.
Perhaps this could become a system property? Whether you want schema validation enabled or not, then entity includes would just work with this flag disabled.
To include any xml data into a script file:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Declare the external includes
-->
<!DOCTYPE SYSTEM [
<!ENTITY someName SYSTEM "./some_file.xml">
]>
<AWTTestScript>
&someName;
....
</AWTTestScript>