object oriented design with cascade server

28
Object Oriented Design with Cascade Server University of Missouri

Upload: lana

Post on 24-Feb-2016

36 views

Category:

Documents


0 download

DESCRIPTION

Object Oriented Design with Cascade Server. University of Missouri - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Object Oriented Design with Cascade Server

Object Oriented Design with Cascade Server

University of Missouri

Page 2: Object Oriented Design with Cascade Server
Page 3: Object Oriented Design with Cascade Server

<head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> <meta content="University of Missouri, MU, Mizzou" name="keywords"/> <title>University of Missouri</title> <link href="styles.css" media="all" rel="stylesheet" type="text/css"/> <link href="styles-print.css" media="print" rel="stylesheet" type="text/css"/> </head>

Page 4: Object Oriented Design with Cascade Server

<!– #START-CODE<?php//php script rotator//declare some var arrays for photo, desc and link//generate random number and seed varsEcho=“<a href=“linkarr[seed]”><img src=“photoarr[seed] alt=“descarr[seed]/>?> #END-CODE

Page 5: Object Oriented Design with Cascade Server

Pretty Page

Page 6: Object Oriented Design with Cascade Server

Header

Stuff

Page 7: Object Oriented Design with Cascade Server

Header

Site Nav

Stuff

Page 8: Object Oriented Design with Cascade Server

Header

Site Nav

Page Content

Footer

Page 9: Object Oriented Design with Cascade Server

Masthead Search

Page 10: Object Oriented Design with Cascade Server

Masthead Audience Nav

PrimaryNav

Search

Page 11: Object Oriented Design with Cascade Server

Feature Rotator

Impact Rotator

Masthead Audience Nav

PrimaryNav

Search

Page 12: Object Oriented Design with Cascade Server

Feature Rotator

Homepage Links

Impact Rotator

Masthead Audience Nav

PrimaryNav

Search

Weather

Page 13: Object Oriented Design with Cascade Server

Feature Rotator

Homepage Links

Impact Rotator

News Feed

Calendar Feed

Masthead Audience Nav

PrimaryNav

Search

Weather

Page 14: Object Oriented Design with Cascade Server

Feature Rotator

Homepage Links

Colophon

Impact Rotator

News Feed

Calendar Feed

Masthead Audience Nav

PrimaryNav

Search

Last Updated

Weather

Page 15: Object Oriented Design with Cascade Server
Page 16: Object Oriented Design with Cascade Server

Template

Regions

Core HTML

Core Scripts

Page 17: Object Oriented Design with Cascade Server

Last Updated

Colophon

Page 18: Object Oriented Design with Cascade Server

Last Updated

Colophon

<xsl:value-of select="date-converter:convertDateAP(number(last-published-on))"/>

Page 19: Object Oriented Design with Cascade Server

<!-- Xalan component for date conversion from CMS date format to RSS 2.0 pubDate format --> <!-- Date format variations: var retString = temp[0] + ', ' + temp[2] + ' ' + temp[1] + ' ' + temp[3] + ' ' + temp[4] + ' ' + timezone; --> <xalan:component functions="convertDate" prefix="date-converter"> <xalan:script lang="javascript"> function convertDate(date) { var d = new Date(date); // Splits date into components var temp = d.toString().split(' '); // timezone difference to GMT var timezone = temp[5].substring(3); // RSS 2.0 valid pubDate format var retString = temp[1] + ' ' + temp[2] + ', ' + temp[3]; return retString; } </xalan:script> </xalan:component>

Page 20: Object Oriented Design with Cascade Server

<!-- DATE CONVERTER -->

<xalan:component functions="convertDateAP convertDateAtom" prefix="date-converter">

<xalan:script lang="javascript"> function convertDateAP(date)

{ var d = new Date(date);

// Splits date into components var temp = d.toString().split(' ');

// Changes temp[1] into A.P. Style

if (temp[1] == "Jan") { month = "Jan.";

} …

else { month = "Dec.";

}

// Changes temp[2] to A.P. Style var day = Number(temp[2]);

if (day &lt; 10) { day = parseInt(day);

}

// Build A.P. Date var retString = month + ' ' + day + ', ' + temp[3];

// A.P. Style output return retString;

}

// End A.P. Output

// Atom Date Converter function convertDateAtom(date)

{ var d = new Date(date);

// Splits date into components var temp = d.toString().split(' ');

if (temp[1] == "Jan") { month = "01";

… }

// Atom 1.0 valid date format var retString = temp[3] + '-' + month + '-' + temp[2] + 'T' +

temp[4] + '-06:00';

// Atom Date Output return retString;

}

// End Atom Date Output

</xalan:script> </xalan:component>

Page 21: Object Oriented Design with Cascade Server
Page 22: Object Oriented Design with Cascade Server

<xsl:template name="widont-title"> <xsl:param name="temp"/> <xsl:param name="text"/> <xsl:choose> <xsl:when test="contains($text, ' ')"> <xsl:variable name="before" select="concat($temp,' ',substring-before($text,' '))"/> <xsl:variable name="after" select="substring-after($text, ' ')"/> <xsl:choose> <xsl:when test="contains($after, ' ')"> <xsl:call-template name="widont-title"> <xsl:with-param name="temp" select="$before"/> <xsl:with-param name="text" select="$after"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat($before, '&#160;', $after)"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="$text"/> </xsl:otherwise> </xsl:choose> </xsl:template>

Page 23: Object Oriented Design with Cascade Server

What about the Headlines?

Page 24: Object Oriented Design with Cascade Server

What about the Headlines?

//Identify escape char

Page 25: Object Oriented Design with Cascade Server

What about the Headlines?

//Identify escape char//Tokenize the string

Page 26: Object Oriented Design with Cascade Server

What about the Headlines?

//Identify escape char//Tokenize the string//Rebuild the string

Page 27: Object Oriented Design with Cascade Server

What about the Headlines?

//Identify escape char//Tokenize the string//Rebuild the string//Display the string

Page 28: Object Oriented Design with Cascade Server

[email protected](573)882 8843

Q’s?