Peter Donald wrote:
> At 08:46 AM 6/28/2002 +0200, you wrote:
>
>> <my-app>
>> <component name="s" impl="xyz.Component1">
>> <config>lalal</config>
>> </component>
>> </my-app>
>>
>> I would like to change this to the following:
>>
>> application.xml // default name
>>
>> <application>
>> <components>
>> <component name="s" class="xyz.Component1">
>> <configuration>lalal</configuration>
>> </component>
>> </components>
>> </application>
>>
>> Changes include:
>>
>> 1. applying the convention of a root element called "application"
>
> +1
+0
>> 2. all component declarations are contained within a "components"
>> element
>
>
> Not sure I see the need but thats okays with me.
+0
>> 3. replace "impl" attribute with "class" to maintain consitency
>> with the "class"/"type" convention
>
>
> Naah - I prefer Impl. As I could then refer to a remove/web/other
> service or something and autocreate component out of it or whatever. ie
>
> <component name="s" impl="rmi://some.server:976/MyObject"
> factory="Rmi2AvalonFactory"/>
>
> So impl is just an implementation key that usually is 1 to 1 mapping
> with classname but for different factories can do different things.
+0
In my version of the application profile, I make many implementations
available with the same role and without hints; it's the factory that
wraps them all in a facade that hides the selection.
Example:
<component name="Storage" role="org.krysalis.monarch.storage.Store"
factory="org.krysalis.monarch.services.storage.StorageComponentFactory"
type="singleton">
<implementation name="[local] roots"
class="org.krysalis.monarch.storage.impl.file.LocalFileStore">
<context type="roots">
<disable name="A:\"/>
<disable name="/mnt/floppy/"/>
</context>
</implementation>
<implementation name="[local] home"
class="org.krysalis.monarch.storage.impl.file.LocalFileStore">
<context type="user.home">
</context>
<templates>
<template name="Docbook DTD XML"
path="resources/templates/docbook/docbook-template.xml"
extension="xml"
mime-type="text/xml">
<resource path="resources/templates/docbook/docbook-r.dtd"/>
<resource path="resources/templates/docbook/style.xsl"/>
</template>
<template name="plain text"
path="resources/templates/plainText/plain.txt"
extension="txt"
mime-type="text/plain"/>
</templates>
</implementation>
<implementation name="[jar] old documentation"
class="org.krysalis.monarch.storage.impl.resource.SingleResourceDirStore">
<resource
path="resources/documentation/diagrams/Krysalis-classes.svg"
mimetype="image/svg"/>
<resource path="resources/help/apidoc/api.hs"
mimetype="text/x-helpset"/>
</implementation>
<implementation name="[jar] demos"
class="org.krysalis.monarch.storage.impl.resource.SingleResourceDirStore">
<resource path="resources/html/start.html" mimetype="text/html"/>
<resource path="resources/icons/butterflyWP.gif"
mimetype="image/gif"/>
<resource path="resources/demos/krysalis.svg"
mimetype="image/svg"/>
<resource path="resources/demos/article-sdocbook2.xml"
mimetype="text/xml"/>
<resource path="resources/demos/docbook-r.dtd"
mimetype="text/plain"/>
<resource path="resources/demos/poolshot2.pdf"
mimetype="application/pdf"/>
<resource path="resources/demos/AbstractComponentSheet.java"
mimetype="text/java"/>
<resource path="resources/demos/dontcry.gif"
mimetype="image/gif"/>
<resource path="resources/demos/world.wmf"
mimetype="application/wmf"/>
<resource path="resources/demos/build.xml"
mimetype="text/x-build"/>
<resource path="resources/demos/readme.fo" mimetype="text/x-fo"/>
</implementation>
</component>
How could this be done?
>> 4. usage of the filename "application.xml"
>
>
> Theres already a J2EE application.xml specification so I would be
> reluctent to standardize on application.xml - something else maybe?
avalon.xml ;-)
--
Nicola Ken Barozzi [EMAIL PROTECTED]
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>