Page 1 of 1 |
|
|
Back to top |
|
 |
garus
VIP Member
Posts: 34197
|
Posted: Fri, 31st Jan 2014 14:45 Post subject: |
|
 |
snip
Last edited by garus on Tue, 27th Aug 2024 21:51; edited 1 time in total
|
|
Back to top |
|
 |
|
|
Back to top |
|
 |
Werelds
Special Little Man
Posts: 15098
Location: 0100111001001100
|
Posted: Fri, 31st Jan 2014 14:55 Post subject: |
|
 |
Plenty of DTD generators (as well as the reverse) to be found. Use this thing called Google to find them, I heard it works pretty well 
|
|
Back to top |
|
 |
Przepraszam
VIP Member
Posts: 14512
Location: Poland. New York.
|
Posted: Fri, 31st Jan 2014 15:00 Post subject: |
|
 |
Learn it yourself 
|
|
Back to top |
|
 |
|
Posted: Fri, 31st Jan 2014 15:04 Post subject: |
|
 |
no time!!!
3080 | ps5 pro
Sin317-"im 31 years old and still surprised at how much shit comes out of my ass actually ..."
SteamDRM-"Call of Duty is the symbol of the true perfection in every aspect. Call of Duty games are like Mozart's/Beethoven's symphonies"
deadpoetic-"are you new to the cyberspace?"
|
|
Back to top |
|
 |
Przepraszam
VIP Member
Posts: 14512
Location: Poland. New York.
|
Posted: Fri, 31st Jan 2014 15:05 Post subject: |
|
 |
There is always time, less video games. 
|
|
Back to top |
|
 |
|
|
Back to top |
|
 |
Werelds
Special Little Man
Posts: 15098
Location: 0100111001001100
|
|
Back to top |
|
 |
Przepraszam
VIP Member
Posts: 14512
Location: Poland. New York.
|
Posted: Fri, 31st Jan 2014 15:37 Post subject: |
|
 |
|
|
Back to top |
|
 |
|
Posted: Fri, 31st Jan 2014 15:53 Post subject: |
|
 |
|
|
Back to top |
|
 |
Werelds
Special Little Man
Posts: 15098
Location: 0100111001001100
|
Posted: Fri, 31st Jan 2014 16:02 Post subject: |
|
 |
Yeah the point was more to show you how fucking easy you can get an assignment like this done
I just sort of figured I'd put most of that shit in there just to cover most bases. For you though, just create some valid XML, run it through the DTD generator and presto, assignment done. I'm sure you can explain its contents if they ask you. It'll be good enough for most unis 
|
|
Back to top |
|
 |
|
|
Back to top |
|
 |
|
Posted: Fri, 31st Jan 2014 17:04 Post subject: |
|
 |
is that ok? its over 50 lines. no repeats (i think) and triple nests. now I need help with DTD. generators make it some crazy long stuff. I dont think its ok
Code: | <?xml version="1.0" encoding="UTF-8"?>
<game>
<Title>Final Fantasy XX</Title>
<Developer>Square Enix</Developer>
<genre>Roleplaying game</genre>
<theme>
<setting1>
<name>Fantasy</name>
<TimePeroid>
<StartingYear>2697</StartingYear>
<EndingYear>2702</EndingYear>
</TimePeroid>
</setting1>
<setting2>
<name>SciFi</name>
<TimePeroid>
<StartingYear>4587</StartingYear>
<EndingYear>4588</EndingYear>
</TimePeroid>
</setting2>
</theme>
<Platforms>
<MainPlatform>
<name>xbox360</name>
<source>original</source>
<releaseDate>31.12.2060</releaseDate>
<framerate>60</framerate>
</MainPlatform>
<SecondaryPlatform>
<name>PC</name>
<source>port</source>
<releaseDate>31.12.2061</releaseDate>
<framerate>30</framerate>
</SecondaryPlatform>
</Platforms>
<Protagonist>
<name>Bubsy</name>
<surname>3d</surname>
<age>44</age>
<skills>
<drivableVechicles>
<vehicle1>manta</vehicle1>
<vehicle2>futureBike</vehicle2>
</drivableVechicles>
<specialPowers>
<power1>eating</power1>
<food1>hamster</food1>
<food2>fantasyMushrooms</food2>
<power2>usingBrain</power2>
</specialPowers>
</skills>
</Protagonist>
<review>
<socre>
<ByEditors>
<editor1>
<name>Joseph Gamer</name>
<socre>10/10</socre>
</editor1>
<editor2>
<name>IGNjoe</name>
<socre>11/10</socre>
</editor2>
</ByEditors>
</socre>
<text>Amazing piece of art</text>
<pros>
<pros1>everything is amazing</pros1>
</pros>
<cons>
<con1>nothing. Game is PERFECT</con1>
</cons>
</review>
</game> |
3080 | ps5 pro
Sin317-"im 31 years old and still surprised at how much shit comes out of my ass actually ..."
SteamDRM-"Call of Duty is the symbol of the true perfection in every aspect. Call of Duty games are like Mozart's/Beethoven's symphonies"
deadpoetic-"are you new to the cyberspace?"
|
|
Back to top |
|
 |
|
Posted: Fri, 31st Jan 2014 17:26 Post subject: |
|
 |
also. Is that DTD correct ?
Spoiler: |
<!ELEMENT ByEditors ( editor1, editor2 ) >
<!ELEMENT Developer ( #PCDATA ) >
<!ELEMENT EndingYear ( #PCDATA ) >
<!ELEMENT MainPlatform ( name, source, releaseDate, framerate ) >
<!ELEMENT Platforms ( MainPlatform, SecondaryPlatform ) >
<!ELEMENT Protagonist ( name, surname, age, skills ) >
<!ELEMENT SecondaryPlatform ( name, source, releaseDate, framerate ) >
<!ELEMENT StartingYear ( #PCDATA ) >
<!ELEMENT TimePeroid ( StartingYear, EndingYear ) >
<!ELEMENT Title ( #PCDATA ) >
<!ELEMENT age ( #PCDATA ) >
<!ELEMENT con1 ( #PCDATA ) >
<!ELEMENT cons ( con1 ) >
<!ELEMENT drivableVechicles ( vehicle1, vehicle2 ) >
<!ELEMENT editor1 ( name, socre ) >
<!ELEMENT editor2 ( name, socre ) >
<!ELEMENT food1 ( #PCDATA ) >
<!ELEMENT food2 ( #PCDATA ) >
<!ELEMENT framerate ( #PCDATA ) >
<!ELEMENT game ( Title, Developer, genre, theme, Platforms, Protagonist, review ) >
<!ELEMENT genre ( #PCDATA ) >
<!ELEMENT name ( #PCDATA ) >
<!ELEMENT power1 ( #PCDATA ) >
<!ELEMENT power2 ( #PCDATA ) >
<!ELEMENT pros ( pros1 ) >
<!ELEMENT pros1 ( #PCDATA ) >
<!ELEMENT releaseDate ( #PCDATA ) >
<!ELEMENT review ( socre, text, pros, cons ) >
<!ELEMENT setting1 ( name, TimePeroid ) >
<!ELEMENT setting2 ( name, TimePeroid ) >
<!ELEMENT skills ( drivableVechicles, specialPowers ) >
<!ELEMENT socre ( #PCDATA | ByEditors )* >
<!ELEMENT source ( #PCDATA ) >
<!ELEMENT specialPowers ( power1, food1, food2, power2 ) >
<!ELEMENT surname ( #PCDATA ) >
<!ELEMENT text ( #PCDATA ) >
<!ELEMENT theme ( setting1, setting2 ) >
<!ELEMENT vehicle1 ( #PCDATA ) >
<!ELEMENT vehicle2 ( #PCDATA ) > |
ok nvm. Made changes to both xml and dtd. Now its all good
3080 | ps5 pro
Sin317-"im 31 years old and still surprised at how much shit comes out of my ass actually ..."
SteamDRM-"Call of Duty is the symbol of the true perfection in every aspect. Call of Duty games are like Mozart's/Beethoven's symphonies"
deadpoetic-"are you new to the cyberspace?"
|
|
Back to top |
|
 |
|
Posted: Fri, 31st Jan 2014 19:17 Post subject: |
|
 |
havving setting1 and setting2 as node names is stupid, dont do it!
If they don't need any order you can have just
<settings>
<setting>
<data/>
</setting>
<setting>
<data/>
</setting>
<setting>
<data/>
</setting>
</settings>
and if order is required go for an attribute
<settings>
<setting priority="1">
<data />
</setting>
<setting priority="2">
<data />
</setting>
<setting priority="3">
<data />
</setting>
<setting priority="4">
<data />
</setting>
</settings>
Also aren't you allowed to use attributes?! Use logic to determine which values are more worth to keep in an attribute than in a node. F.e. if there'll be multiple instances, create a group for each possible item that can occur more than once.
|
|
Back to top |
|
 |
|
Posted: Fri, 31st Jan 2014 21:31 Post subject: |
|
 |
I've changed it but thanks for the tip. And dtd I posted is also changed now. It just wasnt in the "right" order
logic don't have much to do with it. Its just a simpliest xml possible.
3080 | ps5 pro
Sin317-"im 31 years old and still surprised at how much shit comes out of my ass actually ..."
SteamDRM-"Call of Duty is the symbol of the true perfection in every aspect. Call of Duty games are like Mozart's/Beethoven's symphonies"
deadpoetic-"are you new to the cyberspace?"
|
|
Back to top |
|
 |
ixigia
[Moderator] Consigliere
Posts: 65097
Location: Italy
|
Posted: Sat, 1st Feb 2014 01:05 Post subject: |
|
 |
|
|
Back to top |
|
 |
Page 1 of 1 |
All times are GMT + 1 Hour |