Hi Kai,

I think that this is a bug. According to XML schema that defines the 
component description grammar there is:

<element name="service" type="scr:Tservice" minOccurs="0" maxOccurs="1"/>

So only one occurrence is allowed.

---
Regards/Pozdrowienia,
Lukasz Bobowiec
Software Engineer
Tivoli Dynamic Content Delivery
[EMAIL PROTECTED]
tel. (+48) 12-628-98-82

IBM SWG Lab, Cracow, Poland
IBM Polska Sp. z o.o. oddział w Krakowie
ul. Armii Krajowej 18
30 -150 Kraków

NIP: 526-030-07-24
Sąd Rejonowy dla m.st. Warszawy, XIII Wydział Gospodarczy KRS
KRS 0000012941, Kapitał zakładowy: 3.073.600 PLN




From:
"Toedter, Kai" <[EMAIL PROTECTED]>
To:
"Equinox development mailing list" <equinox-dev@eclipse.org>
Date:
2008-10-28 14:31
Subject:
[equinox-dev] service elements in Declaratice Services



Hi All,

I currently prototype a little Equinox app that uses Declarative Services 
(DS). The DS spec 4.1 says "The service element is optional. ... The 
service element must have one or more provide elements that define the 
service interfaces". So, the following XML is syntactically correct and 
handled well by Equinox DS:

<component name="com.siemens.ct.pm.ui.views.treeView">
    <implementation
        class="com.siemens.ct.pm.ui.views.treeview.TreeView"/>
    <service>
        <provide
 interface="com.siemens.ct.pm.application.service.IViewContribution"/>
        <provide
            interface="com.siemens.ct.pm.model.IPersonListener"/>
    </service>
</component>

However, the following XML is incorrect with regards to the DS spec...

<component name="com.siemens.ct.pm.ui.views.treeView">
    <implementation
        class="com.siemens.ct.pm.ui.views.treeview.TreeView"/>
    <service>
        <provide
 interface="com.siemens.ct.pm.application.service.IViewContribution"/>
    </service>
    <service>
        <provide
            interface="com.siemens.ct.pm.model.IPersonListener"/>
    </service>
</component>

... but Equinox handles it exactly like the above correct XML :)

Now the question is, is this a bug or a feature?
If it is a bug, I can file it...
...but how should Equinox DS react then?

Best regards,

Kai
---


Kai Tödter

Siemens AG
Corporate Technology
Architecture
CT SE 2
Otto-Hahn-Ring 6
81739 Munich, Germany
Phone: +49 89 636-41064
Fax: +49 89 636-45450
mailto: [EMAIL PROTECTED]
Internet: www.siemens.com/corporate-technology

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard 
Cromme; Managing Board: Peter Loescher, Chairman, President and Chief 
Executive Officer; Heinrich Hiesinger, Joe Kaeser, Rudi Lamprecht, Eduardo 
Montes, Juergen Radomski, Erich R. Reinhardt, Hermann Requardt, Uriel J. 
Sharef, Peter Y. Solmssen, Klaus Wucherer; Registered offices: Berlin and 
Munich; Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, 
HRB 6684; WEEE-Reg.-No. DE 23691322



_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to