RE: DTDAnalyzer Git Master

11 views
Skip to first unread message

Maloney, Christopher (NIH/NLM/NCBI) [C]

unread,
Jul 28, 2013, 11:27:52 AM7/28/13
to Rene Single, NLM NCBI List github-tools, dtdan...@googlegroups.com

Hi, Rene,

 

I apologize for taking so long to get back to you – my wife just had a baby, and I was taking some time off, and then this email got a little bit buried in my inbox.

 

Thank you very much for this patch.  I will take a look at it now. 

 

I’m also forwarding this email to the dtdanalyzer google group email list, which is a better list for this topic

 

Chris Maloney

NIH/NLM/NCBI (Contractor)

Building 45, 5AN.24D-22

301-594-2842

 

From: Rene Single [mailto:rene....@tanner.de]
Sent: Wednesday, July 17, 2013 10:29 AM
To: NLM NCBI List github-tools
Subject: DTDAnalyzer Git Master

 

Dear Sir or Madam,

I have been trying out the DTDAnalyzer in Comparison mode and have stumbled upon two issues, that have arisen while comparing our DTDs.

I have been calling the DTDCompare.bat with only the absolute Paths of two DTD files and the absolute Path of an output HTML file (e.g. dtdcompare D:\dtd1.dtd D:\dtd2.dtd D:\compare.html).

This initially did not work for the following reasons:

  • In DTDCompare.java function "main"
    xslt.setParameter("dtd2-loc", f.getAbsolutePath());
    should be set to an uri like this
    xslt.setParameter("dtd2-loc", f.toURI().toString());
  • In DTDCompare.java function "main"
    writing the dtd2 model may not use a FileWriter, as this does only support default codepage, in order to write "UTF-8" this must be changed to

                f = File.createTempFile("dtdcompare-", ".xml");
                FileOutputStream fos = new FileOutputStream(f);
                OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8");
                StringWriter sw = writer.getBuffer();
                osw.write(sw.toString());
                osw.close();

After I applied those changes, it now works correctly for me.
Please find attached the patched file.

Mit freundlichen Grüßen aus Lindau

René Single
Dipl.-Ing. (BA)
Automatisierung & Integration

--
----------------------------------------------------
TANNER AG
Kemptener Straße 99
88131 Lindau, Germany

tel +49 8382 272-199
fax +49 8382 272-900
mailto:rene....@tanner.de
http://www.tanner.de

Vorsitzender des Aufsichtsrats: Helmut Tanner
Vorstand: Stefan Kuegel (Vorsitzender), Georg-Friedrich Blocher
Aktiengesellschaft, Lindau (B)
Registergericht Kempten, HRB 7199
----------------------------------------------------

Maloney, Christopher (NIH/NLM/NCBI) [C]

unread,
Jul 28, 2013, 12:06:22 PM7/28/13
to Rene Single, NLM NCBI List github-tools, dtdan...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages