summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-03-26 00:29:39 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-03-26 00:29:39 +0000
commit64672808a634a51b77756d20d2bf6349ac839364 (patch)
treef8318a1c4a5237f8b2251dea5704977ca46a4929
parent1322e9133edd81718645df20bbdafc6ad7eb4509 (diff)
Do not issue warnings for xsi: attrs
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@758482 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java11
1 files changed, 8 insertions, 3 deletions
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);
}