SCHEME file:/c:sites\dept2\
ON department

$ ---------------------------------------------------------------------------------------------
$  HOME
$ ---------------------------------------------------------------------------------------------

DEFINE PAGE HomePage : "Computer Science Department"
STYLE sites\styles\verticalXML.STY(The Toy Department Home Page)
$STYLE sites\styles\vertical.STY(The Toy Department Home Page)
AS URL("index.html");
   ToResearchGroups : LINK-TO ResearchGroupListPage(
                                 URL ("index.html");
                                 GroupsLabel : TEXT = "Research Groups";
                              );
   ToPeople : LINK-TO PeopleListPage(
                                 URL ("index.html");
                                 PeopleLabel : TEXT = "People";
                              );
   ToCourses : LINK-TO EducationPage(
                                 URL ("index.html");
                                 CoursesLabel : TEXT = "Courses";
                              );
USING 
END


$ ---------------------------------------------------------------------------------------------
$  RESEARCH
$ ---------------------------------------------------------------------------------------------

DEFINE PAGE ResearchGroupListPage : "Research Groups"
STYLE sites\styles\verticalXML.STY(Research Groups)
$STYLE sites\styles\vertical.STY(Research Groups)
AS URL("index.html");
   GroupList : LIST-OF ( ToGroup : LINK-TO ResearchGroupPage(
                                                   URL (<GroupName>);
                                                   GroupName : TEXT = <GroupName>;
                                                );
                       );
USING ResearchGroup distinct
ORDER BY GroupName
END

DEFINE PAGE ResearchGroupPage : <GroupName>
STYLE sites\styles\verticalXML.STY(Research Groups)
$STYLE sites\styles\vertical.STY(Research Groups)
AS URL(<GroupName>);
   Name : TEXT = <GroupName>;
   Topics : TEXT = <Topics>;
   MemberList : LIST-OF ( 
                         ToMember : LINK-TO PersonPage(
                                                        URL (<Name>);
                                                        Member : TEXT = <Name>;
                                                      );
                        );
USING ResearchGroup, PersonInGroup 
ORDER BY PersonInGroup.Name
END


$ ---------------------------------------------------------------------------------------------
$  EDUCATION
$ ---------------------------------------------------------------------------------------------

DEFINE PAGE EducationPage : "Education"
STYLE sites\styles\verticalXML.STY(Our Courses)
$STYLE sites\styles\vertical.STY(Our Courses)
AS URL("index.html");
    CourseList : LIST-OF ( 
                            ToCourse : LINK-TO CoursePage(
                                             URL (<CourseName>);
                                             CourseName : TEXT = <CourseName>;
                                            );
                         );
USING Course
ORDER BY CourseName
END


DEFINE PAGE CoursePage : <CourseName>
STYLE sites\styles\verticalXML.STY(Our Courses)
$STYLE sites\styles\vertical.STY(Our Courses)
AS URL(<CourseName>);
   Name : TEXT = <CourseName>;
   Description : TEXT = <Description>;
   ToInstructor :  LINK-TO PersonPage(
                                       URL (<Instructor>);
                                       InstructorName : TEXT = <Instructor>;
                                     );
USING Course
END 


$ ---------------------------------------------------------------------------------------------
$  PEOPLE
$ ---------------------------------------------------------------------------------------------

DEFINE PAGE PeopleListPage : "People"
STYLE sites\styles\verticalXML.STY(People)
$STYLE sites\styles\vertical.STY(People)
AS URL("index.html");
   PeopleList : LIST-OF ( ToPerson : LINK-TO PersonPage(
                                                        URL (<Name>);
                                                        Name : TEXT = <Name>;
                                                       );
                         );
USING Person distinct
ORDER BY Name
END


DEFINE PAGE PersonPage : <Name>
STYLE sites\styles\verticalXML.STY(People)
$STYLE sites\styles\vertical.STY(People)
AS URL(<Person.Name>);
   Name : TEXT = <Name>;
   Photo : IMAGE = <Photo>;
   Position : TEXT = <Position>;
   Email : TEXT = <email>;
   Phone : TEXT = <Phone>;
   GroupList : LIST-OF (ToGroup : LINK-TO ResearchGroupPage (
                                         URL(<PersonGroup.GroupName>);
                                         LabelGroup : TEXT = <GroupName>;
                                       );
                        );             
   CourseList : LIST-OF (ToCourse : LINK-TO CoursePage (
                                   URL(<CourseName>);
                                   LabelCourse : TEXT = <CourseName>;
                                 );
                        );
USING Person,
      PersonGroup : (SELECT Person.Name, PersonInGroup.GroupName
                     FROM Person, PersonInGroup
                     WHERE Person.Name = PersonInGroup.Name), 
      PersonCourses : ( SELECT Person.Name, Course.CourseName
                        FROM Person, Course
                        WHERE Course.Instructor = Person.Name )
END 

$ ---------------------------------------------------------------------------------------------

