[EMAIL PROTECTED] wrote on 2008/08/21 02:36:16 AM:

> [image removed] 
> 
> Re: [osgi-dev] Correct XML format for SCR?
> 
> Niclas Hedhman 
> 
> to:
> 
> OSGi Developer Mail List
> 
> 2008/08/21 03:02 AM
> 
> Sent by:
> 
> [EMAIL PROTECTED]
> 
> Please respond to OSGi Developer Mail List <[email protected]>
> 
> On Thu, Aug 21, 2008 at 8:03 AM, Carsten Ziegeler 
> <[EMAIL PROTECTED]> wrote:
> 
> > Usually namespaces in xml documents are used to qualify all elements
> > belonging to this domain, but YMMV of course.
> 
> Agree. The SCR spec should define a namespace and all nodes the spec
> mentions should belong to that namespace.

The DS spec does define the namespace. See 112.4.2. And all nodes in the 
schema DO belong to that namespace. The spec also allows for not using a 
namespace in the simple case of a document containing a single "root" 
component element to reduce the amount of XML cruft one must type.

> 
> BJ, unqualified nodes are just as good as the default package in Java,
> possible but strongly discouraged. 

I fail to see this is the case. Run the XML though a parser and you will 
see the parser reports the contained elements are part of the scr 
namespace. They are not in an empty namespace. The schema defines them to 
all be part of the scr namespace.

> And "prefixes" is only shorthand
> for the namespace, which can be "habba:" as far as the parser is
> concerned, as long as the xmlns:habba is present and referencing the
> correct namespace.

Well of course. Nowhere does the spec require the use of the prefix scr. 
It merely recommends it in 112.4.2. Nor did I claim that one must use a 
specific prefix. I simply use scr as a convenience for discussion.

> 
> 
> Cheers
> Niclas

-- 

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

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

Reply via email to