Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356681 - XML namespace declarations not as documented in 1.0.0.RELEASE
Summary: XML namespace declarations not as documented in 1.0.0.RELEASE
Status: CLOSED FIXED
Alias: None
Product: Gemini.Blueprint
Classification: RT
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 2.0.0.M01   Edit
Assignee: Glyn Normington CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-04 13:02 EDT by Olaf Otto CLA
Modified: 2012-11-29 06:32 EST (History)
1 user (show)

See Also:


Attachments
Example of mixed namespaces from META-INF/spring (628 bytes, text/plain)
2012-11-29 06:21 EST, Glyn Normington CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.