Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356681

Summary: XML namespace declarations not as documented in 1.0.0.RELEASE
Product: [RT] Gemini.Blueprint Reporter: Olaf Otto <olaf>
Component: CoreAssignee: Glyn Normington <glyn.normington>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: glyn.normington
Version: unspecified   
Target Milestone: 2.0.0.M01   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Example of mixed namespaces from META-INF/spring none

Description Olaf Otto CLA 2011-09-04 13:02:32 EDT
Accotring to [1], the following XML declaration should be valid:

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:bp="http://www.osgi.org/xmlns/blueprint/v1.0.0"
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:osgi="http://www.springframework.org/schema/osgi"
	xmlns:task="http://www.springframework.org/schema/task"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="
		http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
		http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd		
		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
    
    <util:constant id="thread-priority" static-field="java.lang.Thread.MIN_PRIORITY"/>
    
    <bean id="exampleThread" class="java.lang.Thread" p:priority-ref="thread-priority">
    	<constructor-arg>
    	   <bp:bean class="org.example.SomeRunnable"/>
    	</constructor-arg>
    </bean>
    
    <task:executor id="rangeWithBoundedQueue" size="7-42" queue-capacity="#{ T(java.lang.Math).random() * 30.0 }"/>

    <bp:reference-list id="cloneableServices" interface="java.lang.Cloneable" />
<beans>

However, it is not: The blueprint schema enforces a <blueprint> root element.
Comment 2 Glyn Normington CLA 2012-11-29 06:21:41 EST
Created attachment 224097 [details]
Example of mixed namespaces from META-INF/spring
Comment 3 Glyn Normington CLA 2012-11-29 06:23:52 EST
I did some experiments which confirmed your finding about the default namespace needing to be blueprint when mixing namespaces. However, this only seemed to work when the blueprint file was in META-INF/spring. See the example attached.
Comment 4 Glyn Normington CLA 2012-11-29 06:32:18 EST
Fixed documentation in commit b998e148ba4581429852c88380d277c72e6a39d9.