Download presentation
Presentation is loading. Please wait.
Published byMaria Little Modified over 9 years ago
1
The Information School at the University of Washington INFO 440: Information System Design Fall 2003 * Bob Boiko * MSIM Associate Chair XML Transforms
2
The Information School at the University of Washington INFO 440: Information System Design * Fall 2004 * Bob Boiko * MSIM Associate Chair Templates as Programs Templates have processor programs that read them and form an output page.
3
The Information School at the University of Washington INFO 440: Information System Design * Fall 2004 * Bob Boiko * MSIM Associate Chair Templates as Programs [Insert Title] [Insert Body] @@(Title)@@ Function BuildPage(ID) Set Component = LoadComponent(ID) Title = Component.GetElement("title") Body = Component.GetElement("body") Output (" “) Output (Title) Output (" ”) Output (Body) Output (" ”) End Function
4
The Information School at the University of Washington INFO 440: Information System Design * Fall 2004 * Bob Boiko * MSIM Associate Chair What is XSLT? A way to transform XML –To HTML –To text –Not too good at other formats ( A way to add formatting A programming language –Not for end users –Not too hard for easy things –Will need to use “real” programming where it fails
5
The Information School at the University of Washington INFO 440: Information System Design * Fall 2004 * Bob Boiko * MSIM Associate Chair Why use It? Standardizes your publications Reuse –Create one transform (i.e., XSL file) many pages –One content chunk many presentations Assures well formed output Separates processing code from presentation code (sort of)
6
The Information School at the University of Washington INFO 440: Information System Design * Fall 2004 * Bob Boiko * MSIM Associate Chair Major Player XML XSL is XML! All the same rules apply xsl:stylesheetxsl:templatematchxsl:value-ofselectxsl:value-ofselectxsl:templatexsl:stylesheet
7
The Information School at the University of Washington INFO 440: Information System Design * Fall 2004 * Bob Boiko * MSIM Associate Chair Major Player Templates & XPath The whole file is a stylesheet Stylesheets have templates Templates have selectors Selectors use XPath Templates contain value-of’s Value-of’s contain selectors
8
The Information School at the University of Washington INFO 440: Information System Design * Fall 2004 * Bob Boiko * MSIM Associate Chair Template Example Taken from http://www.zvon.org/xxl/XSLTutorial/Output/example1_ch1.html
9
The Information School at the University of Washington INFO 440: Information System Design * Fall 2004 * Bob Boiko * MSIM Associate Chair The Spy debug environment
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.