David W. wrote:
> Another possibilty would be to let the user choose.  Suppose that
> config.getPropertyValueAsString("name") -- a bit of a long name -- returned
> "Something" for both of the following
> 
> <component name="Something" />
> 
> and
> 
> <component>
>   <name>Something</name>
> </component>
> 
> And threw a ConfigurationException in the case
> 
> <component name="Something">
>   <name>Something else</name>
> </component>
> 
> It would mean a noticable change to the way DefaultConfiguration works, but
> I don't think people tend to design configuration files that would cause
> problems with the third case.  It would still be good to have a standard
> format that comes with releases, but certainly the user could change things
> around if it was desirable.

This is how the XmlProperty task in Ant <shameless>that I 
wrote</shameless> deals with properties, when collapseAttributes="true".

http://jakarta.apache.org/ant/manual/CoreTasks/xmlproperty.html

The main reason is that it makes it easy to invent an informal DTD and 
access it easily.

But making it a "feature" for existing DTDs is probable FS, but could be 
nice in the Default way configs /can/ be handled.

The only real reason why this could be needed is when you need to pass from

  <element attr="a"/>

to

   <element>
     <attr>a</attr>
     <attr>b</attr>
     <attr>c</attr>
   </element>

-- 
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]>

Reply via email to