anorakgirl
Programmer
hi,
i'm trying to write a dtd, and am trying to use ids and idrefs to constrain certain attributes. the problem i have is this - say i define a "test" element, with attributes for
areas and users both of which are idrefs:
i'm trying to write a dtd, and am trying to use ids and idrefs to constrain certain attributes. the problem i have is this - say i define a "test" element, with attributes for
areas and users both of which are idrefs:
Code:
<!ELEMENT users(user+)>
<!ELEMENT user(#PCDATA)>
<!ATTLIST user
userid ID #REQUIRED
>
<!ELEMENT areas(area+)>
<!ELEMENT area(#PCDATA)>
<!ATTLIST area
areaid ID #REQUIRED
>
<!ELEMENT test (step+)>
<!ATTLIST test
areas IDREFS #REQUIRED
users IDREFS #REQUIRED
>
[code]
as far as i can see, this doesn't stop me from using the id of a [COLOR=blue]user[/color] in the [COLOR=blue]areas[/color] attribute of the test element and vice versa. am i missing something? is there a way to do this?
cheers for any help! ~ [URL unfurl="true"]www.anorakgirl.co.uk[/URL] ~