1/29
Flashcards for Week 3 - XPATH and XSLT lecture review.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What are the two requirements for XML?
XML must be well-formed and valid.
What does it mean for XML to be 'well-formed'?
It follows XML rules.
What does it mean for XML to be 'valid'?
It follows a Document Definition.
What are namespaces used for in XML?
To group elements and attributes under a common heading and differentiate one type of ‘key’ from another and to store data from different schemas within the same document.
Can Namespaces be used to differentiate between DTD based languages?
No, namespaces cannot be used to differentiate between DTD based languages; they are used with XML Schema.
What is Document Object Model (DOM)?
Originally developed for HTML and Supported by most browsers
What is XQuery and XPath Data Model (XDM)?
Based on same principle as DOM, with more support for XSD typed objects
What is Post-Validation Information Set (PSVI)?
Related to XSD, combines XSD validation with Infoset
What is XPath?
XML Path Language that uses path expressions to navigate an XML document.
What is XSLT?
A language that relies heavily on the use of XPath to navigate a document, and find relevant nodes
What kinds of nodes does Xpath works on?
element, attribute, Text, Namespace, Processing instructions, Comments, root/document
What are the two types of Xpath paths?
Absolute vs Relative
What is the function of a Predicate in xpath?
Predicates are similar to filters, appear in [] and appear after the axis and node test Used to find a specific node set or a nodes that contain a specific value.
What does XSLT stand for?
XML Stylesheet Language
What is XSLT?
A markup language that allows us to convert one XML structured document into another. It uses XPath expressions for transformations.
What are two main types of XSL?
XSL-FO (XSL format object) and XSLT (XSL Transforms).
Is XSLT a pattern matching language or a procedural language?
Pattern matching language that uses templates to generate an output
With XSLT, can variable values be changed once created?
No, XSLT variables cannot be modified once created
List the Types of XSLT nodes
Document, Processing Instruction, Element, Attribute, Text, Namespace, Comment
What are two main ways to use XSLT stylesheets?
Embedded link in XML document and Passed to a parsing application alongside an XML document.
If the stylesheet is the root node, what does it contain?
ALL of our stylesheet will be contained in this element, crucially it contains all of our template elements
What does sequence constructors consist of?
zero or more sibling nodes in the stylesheet that can be evaluated to return a sequence of nodes and atomic values.
In XSLT, how can Templates be invoked?
By matching nodes against a pattern and Called by name
How can a template be called?
Using
What does the xsl:element do?
Creates an element node and writes it to the sequence constructor.
What does the XSLT do by default with whitespace?
XSLT will default to ignoring whitespace outside an element
What does the
Displays the content of an element.
What does
Allows us to iterate through a node set and process it
What do IF and CHOOSE elements allow us to do?
Allow us to add in some logical rules, and behave in a similar fashion to if statements in procedural languages.
In XSLT, what does the ‘sort’ element do?
The XSL ‘sort’ element goes inside an element at the beginning of the sequence constructor to determine the order that the elements will be output in.