Author: gnodet
Date: Fri Mar 11 13:47:57 2016
New Revision: 1734559

URL: http://svn.apache.org/viewvc?rev=1734559&view=rev
Log:
[ARIES-1290][ARIES-1503] Better handling of XSD imports between namespace 
handlers (e.g. cm->ext)

Added:
    
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ParserServiceImportXSDsBetweenNamespaceHandlersTest.java
    
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/cm/handler/
    
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/cm/handler/Aries1503aNamespaceHandler.java
    
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/cm/handler/Aries1503bNamespaceHandler.java
    
aries/trunk/blueprint/blueprint-itests/src/test/resources/ImportNamespacesTest.xml
    
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503-2.xml
    
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503-2.xsd
    
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503.xml
    
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503.xsd
Modified:
    
aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java
    
aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java

Modified: 
aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java?rev=1734559&r1=1734558&r2=1734559&view=diff
==============================================================================
--- 
aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java
 (original)
+++ 
aries/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmNamespaceHandler.java
 Fri Mar 11 13:47:57 2016
@@ -40,6 +40,8 @@ import org.apache.aries.blueprint.mutabl
 import org.apache.aries.blueprint.mutable.MutableReferenceMetadata;
 import org.apache.aries.blueprint.mutable.MutableValueMetadata;
 import org.apache.aries.blueprint.utils.ServiceListener;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
 import org.osgi.service.blueprint.container.ComponentDefinitionException;
 import org.osgi.service.blueprint.reflect.BeanMetadata;
 import org.osgi.service.blueprint.reflect.BeanProperty;
@@ -148,7 +150,7 @@ public class CmNamespaceHandler implemen
     }
 
     public void setConfigAdmin(ConfigurationAdmin configAdmin) {
-        this.configAdmin = configAdmin;
+        CmNamespaceHandler.configAdmin = configAdmin;
     }
 
     public URL getSchemaLocation(String namespace) {
@@ -160,6 +162,15 @@ public class CmNamespaceHandler implemen
             return getClass().getResource("blueprint-cm-1.1.0.xsd");
         } else if (BLUEPRINT_CM_NAMESPACE_1_0.equals(namespace)) {
             return getClass().getResource("blueprint-cm-1.0.0.xsd");
+        } else if 
(namespace.startsWith("http://aries.apache.org/blueprint/xmlns/blueprint-ext";)) 
{
+            try {
+                Bundle extBundle = 
FrameworkUtil.getBundle(PlaceholdersUtils.class);
+                Class<?> extNsHandlerClazz = 
extBundle.loadClass("org.apache.aries.blueprint.ext.impl.ExtNamespaceHandler");
+                return ((NamespaceHandler) 
extNsHandlerClazz.newInstance()).getSchemaLocation(namespace);
+            } catch (Throwable t) {
+                LOGGER.warn("Could not locate ext namespace schema", t);
+                return null;
+            }
         } else {
             return null;
         }

Modified: 
aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java?rev=1734559&r1=1734558&r2=1734559&view=diff
==============================================================================
--- 
aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
 (original)
+++ 
aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
 Fri Mar 11 13:47:57 2016
@@ -356,7 +356,7 @@ public class NamespaceHandlerRegistryImp
                 }
             }
             synchronized (schemaFactory) {
-                schemaFactory.setResourceResolver(new 
BundleResourceResolver(schemaMap, bundle, schemaSources));
+                schemaFactory.setResourceResolver(new 
BundleResourceResolver(handlers, schemaMap, bundle, schemaSources));
                 return schemaFactory.newSchema(schemaSources.toArray(new 
Source[schemaSources.size()]));
             }
         } finally {
@@ -377,11 +377,13 @@ public class NamespaceHandlerRegistryImp
     }
 
     private class BundleResourceResolver implements LSResourceResolver {
+        private final Map<URI, NamespaceHandler> handlers;
         private final Properties schemaMap;
         private final Bundle bundle;
         private final List<StreamSource> schemaSources;
 
-        public BundleResourceResolver(Properties schemaMap, Bundle bundle, 
List<StreamSource> schemaSources) {
+        public BundleResourceResolver(Map<URI, NamespaceHandler> handlers, 
Properties schemaMap, Bundle bundle, List<StreamSource> schemaSources) {
+            this.handlers = handlers;
             this.schemaMap = schemaMap;
             this.bundle = bundle;
             this.schemaSources = schemaSources;
@@ -414,12 +416,7 @@ public class NamespaceHandlerRegistryImp
                     }
                 }
             }
-            URI uri = URI.create(namespaceURI);
-            Set<NamespaceHandler> hs = 
NamespaceHandlerRegistryImpl.this.handlers.get(uri);
-            if (hs == null) {
-                return null;
-            }
-            for (NamespaceHandler h : hs) {
+            for (NamespaceHandler h : handlers.values()) {
                 URL url = h.getSchemaLocation(namespaceURI);
                 if (url != null) {
                     // handling include-relative-path case

Added: 
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ParserServiceImportXSDsBetweenNamespaceHandlersTest.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ParserServiceImportXSDsBetweenNamespaceHandlersTest.java?rev=1734559&view=auto
==============================================================================
--- 
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ParserServiceImportXSDsBetweenNamespaceHandlersTest.java
 (added)
+++ 
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ParserServiceImportXSDsBetweenNamespaceHandlersTest.java
 Fri Mar 11 13:47:57 2016
@@ -0,0 +1,103 @@
+/**
+ * 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.
+ */
+package org.apache.aries.blueprint.itests;
+
+import java.io.InputStream;
+import java.net.URL;
+
+import org.apache.aries.blueprint.ComponentDefinitionRegistry;
+import org.apache.aries.blueprint.itests.cm.handler.Aries1503aNamespaceHandler;
+import org.apache.aries.blueprint.itests.cm.handler.Aries1503bNamespaceHandler;
+import org.apache.aries.blueprint.services.ParserService;
+import org.junit.Test;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.tinybundles.core.TinyBundles;
+import org.osgi.framework.Constants;
+
+import static org.apache.aries.blueprint.itests.Helper.blueprintBundles;
+import static org.junit.Assert.assertNotNull;
+import static org.ops4j.pax.exam.CoreOptions.*;
+
+public class ParserServiceImportXSDsBetweenNamespaceHandlersTest extends 
AbstractBlueprintIntegrationTest {
+
+    private static final String NS_HANDLER_BUNDLE = 
"org.apache.aries.blueprint.aries1503";
+    private static final String NS_HANDLER2_BUNDLE = 
"org.apache.aries.blueprint.aries1503b";
+    private static final String TEST_BUNDLE = 
"org.apache.aries.blueprint.aries1503.test";
+
+    @org.ops4j.pax.exam.Configuration
+    public Option[] config() {
+        return new Option[] {
+                baseOptions(),
+                
systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
+                blueprintBundles(),
+                keepCaches(),
+                
streamBundle(createAries1503aNamespaceHandlerBundle()).noStart(),
+                streamBundle(createAries1503bNamespaceHandlerBundle()),
+                streamBundle(createTestBundle())
+        };
+    }
+
+    private InputStream createAries1503aNamespaceHandlerBundle() {
+        return TinyBundles.bundle()
+                .add(Aries1503aNamespaceHandler.class)
+                .add("OSGI-INF/blueprint/blueprint-aries-1503.xml", 
getResource("blueprint-aries-1503.xml"))
+                .add("blueprint-aries-1503.xsd", 
getResource("blueprint-aries-1503.xsd"))
+                .set(Constants.BUNDLE_SYMBOLICNAME, NS_HANDLER_BUNDLE)
+                .set(Constants.EXPORT_PACKAGE, 
Aries1503aNamespaceHandler.class.getPackage().getName())
+                .set(Constants.IMPORT_PACKAGE, 
"org.apache.aries.blueprint,org.apache.aries.blueprint.ext," +
+                        "org.apache.aries.blueprint.mutable," +
+                        "org.osgi.service.blueprint.reflect,org.w3c.dom")
+                .build(TinyBundles.withBnd());
+    }
+
+    private InputStream createAries1503bNamespaceHandlerBundle() {
+        return TinyBundles.bundle()
+                .add(Aries1503bNamespaceHandler.class)
+                // add this class too - we don't want to play with split 
packages, etc.
+                .add(Aries1503aNamespaceHandler.class)
+                .add("OSGI-INF/blueprint/blueprint-aries-1503-2.xml", 
getResource("blueprint-aries-1503-2.xml"))
+                .add("blueprint-aries-1503-2.xsd", 
getResource("blueprint-aries-1503-2.xsd"))
+                .add("blueprint-aries-1503.xsd", 
getResource("blueprint-aries-1503.xsd"))
+                .set(Constants.BUNDLE_SYMBOLICNAME, NS_HANDLER2_BUNDLE)
+                .set(Constants.EXPORT_PACKAGE, 
Aries1503bNamespaceHandler.class.getPackage().getName())
+                .set(Constants.IMPORT_PACKAGE, 
"org.apache.aries.blueprint,org.apache.aries.blueprint.ext," +
+                        "org.apache.aries.blueprint.mutable," +
+                        "org.osgi.service.blueprint.reflect,org.w3c.dom," +
+                        
Aries1503bNamespaceHandler.class.getPackage().getName())
+                .build(TinyBundles.withBnd());
+    }
+
+    private InputStream createTestBundle() {
+        return TinyBundles.bundle()
+                .add("OSGI-INF/blueprint/ImportNamespacesTest.xml", 
getResource("ImportNamespacesTest.xml"))
+                .set(Constants.BUNDLE_SYMBOLICNAME, TEST_BUNDLE)
+                .set(Constants.IMPORT_PACKAGE, 
Aries1503bNamespaceHandler.class.getPackage().getName()
+                        + 
",org.apache.aries.blueprint,org.apache.aries.blueprint.ext")
+                .build(TinyBundles.withBnd());
+    }
+
+    @Test
+    public void testXSDImports() throws Exception {
+        ParserService parserService = 
context().getService(ParserService.class);
+        URL blueprintXML = 
context().getBundleByName(TEST_BUNDLE).getEntry("OSGI-INF/blueprint/ImportNamespacesTest.xml");
+        ComponentDefinitionRegistry cdr = parserService.parse(blueprintXML, 
context().getBundleByName(TEST_BUNDLE));
+        assertNotNull(cdr.getComponentDefinition("aries-1503"));
+    }
+
+}

Added: 
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/cm/handler/Aries1503aNamespaceHandler.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/cm/handler/Aries1503aNamespaceHandler.java?rev=1734559&view=auto
==============================================================================
--- 
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/cm/handler/Aries1503aNamespaceHandler.java
 (added)
+++ 
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/cm/handler/Aries1503aNamespaceHandler.java
 Fri Mar 11 13:47:57 2016
@@ -0,0 +1,88 @@
+/**
+ * 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.
+ */
+package org.apache.aries.blueprint.itests.cm.handler;
+
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.aries.blueprint.NamespaceHandler;
+import org.apache.aries.blueprint.ParserContext;
+import org.apache.aries.blueprint.PassThroughMetadata;
+import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class Aries1503aNamespaceHandler implements NamespaceHandler {
+
+    @Override
+    public URL getSchemaLocation(String namespace) {
+        if 
("http://aries.apache.org/blueprint/xmlns/blueprint-aries-1503/v1.0.0".equals(namespace))
 {
+            return getClass().getResource("/blueprint-aries-1503.xsd");
+        }
+        return null;
+    }
+
+    @Override
+    public Set<Class> getManagedClasses() {
+        return new 
HashSet<Class>(Collections.<Class>singletonList(String.class));
+    }
+
+    @Override
+    public Metadata parse(Element element, ParserContext context) {
+        MutableBeanMetadata metadata = 
context.createMetadata(MutableBeanMetadata.class);
+        metadata.setProcessor(true);
+        metadata.setId("aries-1503");
+        metadata.setScope(BeanMetadata.SCOPE_SINGLETON);
+        metadata.addArgument(new PassThroughMetadata() {
+            @Override
+            public Object getObject() {
+                return "ARIES-1503";
+            }
+
+            @Override
+            public String getId() {
+                return "aries-1503-arg";
+            }
+
+            @Override
+            public int getActivation() {
+                return 0;
+            }
+
+            @Override
+            public List<String> getDependsOn() {
+                return null;
+            }
+        }, null, 0);
+        metadata.setRuntimeClass(String.class);
+        return metadata;
+    }
+
+    @Override
+    public ComponentMetadata decorate(Node node, ComponentMetadata component, 
ParserContext context) {
+        return null;
+    }
+
+}

Added: 
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/cm/handler/Aries1503bNamespaceHandler.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/cm/handler/Aries1503bNamespaceHandler.java?rev=1734559&view=auto
==============================================================================
--- 
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/cm/handler/Aries1503bNamespaceHandler.java
 (added)
+++ 
aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/cm/handler/Aries1503bNamespaceHandler.java
 Fri Mar 11 13:47:57 2016
@@ -0,0 +1,98 @@
+/**
+ * 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.
+ */
+package org.apache.aries.blueprint.itests.cm.handler;
+
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.aries.blueprint.NamespaceHandler;
+import org.apache.aries.blueprint.ParserContext;
+import org.apache.aries.blueprint.PassThroughMetadata;
+import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class Aries1503bNamespaceHandler implements NamespaceHandler {
+
+    @Override
+    public URL getSchemaLocation(String namespace) {
+        if 
("http://aries.apache.org/blueprint/xmlns/blueprint-aries-1503/v1.1.0".equals(namespace))
 {
+            return getClass().getResource("/blueprint-aries-1503-2.xsd");
+        }
+        if 
("http://aries.apache.org/blueprint/xmlns/blueprint-aries-1503/v1.0.0".equals(namespace))
 {
+            try {
+                Bundle extBundle = 
FrameworkUtil.getBundle(Aries1503aNamespaceHandler.class);
+                return 
Aries1503aNamespaceHandler.class.newInstance().getSchemaLocation(namespace);
+            } catch (Throwable t) {
+                return null;
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public Set<Class> getManagedClasses() {
+        return new 
HashSet<Class>(Collections.<Class>singletonList(String.class));
+    }
+
+    @Override
+    public Metadata parse(Element element, ParserContext context) {
+        MutableBeanMetadata metadata = 
context.createMetadata(MutableBeanMetadata.class);
+        metadata.setProcessor(true);
+        metadata.setId("aries-1503");
+        metadata.setScope(BeanMetadata.SCOPE_SINGLETON);
+        metadata.addArgument(new PassThroughMetadata() {
+            @Override
+            public Object getObject() {
+                return "ARIES-1503";
+            }
+
+            @Override
+            public String getId() {
+                return "aries-1503-arg";
+            }
+
+            @Override
+            public int getActivation() {
+                return 0;
+            }
+
+            @Override
+            public List<String> getDependsOn() {
+                return null;
+            }
+        }, null, 0);
+        metadata.setRuntimeClass(String.class);
+        return metadata;
+    }
+
+    @Override
+    public ComponentMetadata decorate(Node node, ComponentMetadata component, 
ParserContext context) {
+        return null;
+    }
+
+}

Added: 
aries/trunk/blueprint/blueprint-itests/src/test/resources/ImportNamespacesTest.xml
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/resources/ImportNamespacesTest.xml?rev=1734559&view=auto
==============================================================================
--- 
aries/trunk/blueprint/blueprint-itests/src/test/resources/ImportNamespacesTest.xml
 (added)
+++ 
aries/trunk/blueprint/blueprint-itests/src/test/resources/ImportNamespacesTest.xml
 Fri Mar 11 13:47:57 2016
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+        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.
+    -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
+        
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0";
+        
xmlns:a1503="http://aries.apache.org/blueprint/xmlns/blueprint-aries-1503/v1.1.0";>
+
+    <a1503:property-placeholder2 id="aries1503">
+        <ext:location>asd</ext:location>
+    </a1503:property-placeholder2>
+
+</blueprint>

Added: 
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503-2.xml
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503-2.xml?rev=1734559&view=auto
==============================================================================
--- 
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503-2.xml
 (added)
+++ 
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503-2.xml
 Fri Mar 11 13:47:57 2016
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+        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.
+    -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
+        default-activation="lazy">
+
+    <bean id="Aries1503NamespaceHandler" 
class="org.apache.aries.blueprint.itests.cm.handler.Aries1503bNamespaceHandler"/>
+
+    <service ref="Aries1503NamespaceHandler" 
interface="org.apache.aries.blueprint.NamespaceHandler">
+        <service-properties>
+            <entry key="osgi.service.blueprint.namespace" 
value="http://aries.apache.org/blueprint/xmlns/blueprint-aries-1503/v1.1.0"/>
+        </service-properties>
+    </service>
+
+</blueprint>

Added: 
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503-2.xsd
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503-2.xsd?rev=1734559&view=auto
==============================================================================
--- 
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503-2.xsd
 (added)
+++ 
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503-2.xsd
 Fri Mar 11 13:47:57 2016
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+    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.
+-->
+<xsd:schema 
xmlns="http://aries.apache.org/blueprint/xmlns/blueprint-aries-1503/v1.1.0";
+            
xmlns:a1503="http://aries.apache.org/blueprint/xmlns/blueprint-aries-1503/v1.0.0";
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+            
targetNamespace="http://aries.apache.org/blueprint/xmlns/blueprint-aries-1503/v1.1.0";
+            elementFormDefault="qualified"
+            attributeFormDefault="unqualified"
+            version="1.1.0">
+
+    <xsd:import 
namespace="http://aries.apache.org/blueprint/xmlns/blueprint-aries-1503/v1.0.0"; 
/>
+
+    <xsd:element name="property-placeholder2" type="TpropertyPlaceholder2"/>
+
+    <xsd:complexType name="TpropertyPlaceholder2">
+        <xsd:complexContent>
+            <xsd:extension base="a1503:TpropertyPlaceholder" />
+        </xsd:complexContent>
+    </xsd:complexType>
+
+</xsd:schema>

Added: 
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503.xml
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503.xml?rev=1734559&view=auto
==============================================================================
--- 
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503.xml
 (added)
+++ 
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503.xml
 Fri Mar 11 13:47:57 2016
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+        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.
+    -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"; 
default-activation="lazy">
+
+    <bean id="Aries1503NamespaceHandler" 
class="org.apache.aries.blueprint.itests.cm.handler.Aries1503aNamespaceHandler"/>
+
+    <service ref="Aries1503NamespaceHandler" 
interface="org.apache.aries.blueprint.NamespaceHandler">
+        <service-properties>
+            <entry key="osgi.service.blueprint.namespace" 
value="http://aries.apache.org/blueprint/xmlns/blueprint-aries-1503/v1.0.0"/>
+        </service-properties>
+    </service>
+
+</blueprint>

Added: 
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503.xsd
URL: 
http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503.xsd?rev=1734559&view=auto
==============================================================================
--- 
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503.xsd
 (added)
+++ 
aries/trunk/blueprint/blueprint-itests/src/test/resources/blueprint-aries-1503.xsd
 Fri Mar 11 13:47:57 2016
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+    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.
+-->
+<xsd:schema 
xmlns="http://aries.apache.org/blueprint/xmlns/blueprint-aries-1503/v1.0.0";
+            
xmlns:ext100="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0";
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+            xmlns:bp="http://www.osgi.org/xmlns/blueprint/v1.0.0";
+            
targetNamespace="http://aries.apache.org/blueprint/xmlns/blueprint-aries-1503/v1.0.0";
+            elementFormDefault="qualified"
+            attributeFormDefault="unqualified"
+            version="1.0.0">
+
+    <xsd:import namespace="http://www.osgi.org/xmlns/blueprint/v1.0.0"; />
+    <xsd:import 
namespace="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"; />
+
+    <xsd:element name="property-placeholder" type="TpropertyPlaceholder"/>
+
+    <xsd:complexType name="TpropertyPlaceholder">
+        <xsd:complexContent>
+            <xsd:extension base="bp:Tcomponent">
+                <xsd:sequence>
+                    <xsd:element ref="ext100:location" />
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+</xsd:schema>


Reply via email to