The people in charge of Little League would like to make league standings availa
ID: 664202 • Letter: T
Question
The people in charge of Little League would like to make league standings available on the Internet. At present, the only way they know how to do this is to have someone go into the HTML pages on the web site and make modifications by hand, but they would like is to have you create an XML file containing game information – that is, a file with each game’s vital statistics listed. This file is the one which they expect to have the administrator modify as game results are entered – the administrator will modify this file, and when the web site is accessed, the XML file will be used to create a web page containing updated information.
League Info:
-The League will be fielding six teams this year. Each team is scheduled to play the other teams twice – so each team will play ten games, and the league will have a total of thirty games on its schedule.
-The league allows ties to happen.
-When the page is first accessed, it should display the league standings – a list of teams with wins, losses, and ties. Only completed games should be included in the standings.
-The page should also provide a drop-down box which will allow the visitor to select the name of a team. When a team is selected, the page should display a list of the games on that team’s schedule – whether they have been played or are still pending.
Project Specifics:
- You will be defining a document type of Schedule.
- Schedule should have one attribute: The season (year) to which it applies.
- The Schedule will contain an indefinite number of Games (at least one).
- Each Game should have a Status of either Pending or Played.
- Each Game should contain the elements: Host_Team, Away_Team, Date, Host_Team_Score, and Away_Team_Score.
- Please define your own team names.
Project Steps:
- Create a mockup of the page to show how it will look.
- Create a DTD or Schema which defines a Schedule document.
- Create an XML document containing information about the games on the schedule (thirty of them)
- Create the documents which will present the information through a web interface (web site). The calculations may be done using whatever technology you wish, including CSS, XSL transforms, Meunchian grouping, DOM, and Javascript.
Explanation / Answer
Step 1: Page mock up as a demo - a picture will be included here
Step 2: DTD = Document Type Definition:
<!DOCTYPE schedule
[
<!ELEMENT schedule (date,time,venue,team1, team2)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT time (#PCDATA)>
<!ELEMENT venue (#PCDATA)>
<!ELEMENT team1 (#PCDATA)>
<!ELEMENT team2 (#PCDATA)>
]>
<?xml version="1.0" encodig="UTF-8"?>
<xsl:stylesheet version="1.0"
<xsl:variable
name="scheduleVar" select="Schedule1"
<xsl:variable name="dateVar" select="'15July2015'" />
<xsl:variable name="timeVar" select="4pm" />
<xsl:variable name="venueVar" select="ArthurAshStadium" />
<xsl:variable name="team1Var" select="teamA" />
<xsl:variable name="team2Var" select="teamE" />
/> <!-- end of tag xsl var schedule 1 - there will be 30 schedules like this -->
<xsl:variable
name="scheduleVar" select="Schedule2"
<xsl:variable name="dateVar" select="'15July2015'" />
<xsl:variable name="timeVar" select="7am" />
<xsl:variable name="venueVar" select="ArthurAshStadium" />
<xsl:variable name="team1Var" select="teamA" />
<xsl:variable name="team2Var" select="teamB" />
/> <!-- end of tag xsl var schedule 2 of 30 -->
<xsl:variable <!-- start of tag schedule 3 -->
name="scheduleVar" select="Schedule3"
<xsl:variable name="dateVar" select="'16July2015'" />
<xsl:variable name="timeVar" select="7am" />
<xsl:variable name="venueVar" select="PatCashStadiumAustralia" />
<xsl:variable name="team1Var" select="teamD" />
<xsl:variable name="team2Var" select="teamF" />
/> <!-- end of tag xsl var schedule 3 of 30 -->
<xsl:variable <!-- start of tag schedule 4 -->
name="scheduleVar" select="Schedule4"
<xsl:variable name="dateVar" select="'19July2015'" />
<xsl:variable name="timeVar" select="7am" />
<xsl:variable name="venueVar" select="NadalStadiumUSA" />
<xsl:variable name="team1Var" select="teamB" />
<xsl:variable name="team2Var" select="teamF" />
/> <!-- end of tag xsl var schedule 4 of 30 -->
<xsl:variable <!-- start of tag schedule 5-->
name="scheduleVar" select="Schedule5"
<xsl:variable name="dateVar" select="'19July2015'" />
<xsl:variable name="timeVar" select="9am" />
<xsl:variable name="venueVar" select="JimmyCornersStadiumUS" />
<xsl:variable name="team1Var" select="teamD" />
<xsl:variable name="team2Var" select="teamB" />
/> <!-- end of tag xsl var schedule 5 of 30 -->
<xsl:variable <!-- start of tag schedule 6 -->
name="scheduleVar" select="Schedule6"
<xsl:variable name="dateVar" select="'22July2015'" />
<xsl:variable name="timeVar" select="11am" />
<xsl:variable name="venueVar" select="PatCashStadium" />
<xsl:variable name="team1Var" select="teamF" />
<xsl:variable name="team2Var" select="teamB" />
/> <!-- end of tag xsl var schedule 6 of 30 -->
<xsl:variable <!-- start of tag schedule 7 -->
name="scheduleVar" select="Schedule7"
<xsl:variable name="dateVar" select="'24July2015'" />
<xsl:variable name="timeVar" select="2pm" />
<xsl:variable name="venueVar" select="BijornBorgStadiumSweedan" />
<xsl:variable name="team1Var" select="teamC" />
<xsl:variable name="team2Var" select="teamE" />
/> <!-- end of tag xsl var schedule 7 of 30 -->
<xsl:variable <!-- start of tag schedule 7+1 -->
name="scheduleVar" select="Schedule7P1"
<xsl:variable name="dateVar" select="'26July2015'" />
<xsl:variable name="timeVar" select="4pm" />
<xsl:variable name="venueVar" select="NehruStadiumIndia" />
<xsl:variable name="team1Var" select="teamF" />
<xsl:variable name="team2Var" select="teamB" />
/> <!-- end of tag xsl var schedule 9 of 30 -->
<xsl:variable <!-- start of tag schedule 9 -->
name="scheduleVar" select="Schedule9"
<xsl:variable name="dateVar" select="'1JAug2015'" />
<xsl:variable name="timeVar" select="7am" />
<xsl:variable name="venueVar" select="BijornBorgStadiumSweeden" />
<xsl:variable name="team1Var" select="teamA" />
<xsl:variable name="team2Var" select="teamD" />
/> <!-- end of tag xsl var schedule 9 of 30 -->
<!-- the above expanded coding can be replaced with the following code as we will use loops and drop downs -->
<!-- using ASP.NET to handle the loops -->
<html>
<body>
@for(var scheduleNumber = 1; scheduleNumber < 30; scheduleNumber++)
{ <p> Conducting Lawn Tennis League Schedule @scheduleNumber</p>}
<ul>
@foreach ( schNum in Request.ServerVariables)
{ <li>@schNum</li>}
</ul>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SampleTennisScheduler</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Titillium</p> <p>+Web:900,700italic,700,600,400italic,400">
<link rel="stylesheet" href="css/rm.css">
</head>
<body>
<!--[if lt IE10]>
<script>
alert("Sorry, Internet Explorer doesn't support the technology used on SampleTennisScheduler.
Please use Chrome, Firefox, or Safari");
</script>
<![endif]-->
<nav class="navbar navbar-inverse" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<div id="toggle-navbar-links">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-
target="#navbar-links">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="brand" class="col-xs-10 col-sm-9">
<a href="/"><img src="img/RMLogo.png"></a>
</div>
</div>
<div class="collapse navbar-collapse" id="navbar-links">
<ul class="nav navbar-nav navbar-right">
<li id="sign-in-1" class="btn btn-lg signin-btn hidden-sm">
<a href="signin">Already Have An Account? Sign In</a>
</li>
<li class="btn btn-lg signup-btn early-access">
Book in Advance
</li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div id="landing-highlight" class="row">
<h1>IT'S TIME COACHES SCHEDULED DIFFERENTLY</h1>
<div class='col-lg-offset-1 col-sm-6 col-lg-6'>
<img src="img/screenshot.png" width="100%">
</div>
<div class="col-sm-5 col-lg-3">
<h4>The internet helps you with everything, why not game scheduling?</h4>
<p>SampleTennisScheduler is a collaborative web tool which allows college coaches to schedule
out of conference games efficiently.</p>
<p>SampleTennisScheduler provides coaches with real time knowledge of the scheduling landscape
and allows coaches to make more informed decisions about who they play.</p>
</div>
</div>
<div class="row benefits inverse">
<div class="col-sm-offset-1 col-md-offset-2 col-lg-offset-3 col-xs-7 col-sm-6 col-md-5 col-lg-4">
<h4>SampleTennisScheduler removes the tedium & saves time</h4>
<ul id="lightning-list" class="fa-ul">
<li><i class="fa fa-li fa-bolt"></i> No more pulling together resources to attempt to figure
out who is available on any given date.</li>
<li><i class="fa fa-li fa-bolt"></i> No more cold calling. No more browsing outdated message
boards.</li>
<li><i class="fa fa-li fa-bolt"></i> No more guesswork.</li>
</ul>
</div>
<div class="col-xs-5 col-sm-4 col-md-3 col-lg-2">
<img src="img/RMClock.png" width="100%">
</div>
<div class="col-sm-offset-1 col-md-offset-1 col-lg-offset-3"></div>
</div>
<div class="row benefits">
<div class="col-sm-offset-1 col-md-offset-2 col-lg-offset-3 col-xs-5 col-sm-4 col-md-3 col-lg-2">
<img src="img/lock.png" width="100%">
</div>
<div class="col-xs-7 col-sm-6 col-md-5 col-lg-4">
<h4>Secure Agreements & Transactions</h4>
<ul class="fa-ul">
<li><i class="fa fa-li fa-check"></i> A SampleTennisScheduler account is Free</li>
<li><i class="fa fa-li fa-check"></i> Only pay commissions on guaranteed games</li>
<li><i class="fa fa-li fa-check"></i> Rock-solid agreements and secure transactions will get
your schedule filled fast with brand new rivalries</li>
</ul>
</div>
<div class="col-sm-offset-1 col-md-offset-2 col-lg-offset-3"></div>
</div>
<div id="coach-hook" class="row">
<h2>Think about it, Coach</h2>
</div>
<div id="cta-sign-x" class="row">
<div class="col-sm-6"></div>
<div class="col-sm-6">
<h3>Now seeking basketball coaches and athletic directors for early access.</h3>
<button class="btn btn-lg signup-btn early-access">Get early access</button>
<a id="sign-in-2" class="btn btn-lg signin-btn" href="signin">Already Have
An Account? Sign In</a>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-2">
<img src="img/RMLogoFoot.png" width="100%">
</div>
<div class="col-xs-12 col-sm-4 col-md-3">
<br><br>
<span>© 2014 SampleTennisScheduler. All Rights Reserved</span>
</div>
<div class="col-xs-12 col-sm-4 col-md-6 pull-right">
<br><br>
<ul>
<li>
<a href="https://twitter.com/SampleTennisScheduler" class="twitter-follow-button" data-
show-count="false">Follow @SampleTennisScheduler</a>
</li>
<li class="early-access">
<a>Book in Advance</a>
</li>
<li>
<a href="mailto:info@SampleTennisScheduler.com" target="_top"
style="color:white">CONTACT</a>
</li>
</ul>
</div>
</div>
</div>
<div class="modal fade" id="early-access-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-content modal-dialog">
<div class="modal-header">
<button id="early-access-close" type="button" class="close" data-dismiss="modal" aria-
hidden="true">×</button>
<span id="early-access-wait" type="button" class="hide pull-right" aria-hidden="true">
<i class="fa fa-spinner fa-spin"></i>
</span>
<h1 class="modal-title">Book in Advance</h1>
</div>
<div class="modal-body">
<form id="early-access-form">
<div class="form-group">
<label for="early-access-name">Name</label>
<div class="row">
<div class="col-xs-6">
<input type="text" class="form-control" id="early-access-fname" placeholder="First
name" required>
</div>
<div class="col-xs-6">
<input type="text" class="form-control" id="early-access-lname" placeholder="Last name"
required>
</div>
</div>
</div>
<div class="form-group">
<label for="early-access-email">Email address</label>
<input type="email" class="form-control" id="early-access-email" placeholder="Enter email"
data-parsley-endswith=".edu">
</div>
<div class="form-group">
<label for="early-access-college">College</label>
<input type="text" class="form-control" id="early-access-college" placeholder="Your school"
required>
</div>
<div class="form-group">
<label for="early-access-email">Role</label>
<div id="early-access-role">
<label class="radio-inline">
<input type="radio" name="early-access-user-role" id="early-access-role-1"
value="coach" checked="checked"> A Coach
</label>
<label class="radio-inline">
<input type="radio" name="early-access-user-role" id="early-access-role-2" value="ad">
An Athletic Director
</label>
</div>
</div>
<div class="form-group">
<label for="early-access-sport">Sport</label>
<select id="early-access-sport" class="form-control">
<option>Women's Basketball</option>
<option>Men's Basketball</option>
<option>Men's LawnTennisl</option>
<option>Football</option>
<option>Baseball</option>
<option>Softball</option>
<option>LawnTennis</option>
<option>Other (Please sign up anyways)</option>
</select>
</div>
</form>
</div>
<div class="modal-footer">
<span id="early-access-disclaimer" class="pull-left">By submitting this form, you agree that
SampleTennisScheduler may contact you via email about early access to the application.</span>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button id="early-access-submit" type="button" class="btn btn-danger">Submit</button>
</div>
</div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-51925527-1', 'auto');
ga('send', 'pageview');
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"
type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.1/js/bootstrap.min.js"
type="text/javascript"></script>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],
p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){
js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';
fjs.parentNode.insertBefore(js,fjs);
}}(document, 'script', 'twitter-wjs');
</script>
<script src="js/lib/notify.min.js" type="text/javascript"></script>
<script src="js/home.js" type="text/javascript"></script>
</body>
</html>
<!-- can delete the following template tag after code completion-->
<xsl:variable <!-- start of tag schedule -->
name="scheduleVar" select="ScheduleN"
<xsl:variable name="dateVar" select="'15July2015'" />
<xsl:variable name="timeVar" select="7am" />
<xsl:variable name="venueVar" select="WhichStadium" />
<xsl:variable name="team1Var" select="teamA" />
<xsl:variable name="team2Var" select="teamB" />
/> <!-- end of tag xsl var schedule of 30 -->
<!-- can delete the above template tag after code completion-->
<xsl:variable name="" select="" />
</xsl:variable>
<!DOCTYPE schedule SYSTEM "Schedule.dtd">
<schedule>
<date>
<
<!-- xml hints starts here
xml hints ends here -->
************* Text below can be ignored as they are already given in the question itself ****************
Project Specifics:
- You will be defining a document type of Schedule.
- Schedule should have one attribute: The season (year) to which it applies.
- The Schedule will contain an indefinite number of Games (at least one).
- Each Game should have a Status of either Pending or Played.
- Each Game should contain the elements: Host_Team, Away_Team, Date, Host_Team_Score, and Away_Team_Score.
- Please define your own team names.
Project Steps:
- Create a mockup of the page to show how it will look.
- Create a DTD or Schema which defines a Schedule document.
- Create an XML document containing information about the games on the schedule (thirty of them)
- Create the documents which will present the information through a web interface (web site). The calculations may be done using whatever technology you wish, including CSS, XSL transforms, Meunchian grouping, DOM, and Javascript.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.