• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

IDREF AND IDREFS.

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic