- From: <Matthew_Tolman@ovid.com>
- Date: Thu, 20 Jan 2000 14:06:17 -0700
- To: www-xml-linking-comments@w3.org
I am working on an application for the storage and generation of XLinks. During the design of the application I realized that in an extended link you cannot create a link between two locators with the same role without making the link bi-directional. Even though the problem is solvable by assigning 'unqiue' roles to each locator, this is not a good solution because the role then simply degenerates into a unique identifier (in which case it should be called id and not role). Several examples where an arc between locators with the same role makes sense are shown below. Given some set of college courses we want to show prerequisites. Example with 'Normal' roles <xlink:extended role='prerequisites'> <xlink:locator href='/courses/cs101.xml' role='course'/> <xlink:locator href='/courses/cs102.xml' role='course'/> <xlink:locator href='/courses/cs201.xml' role='course'/> <xlink:locator href='/courses/cs202.xml' role='course'/> <xlink:arc from='course' to='course'/> </xlink:extended> This means that every course is a prerequisite of every other course... which is a problem Example with Unique roles: <xlink:extended role='prerequisites'> <xlink:locator href='/courses/cs101.xml' role='course1'/> <xlink:locator href='/courses/cs102.xml' role='course2'/> <xlink:locator href='/courses/cs201.xml' role='course3'/> <xlink:locator href='/courses/cs202.xml' role='course4'/> <xlink:arc from='course2' to 'course1'/> <xlink:arc from='course3' to 'course2'/> <xlink:arc from='course4' to 'course3'/> </xlink:extended> This is what I would like to accomplish except preferrably without the 'unique' roles. But unless I am not understanding the current draft correctly, I need to assign a unique role to each of these in order to create the necessary relationships. Another example which would require this would be children where you wanted to have younger-sibling or older-sibling relationship sets. Anyway, back to the implementation. Obviously, the easy, if not so nice solution is to assign multiple roles to each locator depending upon the context of the linking situation. Of course, this leads to duplicated storage space and greater implementation complexity. If anyone has any good ideas about how to represent/handle these cases in a more 'elegant' manner it would be greatly appreciated. Thanks, Matthew A Tolman Architect Ovid Technologies, Inc. P.S. I vote for arcs having roles as I would prefer to put the 'prerequisite' or 'younger-sibling' role on the arc rather than on xlink:extended.
Received on Thursday, 20 January 2000 16:06:26 UTC