the whole question is in the title: is it possible to assign specific IDREF to a specific ID in DTD? I'm pretty sure it's not possible, but I just want to confirm it here :P
E.g. I have a client and worker elements with attributes of type ID, and "order" element with two attributes that should refer to the client making order and to a worker that receives the order. Simplified code from DTD:
<!ELEMENT worker (name, salary, employmDate)>
<!ATTLIST worker worker_id ID #REQUIRED subordinates IDREFS #IMPLIED>
<!ELEMENT client (name)>
<!ATTLIST client client_id ID #REQUIRED>
<!ELEMENT order (price, date)>
<!ATTLIST order cl_id IDREF #REQUIRED wrkr_id IDREF #REQUIRED>
Code works properly, there are no errors when validating, I have to use ID values for workers and clients and can add IDs of workers in "subordinates" argument for any worker.
However, I can write also client's ID as a subordinate or in case of an order element, I can use client's ID value for "wrkr_id" and worker's ID for "cl_id". Is there a way to constrain an IDREF to accept only IDs of one kind? Or maybe there's a way put constraints on ID attributes to make workers' IDs start with e.g. "w" and client's IDs start with e.g. "c" which would solve this problem at least partially?
Please, refrain from suggesting other sollutions than DTD. If it's possible, I want to do it in DTD as this is an assignment for my course and it has to be done in DTD if possible.
Thanks!