diff options
author | kstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2012-02-07 16:15:24 +0000 |
---|---|---|
committer | kstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2012-02-07 16:15:24 +0000 |
commit | 453bd7f12223fe4e58049bb8f2f40d80d80bccd7 (patch) | |
tree | e88db7a1a621a15447c881ddd00e7d274050ce1d /common/src | |
parent | d89d097cf6ae5f044e592d747a25395a06f95168 (diff) | |
download | moa-id-spss-453bd7f12223fe4e58049bb8f2f40d80d80bccd7.tar.gz moa-id-spss-453bd7f12223fe4e58049bb8f2f40d80d80bccd7.tar.bz2 moa-id-spss-453bd7f12223fe4e58049bb8f2f40d80d80bccd7.zip |
* Alte MOCCA Signaturen wieder prüfbar (Parsererror fehlendes Target Attribut in QualifyingProperties wird ignoriert)
* Update MOA Template für Bürgerkartenauswahl (No-Script-Variante, Update Bilder und Text)
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1235 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'common/src')
3 files changed, 12 insertions, 3 deletions
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java index 316dee3b8..a3416d44a 100644 --- a/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java +++ b/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java @@ -271,7 +271,7 @@ public class DOMUtils { if(null != baStream) parser.parse(new InputSource(baStream)); else - parser.parse(new InputSource(inputStream)); + parser.parse(new InputSource(inputStream)); } catch(SAXException e) { if(true == Logger.isDebugEnabled() && null != buffer) { String xmlContent = new String(buffer); @@ -353,6 +353,8 @@ public class DOMUtils { String externalNoNamespaceSchemaLocation) throws SAXException, IOException, ParserConfigurationException { + + return parseDocument( inputStream, validating, diff --git a/common/src/main/java/at/gv/egovernment/moa/util/MOAErrorHandler.java b/common/src/main/java/at/gv/egovernment/moa/util/MOAErrorHandler.java index ba253edb5..3769b264d 100644 --- a/common/src/main/java/at/gv/egovernment/moa/util/MOAErrorHandler.java +++ b/common/src/main/java/at/gv/egovernment/moa/util/MOAErrorHandler.java @@ -41,6 +41,7 @@ import at.gv.egovernment.moa.logging.Logger; */ public class MOAErrorHandler extends DefaultErrorHandler { + /** * Logs a warning message. * @@ -56,8 +57,13 @@ public class MOAErrorHandler extends DefaultErrorHandler { * @see org.xml.sax.ErrorHandler#error(SAXParseException) */ public void error(SAXParseException exception) throws SAXException { - warn("parser.01", messageParams(exception), null); - throw exception; + warn("parser.01", messageParams(exception), null); + + // if Target attribute is missing in QualifyingProperties - don't throw exception (bug fix for old MOCCA signatures) + if (exception.getMessage().startsWith("cvc-complex-type.4: Attribute 'Target' must appear on element")) + warn("parser.04", new Object[] {"Attribute 'Target' must appear on element 'QualifyingProperties' - ignored for compatibility reasons."}, null); + else + throw exception; } /** diff --git a/common/src/main/resources/resources/properties/common_messages_de.properties b/common/src/main/resources/resources/properties/common_messages_de.properties index ac05b7996..a58d07625 100644 --- a/common/src/main/resources/resources/properties/common_messages_de.properties +++ b/common/src/main/resources/resources/properties/common_messages_de.properties @@ -10,6 +10,7 @@ parser.00=Leichter Fehler beim Parsen: {0}, SystemID={1}, Zeile={2}, Spalte={3} parser.01=Fehler beim Parsen: {0}, SystemID={1}, Zeile={2}, Spalte={3} parser.02=Schwerer Fehler beim Parsen: {0}, SystemID={1}, Zeile={2}, Spalte={3} +parser.04=Fehler beim Parsen: {0} xpath.00=Fehler beim Auswerten des XPath-Ausdruckes: {0} |