Lecture 5 & 6 - XSL and XPATH Flashcards
What are the two XML style sheet languages?
1) Extensible stylesheet language (transformations): XSLT
2) XSL Formatting Objects: XSL-FO
What are the general coding points in regards to XSLT
1) The stylesheet is xml and should begin with the xml declaration
2) The root of the sheet must set-up the xsl namespace
1) What are the three elements of a stylesheet called?
2) what do these rules use?
1) Template Rules
2) XPATH Expressions
What us XPATH Expressions?
XPATH is a separate language that identifies particular parts of an XML document.
We write XPATH in short expressions.
For example “/” is an XPATH expression indicating the document root
We embed XPATH expressions into the stylesheet
Mostly in template rules
What is the basic form of an XSLT template rule?
The cat sat on the mat
The rule would match the root of the document
The only output would be The cat sat on the mat