XPATH and XSLT Flashcards

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

flashcard set

Earn XP

Description and Tags

Flashcards for Week 3 - XPATH and XSLT lecture review.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

What are the two requirements for XML?

XML must be well-formed and valid.

2
New cards

What does it mean for XML to be 'well-formed'?

It follows XML rules.

3
New cards

What does it mean for XML to be 'valid'?

It follows a Document Definition.

4
New cards

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.

5
New cards

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.

6
New cards

What is Document Object Model (DOM)?

Originally developed for HTML and Supported by most browsers

7
New cards

What is XQuery and XPath Data Model (XDM)?

Based on same principle as DOM, with more support for XSD typed objects

8
New cards

What is Post-Validation Information Set (PSVI)?

Related to XSD, combines XSD validation with Infoset

9
New cards

What is XPath?

XML Path Language that uses path expressions to navigate an XML document.

10
New cards

What is XSLT?

A language that relies heavily on the use of XPath to navigate a document, and find relevant nodes

11
New cards

What kinds of nodes does Xpath works on?

element, attribute, Text, Namespace, Processing instructions, Comments, root/document

12
New cards

What are the two types of Xpath paths?

Absolute vs Relative

13
New cards

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.

14
New cards

What does XSLT stand for?

XML Stylesheet Language

15
New cards

What is XSLT?

A markup language that allows us to convert one XML structured document into another. It uses XPath expressions for transformations.

16
New cards

What are two main types of XSL?

XSL-FO (XSL format object) and XSLT (XSL Transforms).

17
New cards

Is XSLT a pattern matching language or a procedural language?

Pattern matching language that uses templates to generate an output

18
New cards

With XSLT, can variable values be changed once created?

No, XSLT variables cannot be modified once created

19
New cards

List the Types of XSLT nodes

Document, Processing Instruction, Element, Attribute, Text, Namespace, Comment

20
New cards

What are two main ways to use XSLT stylesheets?

Embedded link in XML document and Passed to a parsing application alongside an XML document.

21
New cards

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

22
New cards

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.

23
New cards

In XSLT, how can Templates be invoked?

By matching nodes against a pattern and Called by name

24
New cards

How can a template be called?

Using (on a template with ‘match’ attribute) and (on a template with ‘name’ attribute)

25
New cards

What does the xsl:element do?

Creates an element node and writes it to the sequence constructor.

26
New cards

What does the XSLT do by default with whitespace?

XSLT will default to ignoring whitespace outside an element

27
New cards

What does the do?

Displays the content of an element.

28
New cards

What does do?

Allows us to iterate through a node set and process it

29
New cards

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.

30
New cards

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.