Hi Tom,

Am Mittwoch, den 18.06.2008, 08:47 -0500 schrieb Thomas Watson:
> Can you provide an example XML that causes the issue in Equinox?
> Looking at the code it seems to treat the default value differently
> depending on the value of cardinality. When the value is 0 then the
> default attribute is treated as a single string and it is not parsed
> into an array of strings. Instead the "raw" value is simply placed as
> the only element of the default Sring[].

Yes the use case is exactly the single value (cardinality=0) case, where
we have a default value containing commas, which we have to escape.

Regards
Felix

> 
> Tom
> 
> 
> 
> Inactive hide details for Felix Meschberger ---06/18/2008 07:37:28
> AM---Hi Peter, Am Mittwoch, den 18.06.2008, 14:04 +0200 schrFelix
> Meschberger ---06/18/2008 07:37:28 AM---Hi Peter, Am Mittwoch, den
> 18.06.2008, 14:04 +0200 schrieb Peter Kriens:
> 
> 
> From:
> 
> Felix Meschberger
> <[EMAIL PROTECTED]>
> 
> To:
> 
> OSGi Developer Mail List
> <[email protected]>
> 
> Date:
> 
> 06/18/2008 07:37 AM
> 
> Subject:
> 
> Re: [osgi-dev] Metatype Service:
> Clarification for default value
> handling
> 
> 
> ______________________________________________________________________
> 
> 
> 
> Hi Peter,
> 
> Am Mittwoch, den 18.06.2008, 14:04 +0200 schrieb Peter Kriens:
> > Yes, this is the right interpretation. Escaping is a parsing time  
> > issue and it would
> > be quite strange to not directly clean up the parsed XML.
> 
> Thanks.
> 
> > So which one is wrong? :-)
> 
> The Eclipse one I assume then ;-)
> 
> Because this returns the backslashes, while the Apache Felix
> implementation does not return them.
> 
> Regards
> Felix
> 
> > 
> > Kind regards,
> > 
> > Peter Kriens
> > 
> > On 18 jun 2008, at 08:10, Felix Meschberger wrote:
> > 
> > > Hi all,
> > >
> > > I need a clarification for the handling of default values defined
> in
> > > meta data files. In such files the <AD> element may carry a
> default
> > > attribute which may contain a list of default values for
> multi-value
> > > attributes. Table 105.13 states on page 121 (in the R4.1
> compendium
> > > spec), that
> > >
> > >        "The XML attribute must contain a comma delimited list. If
> the
> > >        comma must be represented, it must be escaped with a back
> slash
> > >        (’\’ \u005c). A back slash can be included with two  
> > > backslashes.
> > >        White spaces around the command and after/before an XML
> element
> > >        must be ignored. For example: dflt="a\,b,b\,c, c\\,d" =>
> > >        [ "a,b", "b,c", "c\", "d" ]"
> > >
> > > My interpretation of this is that the
> > > AttributeDefinition.getDefaultValue() would then return an array
> of
> > > strings cleaned from the back slash characters.
> > >
> > > Is this correct ?
> > >
> > > I ask, because I encountered a difference in the Equinox metatype
> and
> > > Apache Felix metatype implementations.
> > >
> > > Thanks for your help and time.
> > >
> > > Regards
> > > Felix
> > >
> > >
> > > _______________________________________________
> > > OSGi Developer Mail List
> > > [email protected]
> > > https://mail.osgi.org/mailman/listinfo/osgi-dev
> > 
> > 
> > _______________________________________________
> > OSGi Developer Mail List
> > [email protected]
> > https://mail.osgi.org/mailman/listinfo/osgi-dev
> 
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
> 
> 
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to