From 64672808a634a51b77756d20d2bf6349ac839364 Mon Sep 17 00:00:00 2001 From: rfeng Date: Thu, 26 Mar 2009 00:29:39 +0000 Subject: Do not issue warnings for xsi: attrs git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@758482 13f79535-47bb-0310-9956-ffa450edef68 --- .../processor/ExtensibleStAXAttributeProcessor.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'java/sca/modules/contribution/src/main') diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java index 9a7ba07261..d8b66562a2 100644 --- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java +++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java @@ -18,6 +18,8 @@ */ package org.apache.tuscany.sca.contribution.processor; +import static javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI; + import java.io.InputStream; import java.io.OutputStream; import java.util.logging.Level; @@ -152,10 +154,13 @@ public class ExtensibleStAXAttributeProcessor implements StAXAttributeProcessor< processor = (StAXAttributeProcessor)processors.getProcessor(attributeName); if (processor == null) { Location location = source.getLocation(); - if (logger.isLoggable(Level.WARNING)) { - logger.warning("Attribute " + attributeName + " cannot be processed. (" + location + ")"); + // Skip xsi:type, xsi:nil and xsi:schemaLocation etc + if (!W3C_XML_SCHEMA_INSTANCE_NS_URI.equals(attributeName.getNamespaceURI())) { + if (logger.isLoggable(Level.WARNING)) { + logger.warning("Attribute " + attributeName + " cannot be processed. (" + location + ")"); + } + warning("AttributeCannotBeProcessed", processors, attributeName, location); } - warning("AttributeCannotBeProcessed", processors, attributeName, location); } else { return processor.read(attributeName, source); } -- cgit v1.2.3