280 likes | 394 Views
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>
E N D
Object Oriented Design with Cascade Server University of Missouri
<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>
<!– #START-CODE<?php //php script rotator //declare some var arrays for photo, desc and link //generate random number and seed vars Echo=“<a href=“linkarr[seed]”><img src=“photoarr[seed] alt=“descarr[seed]/> ?> #END-CODE
Header Stuff
Header Site Nav Stuff
Header Site Nav Page Content Footer
Masthead Search
Masthead Search Audience Nav PrimaryNav
Masthead Search Audience Nav Feature Rotator PrimaryNav Impact Rotator
Masthead Search Audience Nav Feature Rotator PrimaryNav Homepage Links Impact Rotator Weather
Masthead Search Audience Nav Feature Rotator PrimaryNav News Feed Calendar Feed Homepage Links Impact Rotator Weather
Masthead Search Audience Nav Feature Rotator PrimaryNav News Feed Calendar Feed Homepage Links Impact Rotator Weather Colophon Last Updated
Colophon Last Updated
<xsl:value-of select="date-converter:convertDateAP(number(last-published-on))"/> Colophon Last Updated
<!-- 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>
<!-- 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 < 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>
<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, ' ', $after)"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="$text"/> </xsl:otherwise> </xsl:choose> </xsl:template>
What about the Headlines? //Identify escape char
What about the Headlines? //Identify escape char //Tokenize the string
What about the Headlines? //Identify escape char //Tokenize the string //Rebuild the string
What about the Headlines? //Identify escape char //Tokenize the string //Rebuild the string //Display the string
Q’s? grahamcn@missouri.edu (573)882 8843