Sorry, I forwarded this to the wrong list. Please ignore.
John
>
> Fw: [cpeg] [Metatype] OCD Icon Path
>
> There definitely appears to be a discrepancy between the CT and the
> spec wording in section 105.7.1, Table 105.1. The CT assumes the
> base URL is the bundle's root directory. The solution should be
> carefully considered since choosing the literal interpretation and
> changing the CT will break at least some existing implementations.
>
> John
>
> >
> > Re: [cpeg] [Metatype] OCD Icon Path
> >
> > For some reason, I would have thought that the baseURL would always
> > be the root of the jar file. This seems to be what the CT expects,
> > and I don't recall this part of the CT changing. I would agree,
> > however, that your interpretation of the spec is literally correct.
> > We've had issues in the past with the wording of the MetaType spec
> > though :) I wonder if "The base URL is assumed to be *the root of
> > the jar file containing* the XML file with the definition" was really
meant?
> >
> > If I understand correctly, you're suggesting the value of the
> > resource attribute of the icon element in the test should be "../../
> > icons/icon.bmp" rather than "icons/icon.bmp". Or, alternatively, the
> > "icons" directory would be moved underneath the "OSGI-INF/
> metatype/"directory.
> >
> > John
> >
> > >
> > > [cpeg] [Metatype] OCD Icon Path
> > >
> > > Hi all,
> > >
> > > another question on the Metatype Service and the CT ;-)
> > >
> > > In the spec it states (section 105.7.1, Table 105.1):
> > >
> > > > The resource is a URL. The base URL is assumed to be the XML file
> > > with the def- inition. I.e. if the XML is a resource in the JAR
> > > file, then this URL can reference another resource in that JAR file
> > > using a relative URL.
> > >
> > > So I implemented the resolution like this:
> > >
> > > URL url = new URL(baseURL, iconPath)
> > >
> > > where the baseURL is the bundle URL of the respective XML file. For
> > > the CT test cases with tb1 this fails because:
> > >
> > > - the descriptor is /OSGI-INF/metatype/testfile.xml
> > > - the icons referred to are icons/icon.bmp
> > > - the icons are located in the /icons folder
> > >
> > > Applying my baseURL logic this would be:
> > >
> > > baseURL = bundle:/bundle5.0/OSGI-INF/metatype/testfile.xml
> > > url = bundle:/bundle5.0/OSGI-INF/metatype/icons/icon.bmp
> > >
> > > So my question is whether my logic with the baseURL is correct (and
> > > thus the test setup and expectations wrong) or is my logic wrong
> > > (and thus the test correct) ?
> > >
> > > The test in question is TestControl.testObjectClassDefinition.
> > >
> > > Thank you very much.
> > >
> > > Regards
> > > Felix
> > > _______________________________________________
> > > OSGi Core Platform Expert Group
> > > [email protected]
> > > https://mail.osgi.org/mailman/listinfo/cpeg
> > > All email submissions and replies to OSGi Alliance email addresses
> > > are subject to the terms and conditions of the OSGi Alliance
> > > membership agreement.
> > > _______________________________________________
> > OSGi Core Platform Expert Group
> > [email protected]
> > https://mail.osgi.org/mailman/listinfo/cpeg
> > All email submissions and replies to OSGi Alliance email addresses
> > are subject to the terms and conditions of the OSGi Alliance
> > membership agreement.
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev