Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

idrefs in dtd

Status
Not open for further replies.

anorakgirl

Programmer
Jun 5, 2001
103
GB
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:
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] ~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top