From 5c27c1b8cf15f5239241b61fe3dfb69048fd3bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Euzenat?= <Jerome.Euzenat@inria.fr> Date: Mon, 27 Nov 2006 09:45:23 +0000 Subject: [PATCH] - introduced (in comment) Sabine Massmann patch --- .../exmo/align/parser/AlignmentParser.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/fr/inrialpes/exmo/align/parser/AlignmentParser.java b/src/fr/inrialpes/exmo/align/parser/AlignmentParser.java index 5f87cabb..40683a60 100644 --- a/src/fr/inrialpes/exmo/align/parser/AlignmentParser.java +++ b/src/fr/inrialpes/exmo/align/parser/AlignmentParser.java @@ -289,6 +289,32 @@ public class AlignmentParser extends DefaultHandler { System.err.println("content AlignmentParser : " + content); } + /* + // Change proposed by Sabine Massmann + // If to be integrated, then put it in the proper place + // There is no reasons to test for Double in characters + public void characters(char ch[], int start, int length) { + String oldContent = "" + content; + content = new String( ch, start, length ); + if ( content != null && !content.equals("\n") + && !content.startsWith("\n ") + // && oldContent.contains(".") + && oldContent.indexOf('.',0) != -1 + ){ + oldContent = oldContent.concat(content); + try { + double test = Double.parseDouble(oldContent); + content = oldContent; + } catch (NumberFormatException e) { + // TODO Auto-generated catch block + // e.printStackTrace(); + } + } + if(debugMode > 2) + System.err.println("content AlignmentParser : " + content); + } + */ + /** * Called by the XML parser at the end of an element. * -- GitLab