| Author |
IDREF AND IDREFS.
|
Vasudha Deepak
Ranch Hand
Joined: Mar 15, 2002
Posts: 86
|
|
Hi, The concept of using IDREF is not clear.I understand that using IDREFS enables us to have multiple unique values for an ID type attribute,but what exaclty is the purpose of an IDREF? Thanks, Vasudha
|
IBM Certified Developer -XML and Related Technologies(141)<br />SCJP2 SCWCD
|
 |
Karthik Guru
Ranch Hand
Joined: Mar 06, 2001
Posts: 1209
|
|
Consider a authorization store. You will typically have n users and they need to be assigned to specific roles. So you might want to declare role elements having attributes of type ID. Then you might associate users with the role using an attribute of type IDREF. <Role name="ADMIN" roleid="role_admin"/> <Role name="USER" roleid="role_user"/> <User name="Guido" assocrole="role_admin"/> <User name="Rossum" assocrole="role_user"/> and in the dtd <!ATTLIST Role roleid ID> <!ATTLIST User assocrole IDREF> If a user can have multiple roles then assocrole must be of the type IDREFS <User name="Rossum" assocrole="role_user role_admin"/>
|
 |
Vasudha Deepak
Ranch Hand
Joined: Mar 15, 2002
Posts: 86
|
|
|
Thanks a lot.
|
 |
 |
|
|
subject: IDREF AND IDREFS.
|
|
|