vin3e Posted December 11, 2009 Share Posted December 11, 2009 Right guys,I'm so sorry to keep asking you guys for help but I'm finding this little assignment quite confusing. The question asks: "Design a data model (and represent that as an XML DTD) which could describe a bibliographic and publisher database". I have chosen to come up with a library of Children's from ranging from Harry Potter to The Very Hungry Caterpillar but I do not know what the question is asking me to do.I have already written an XML file with all data surrounding 20 books e.g. shown below.<?xml version="1.0"?><?xml-stylesheet type="text/css" href="libcss.css"?><!DOCTYPE library SYSTEM "Librarylist.dtd"><library> <author> <firstname>J.K.</firstname> <lastname>Rowling</lastname> </author> <book> <id>JK01</id> <book_title>Harry Potter and The Philosopher's Stone</book_title> <publisher>Bloomsbury</publisher> <year>1997</year> <book_no>Book 1</book_no> </book></library>]And then i've written a very basic DTD which is:<!ELEMENT author (firstname?, lastname)><!ELEMENT firstname (#PCDATA)><!ELEMENT lastname (#PCDATA)><!ELEMENT book (author+, book_title, publisher, book_no, year)><!ELEMENT book_title (#PCDATA)><!ELEMENT publisher (#PCDATA)><!ELEMENT book_no (#PCDATA)><!ELEMENT year (#PCDATA)><!ELEMENT image (#PCDATA)>From here on, I do not know if I am heading in the right direction of the question. "Does my XML DTD represent my chose data model?".If anyone with any sort of help please help a stressed individual out, it would be very appreciative. Link to comment Share on other sites More sharing options...
vin3e Posted December 11, 2009 Author Share Posted December 11, 2009 Sigh at lack of responses :( Link to comment Share on other sites More sharing options...
shought Posted December 12, 2009 Share Posted December 12, 2009 Maybe because most have no idea what exactly you're asking? I for one don't... :( Link to comment Share on other sites More sharing options...
vin3e Posted December 12, 2009 Author Share Posted December 12, 2009 QQBasically, I dont understand the question and thought I would ask people to interpret it in their own words to make it understandable for me.I don't know if they question is asking me to create more than just an XML and DTD because the amount of work seems very little, especially for a 40% weighted assignment :(I hope thats more easier to understand. Link to comment Share on other sites More sharing options...
rashad Posted December 13, 2009 Share Posted December 13, 2009 I suggest you read the following here and here (navigate to next pages)After reading I would suggest the following changeseither go with<library> <authors> <author><id>something</id><firstname></firstname>...</author> <author>...</author> </authors> <books> <book><authorid>something</authorid><title></title>...</book> <book><authorid></authorid>...</book> <books><library>- Or -<library> <author> <firstname></firstname> <book>...</book> <book>...</book> <book>...</book> </author> <author> </author><library>Hope this helpsuse this page with IE to validate your findingson a side note you probably want to ask such questions in more specialized development forums in the future Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.