Yes. The osversion value should be in quotes. You can see that one of the 
examples in section 3.9 uses quotes.

A producer of manifest data should be very strict. However a consumer of 
manifest data can be more forgiving.
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[EMAIL PROTECTED]

office: +1 386 848 1781
mobile: +1 386 848 3788




David Kemper <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
2007-08-01 14:39
Please respond to
OSGi Developer Mail List <[email protected]>


To
[email protected]
cc

Subject
[osgi-dev] header parsing question






All,

As I am writing tools that parse OSGi metadata I've run across a 
minor issue that bothers me.

 From the 4.1 version of the Core Specification, Section 3.2.1.12 
gives the example Bundle-NativeCode:

     /lib/http.DLL; osname = QNX; osversion = 3.1

According to 3.2.3 Common Header Syntax:

     header ::= clause ( ',' clause ) *
     clause ::= ( ';' path ) * ( ';' parameter ) *

Thus the "osversion = 3.1" is a parameter.

According to 1.3.2 General Syntax Definitions

     parameter ::= directive | attribute
     attribute ::= token '=' argument

Thus "osversion = 3.1" is an attribute, and 3.1 is the argument.

Also according to 1.3.2 General Syntax Definitions

     argument ::= token | quoted-string

The argument 3.1 is not a quoted string, thus it is a token, which is

     token ::= ( alphanum | '_' | '-' )+
     alphanum ::= alpha | digit
     alpha ::= [a..zA..Z]
     digit ::= [0..9]

Well, 3.1 contains a period/dot, which is *not* a valid token character.

Shouldn't the 3.1 be in quotes, as in

     /lib/http.DLL; osname = QNX; osversion = "3.1"

Am I missing something?  How rigorous or forgiving should a header 
parser be?  How rigorous is OSGi metadata in practice?

/djk

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


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

Reply via email to