1 <?xml version="1.0" encoding="UTF-8"?>
\r
3 ~ Licensed to the Apache Software Foundation (ASF) under one
\r
4 ~ or more contributor license agreements. See the NOTICE file
\r
5 ~ distributed with this work for additional information
\r
6 ~ regarding copyright ownership. The ASF licenses this file
\r
7 ~ to you under the Apache License, Version 2.0 (the
\r
8 ~ "License"); you may not use this file except in compliance
\r
9 ~ with the License. You may obtain a copy of the License at
\r
11 ~ http://www.apache.org/licenses/LICENSE-2.0
\r
13 ~ Unless required by applicable law or agreed to in writing,
\r
14 ~ software distributed under the License is distributed on an
\r
15 ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
\r
16 ~ KIND, either express or implied. See the License for the
\r
17 ~ specific language governing permissions and limitations
\r
18 ~ under the License.
\r
22 version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
\r
23 xmlns:plexus="http://plexus.codehaus.org/spring">
\r
25 <xsl:output method="xml" cdata-section-elements="configuration"/>
\r
28 Convert a plexus descriptor to a spring XML context with help of the custom <plexus: namespace
\r
29 to handle IoC containers incompatibilities.
\r
32 <xsl:template match="/component-set" >
\r
33 <spring:beans xmlns:spring="http://www.springframework.org/schema/beans"
\r
34 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
\r
35 xmlns="http://plexus.codehaus.org/spring"
\r
36 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
\r
37 http://plexus.codehaus.org/spring http://plexus.codehaus.org/schemas/spring-1.0.xsd"
\r
38 default-lazy-init="true">
\r
39 <xsl:for-each select="components/component">
\r
42 <xsl:attribute name="role">
\r
43 <xsl:value-of select="role" />
\r
45 <xsl:if test="role-hint">
\r
46 <xsl:attribute name="role-hint">
\r
47 <xsl:value-of select="role-hint" />
\r
50 <xsl:attribute name="implementation">
\r
51 <xsl:value-of select="implementation" />
\r
53 <xsl:if test="instantiation-strategy">
\r
54 <xsl:attribute name="instantiation-strategy">
\r
55 <xsl:value-of select="instantiation-strategy" />
\r
58 <xsl:for-each select="requirements/requirement">
\r
60 <xsl:attribute name="field-name">
\r
61 <xsl:value-of select="field-name" />
\r
63 <xsl:attribute name="role">
\r
64 <xsl:value-of select="role" />
\r
66 <xsl:if test="role-hint">
\r
67 <xsl:attribute name="role-hint">
\r
68 <xsl:value-of select="role-hint" />
\r
73 <xsl:for-each select="configuration/*">
\r
75 <xsl:attribute name="name">
\r
76 <xsl:value-of select="name(.)" />
\r
78 <xsl:copy-of select="child::node()" />
\r