d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Dtd > Probably Easy Question?
Add Reply New Topic New Poll
Member
Posts: 1,849
Joined: May 31 2008
Gold: 2,571.50
Mar 17 2014 07:12pm
Code
<!ELEMENT exchangePerson (name, address, telephone, emailAddress, applicationDate, avaliableDate, birthCountry, dateOfBirth?,
age?, gender, schoolName, schoolAddress, yearInSchool?, parents?, emergencyTelephone,
feePaid, essay, languagesSpoken+, countryChoices+)>



--Assignment questions that im confused on below--
xix) Languages Spoken - must have 2 or more
xx) Country Choices -must have exactly 5

-- Process --
I am using http://www.w3schools.com/dtd/dtd_elements.asp but in that resource it isn't showing how to do a "range" type syntax. I also couldn't find a resource on google - or at least one my level of expertise could comprehend.

-- Question --
What would be the proper syntax for what im trying to do?
Member
Posts: 1,849
Joined: May 31 2008
Gold: 2,571.50
Mar 17 2014 08:09pm
Shit to late to edit but, is it also possible to:

If my exchangePerson has an attribute value of either (S|T) -- student or teacher. Is it possible to make other elements "optional" based off if its teacher or student attribute value?? My teacher worded it like:

viii) Date of Birth – optional; students only
ix) Age – optional; students only

not sure if she means just to make the element optional like i did, or if I'm suppose to add logic. If no reply I will assume just optional and not logic.

This post was edited by Noobtard on Mar 17 2014 08:10pm
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll