[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-developers] RE: Ups and downs with Qube3 and Sausalito



On Fri, 19 Jan 2001 23:54:04 +0100 (MET), Victoriano Giralt wrote:

[snip]
> We have been succesful adding a new property to the user object, but afetr
> a more careful inspection of the schema, I have noticed that we will get a
> reprimand, because there is a comment at the top of the file saying that
> it cannot ne modified without Cobalts permission and that we better add a
> new namespace. Will some one be so kind to explain how to accomplish such
> task? We are running out of time and the little we have we need it for
> developing our app, not for trial and error and source reading, though it
> is really interesting and challenging as well as highly educational :)
[snip]
We'll it's like talking to myself. But I think this may be of interes to
someone else.

As I don't like being reprimanded, I have take some time off to think and
research. I have succesfully crearted a new namespace for adding a
property to the User class without disturbing the Cobalt supplied
schemata. The design is so elegant for its simplicity. Adding schemata is
a matter of adding your own directory hyerachy under
/usr/sausalito/schemas and then, in there, writing the proper ,schema
files with the XML definitions for typedefs, and classes. Here is mine
that creates a new type: userType, and the a new namespace for the user
class with a new property: userType. 

<typedef name="userType" type="re" data="^(U0|U1|U2|U3)$"/>

<class name="User" namespace="SES" version="1.0">
  <property name="userType" type="userType" readacl="ruleSelf" />
</class>

Then just /etc/rc.d/init.d/cced.init reload
and Bob's your uncle, just ask CCE for the new property under the proper
namespace, SES in my example.

Have a nice weekend.

Happy-hacking-ly yours, Vic

-------------------------------------------------------------------------------
G & S Sistemas de Informacion, S.L.  | Phones:
Victoriano Giralt                    |   Land line: +34-952-207-048
Chief Consultant and Owner           |   Mobile:    +34-670-332-720
Torre de San Telmo, 8                |   Fax:       Use e-mail, looks nicer
E-29018 Malaga (Spain)               | E-mail: vic@xxxxxxx
Member of ISOC (Andalusian Chapter)  | http://www.gssi.es/ 
-------------------------------------------------------------------------------