You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Dave Smith <di...@gmail.com> on 2005/02/16 15:58:59 UTC

Hivemind Service IDs

All,

I'm a happy user of Hivemind 1.0, but have run into a rather strange
problem. I'm using service IDs to help select an interface based off
information that arrives in the system via a network protocol.
Unfortunately, the information that I'm keying off of is a URN from a
bit of XML -- along the lines of "urn:foo:bar".

So, why does Hivemind require that IDs only have alphanumeric
characters? Is there something I'm missing here?

Thanks,

D.

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Hivemind Service IDs

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
I believe Hivemind id's are mapped to java namespaces more than anything  
else, following package name and class syntax. For one it allows  
shortcutting service interface names (new addition in 1.1) when the module  
is declared to be in the same namespace as the interface.  No need to type  
the fully qualified class name for it in the descriptor.

Cheers,

Johan

On Wed, 16 Feb 2005 12:55:25 -0700, Dave Smith <di...@gmail.com> wrote:

> My reading of the XML spec is that IDs must be a "Name" production.
> Specifically see section 3.3.1, validity constrains on ID:
>
> "Values of type ID must match the Name production."
>
> And from section 2.3 of the spec:
>
> "[Definition:] A Name is a token beginning with a letter or one of a
> few punctuation characters, and continuing with letters, digits,
> hyphens, underscores, colons, or full stops, together known as name
> characters."
>
> All of the above would imply that hivemind is being unnecessarily
> strict on what IDs may be. Or is there some piece of functionality in
> Hivemind that requires a particular format on those ids?
>
> D.
>
>
> On Wed, 16 Feb 2005 14:45:09 -0300, Marcus Brito <mb...@gmail.com>  
> wrote:
>> > So, why does Hivemind require that IDs only have alphanumeric
>> > characters? Is there something I'm missing here?
>>
>> Not hivemind per se, but the XML specification. "id" attributes are
>> declared in the DTD as ID types, which, according to the XML
>> specification, should be a string composed only from letters and
>> numbers.
>>
>> -- Marcus Brito
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
>



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


RE: Hivemind Service IDs

Posted by Hal Hildebrand <ha...@hellblazer.com>.
I'd like to see "-" as a valid character as well.  I understand the shortcut
new in 1.1, but it seems like one can easily accommodate this by simply not
throwing an error if characters are included which aren't valid Java package
names.

-----Original Message-----
From: Knut Wannheden [mailto:knut.wannheden@gmail.com]  

HiveMind does actually not rely on XML's ID type for the various "id"
attributes in module descriptors. The currently enforced pattern for
IDs is "[a-zA-Z0-9_]+". A module's ID may consist of multiple such
segments separated by a dot.

The only non-alphanumeric character currently allowed is underscore.
(So it's effectively equal to the regex word character class "\w".)  I
suppose you'd like to see the colon as a further legal character...
Howard, what's your opinion on this?

--knut

On Wed, 16 Feb 2005 12:55:25 -0700, Dave Smith <di...@gmail.com> wrote:
> My reading of the XML spec is that IDs must be a "Name" production.
> Specifically see section 3.3.1, validity constrains on ID:
> 
> "Values of type ID must match the Name production."
> 
> And from section 2.3 of the spec:
> 
> "[Definition:] A Name is a token beginning with a letter or one of a
> few punctuation characters, and continuing with letters, digits,
> hyphens, underscores, colons, or full stops, together known as name
> characters."
> 
> All of the above would imply that hivemind is being unnecessarily
> strict on what IDs may be. Or is there some piece of functionality in
> Hivemind that requires a particular format on those ids?
> 
> D.
> 
> 
> On Wed, 16 Feb 2005 14:45:09 -0300, Marcus Brito <mb...@gmail.com> wrote:
> > > So, why does Hivemind require that IDs only have alphanumeric
> > > characters? Is there something I'm missing here?
> >
> > Not hivemind per se, but the XML specification. "id" attributes are
> > declared in the DTD as ID types, which, according to the XML
> > specification, should be a string composed only from letters and
> > numbers.
> >
> > -- Marcus Brito
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Hivemind Service IDs

Posted by Knut Wannheden <kn...@gmail.com>.
HiveMind does actually not rely on XML's ID type for the various "id"
attributes in module descriptors. The currently enforced pattern for
IDs is "[a-zA-Z0-9_]+". A module's ID may consist of multiple such
segments separated by a dot.

The only non-alphanumeric character currently allowed is underscore.
(So it's effectively equal to the regex word character class "\w".)  I
suppose you'd like to see the colon as a further legal character...
Howard, what's your opinion on this?

--knut

On Wed, 16 Feb 2005 12:55:25 -0700, Dave Smith <di...@gmail.com> wrote:
> My reading of the XML spec is that IDs must be a "Name" production.
> Specifically see section 3.3.1, validity constrains on ID:
> 
> "Values of type ID must match the Name production."
> 
> And from section 2.3 of the spec:
> 
> "[Definition:] A Name is a token beginning with a letter or one of a
> few punctuation characters, and continuing with letters, digits,
> hyphens, underscores, colons, or full stops, together known as name
> characters."
> 
> All of the above would imply that hivemind is being unnecessarily
> strict on what IDs may be. Or is there some piece of functionality in
> Hivemind that requires a particular format on those ids?
> 
> D.
> 
> 
> On Wed, 16 Feb 2005 14:45:09 -0300, Marcus Brito <mb...@gmail.com> wrote:
> > > So, why does Hivemind require that IDs only have alphanumeric
> > > characters? Is there something I'm missing here?
> >
> > Not hivemind per se, but the XML specification. "id" attributes are
> > declared in the DTD as ID types, which, according to the XML
> > specification, should be a string composed only from letters and
> > numbers.
> >
> > -- Marcus Brito
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Hivemind Service IDs

Posted by Dave Smith <di...@gmail.com>.
My reading of the XML spec is that IDs must be a "Name" production.
Specifically see section 3.3.1, validity constrains on ID:

"Values of type ID must match the Name production."

And from section 2.3 of the spec:

"[Definition:] A Name is a token beginning with a letter or one of a
few punctuation characters, and continuing with letters, digits,
hyphens, underscores, colons, or full stops, together known as name
characters."

All of the above would imply that hivemind is being unnecessarily
strict on what IDs may be. Or is there some piece of functionality in
Hivemind that requires a particular format on those ids?

D.


On Wed, 16 Feb 2005 14:45:09 -0300, Marcus Brito <mb...@gmail.com> wrote:
> > So, why does Hivemind require that IDs only have alphanumeric
> > characters? Is there something I'm missing here?
> 
> Not hivemind per se, but the XML specification. "id" attributes are
> declared in the DTD as ID types, which, according to the XML
> specification, should be a string composed only from letters and
> numbers.
> 
> -- Marcus Brito
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Hivemind Service IDs

Posted by Marcus Brito <mb...@gmail.com>.
> So, why does Hivemind require that IDs only have alphanumeric
> characters? Is there something I'm missing here?

Not hivemind per se, but the XML specification. "id" attributes are
declared in the DTD as ID types, which, according to the XML
specification, should be a string composed only from letters and
numbers.

-- Marcus Brito

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org