Credit CategoriesAssignment 2 Credit Category 2
You are able to demonstrate how data may be filtered using Xpath
You are able to demonstrate how an XSLT file may transform XML into another document format e.g. XHTML
Document Transformations
Web Form (ASPX) HTML Form
The Structure of an XML Document - Trees and Nodes
Need a good conceptual model of XML/XSLTError reporting is poorVisual Studio debugger a big help
XML Tree StructureViewed in the browser
Simple XSLT File(EXtensible Stylesheet Language Transformations)
ExamplesTitle/LocalTitle
28 Days LaterTitle/IMDBrating
7.6Title/Genres/Genre
Action
xsl for each loop
Notice how we reference the data
Keeping Track of the Context
28 Days Later28 Days Later28 Days Later7.62002Etc..
. Gives us
When the Context Changes
Action HorrorSci-FiThriller
. Gives us
Losing track of the context is the source of most problems in XSLT!
Instructions and Literals
Instruction(s)
Literals
Output document is a merging of the instructions and literals.
TemplatesRoot template + others
(Like sub main in C)
(similar to a function)
PatternsThe Root Pattern
/Compare the two patterns below…
More Complex Patterns
ExpressionsUsed to perform calculations on a node/data
Sorting Data in a Node
The Key - a pattern that identifies the dataThe Order - may be ascending or descending.