Hello,
I have a Java program that transform XML files to another format using Saxon 8.7. It works fine for a single full XML file. When I try to transform a XML with entity file references, I got the no protocol error.
The XML looks like this:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "-//My Document DTD v1.1 20030520//EN" "mydtd/project.dtd" [
<!ENTITY file_01 SYSTEM "file_01.xml">
<!ENTITY file_02 SYSTEM "file_02.xml">
<!ENTITY file_03 SYSTEM "file_03.xml">
<!ENTITY file_04 SYSTEM "file_04.xml">
]>
<document xmlns:xlink="
http://www.w3.org/1999/xlink">
<title>Title here</title>
&file_01;
&file_02;
&file_03;
&file_04;
</document>
The error is:
net.sf.saxon.trans.Dynamic
Error: java.net.MalformedURLExcep
tion: no protocol: file_01.xml
I have catalog file to map my DTD so those are working fine. But as for the entity files, each project has different file so I don't think I map each of them.
Is there any solution in transforming this without getting the protocol error? Thank you for any help.
Owon. S.
Start Free Trial