diff options
2 files changed, 23 insertions, 4 deletions
diff --git a/branches/sca-java-1.x/modules/contribution-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor b/branches/sca-java-1.x/modules/contribution-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor new file mode 100644 index 0000000000..86bc58665b --- /dev/null +++ b/branches/sca-java-1.x/modules/contribution-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Implementation class for the attribute processor extension +org.apache.tuscany.sca.contribution.processor.xml.AnyAttributeProcessor;qname=http://www.w3.org/2001/XMLSchema#anyAttribute,model=java.lang.Object diff --git a/branches/sca-java-1.x/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java b/branches/sca-java-1.x/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java index 29c2af7513..9a5f1b363a 100644 --- a/branches/sca-java-1.x/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java +++ b/branches/sca-java-1.x/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java @@ -55,7 +55,7 @@ public class ExtensibleStAXAttributeProcessor private static final Logger logger = Logger.getLogger(ExtensibleStAXAttributeProcessor.class.getName()); - private static final QName UNKNOWN_ATTRIBUTE = new QName(Constants.SCA10_TUSCANY_NS, "unknown"); + private static final QName ANY_ATTRIBUTE = new QName(Constants.XMLSCHEMA_NS, "anyAttribute"); private XMLInputFactory inputFactory; private XMLOutputFactory outputFactory; @@ -149,13 +149,13 @@ public class ExtensibleStAXAttributeProcessor //handle extension attributes without processors - processor = (StAXAttributeProcessor<?>)processors.getProcessor(UNKNOWN_ATTRIBUTE); + processor = (StAXAttributeProcessor<?>)processors.getProcessor(ANY_ATTRIBUTE); if (processor == null) { Location location = source.getLocation(); if (logger.isLoggable(Level.WARNING)) { logger.warning("Could not find Default Attribute processor !"); } - warning("DefaultAttributeProcessorNotAvailable", processors, UNKNOWN_ATTRIBUTE, location); + warning("DefaultAttributeProcessorNotAvailable", processors, ANY_ATTRIBUTE, location); } return processor == null ? null : processor.read(attributeName, source); @@ -181,7 +181,7 @@ public class ExtensibleStAXAttributeProcessor } //handle extension attributes without processors - processor = (StAXAttributeProcessor<?>)processors.getProcessor(UNKNOWN_ATTRIBUTE); + processor = (StAXAttributeProcessor<?>)processors.getProcessor(ANY_ATTRIBUTE); if(processor == null) { if (logger.isLoggable(Level.WARNING)) { logger.warning("No Default StAX processor is configured to handle " + model.getClass()); |