SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
XML XPATH
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Selects all the child nodes of the bookstore element
/bookstore/*
transforming
parent node
books/book[1]
2. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
books/book[1]
string-length(str)
true() and false()
transforming
3. XPath is a major element in _______
/bookstore/book/title | //price
XSLT
seconds-from-time(time)
parent node
4. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
substring(str1, start, len)
string-join((str1, str2, str3), separator)
insert-before((item1, item2, item3...), positionX, itemX)
substring-before(str1, str2)
5. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
books/book[1]
current-date()
compare(arg1, arg2)
path expressions
6. Selects all title elements which have any attribute
//title[@*]
books/book[1]
arrays and functions
criteria
7. In str1, replaces all occurrences of str2 with str3
replace(str1, str2, str3)
seconds-from-time(time)
parent
//book[@isbn]
8. Returns all unique values in that collection - example: distinct-values(a, b, c, d, a, c) returns (a, b, c, d)
ceiling(num)
current-time()
seconds-from-time(time)
instinct-values(item1, item2, item3...))
9. Returns true if str1 ends with str2
ends-with(str1, str2)
ceiling(num)
starts-with(str1, str2)
usable document
10. The process of taking raw XML - adding XSL - and outputting a document file of some type
month-from-date(date)
substring-after(str1, str2)
books/book[last()]
transformation
11. The XPath division operator not "/" cuz "/" is used in path expressions
div
starts-with(str1, str2)
//title[@*]
round(num)
12. Converts string number to numeric value
string-join((str1, str2, str3), separator)
//book[@isbn]
number(arg)
matches(str1, str2)
13. Transformation is actually accomplished by a _____________ like Saxon XSLT
XSLT
matches(str1, str2)
processor application
upper-case(str)
14. XPath is a for defining parts of an XML document
syntax
..
'/'
minutes-from-time(time)
15. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
standard function
//title[@*]
remove((item1, item2, item3...), position)
round(num)
16. Returns n-length substring from start position
substring(str1, start, len)
year-from-date(current-date())
month-from-date(current-date())
@
17. Returns second value from time passed
seconds-from-time(time)
index-of((item1, item2), item3...), target)
string-join((str1, str2, str3), separator)
string-length()
18. ________ allow more specific selections within the XPath
Predicates
books/book[last()]
abs(num)
minutes-from-time(time)
19. Selects all book elements with a child element "price" with values greater than 35
transforming
parent node
hours-from-time(time)
books/book[price > 35.00]
20. Selects all title AND price elements of all book elements
translate(str1, str2, str3)
string-length(str)
@
//book/title | //book/price
21. Returns length of passed string
year-from-date(current-date())
string-length(str)
div
lower-case(str)
22. Predicates work somewhat like _____________
//title[@*]
timezone-from-time(time)
books/book[price > 35.00]
arrays and functions
23. Returns everything after the first occurrence of str2
string(arg)
substring-after(str1, str2)
floor(num)
nodes
24. Returns everything before the first occurrence of str2
parent
substring-before(str1, str2)
trees of nodes
boolean(arg)
25. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
Predicates
string-length(str)
attribute node
substring-before(str1, str2)
26. Selects all book elements with an attribute isbn=
//book[@isbn]
substring-before(str1, str2)
trees of nodes
substring-after(str1, str2)
27. Selects from the root node
'/'
28. Selects last book element from the children of books element
child nodes
ceiling(num)
transforming
books/book[last()]
29. Selects parent of current node
month-from-date(current-date())
path expressions
normalize-space(str)
..
30. _______ have 3 primary relationships: parent - child - sibling
starts-with(str1, str2)
nodes
XSLT
compare(arg1, arg2)
31. Concatenates strings together (example concat('It",'is','cool') returns "Itiscool"
concat(str1, str2, str3...)
replace(str1, str2, str3)
current-date()
attribute node
32. Selects current node
.
not(arg)
'/'
day-from-date(date)
33. Returns true if str1 starts with str2
concat(str1, str2, str3...)
.
starts-with(str1, str2)
//title[@*]
34. Converts string to upper case
replace(str1, str2, str3)
minutes-from-time(time)
remove((item1, item2, item3...), position)
upper-case(str)
35. Returns today's date
not(arg)
current-date()
transforming
string-join((str1, str2, str3), separator)
36. selects first book element from the children of books element
boolean(arg)
parent
books/book[1]
path
37. Returns boolean true or boolean false
//title[@*]
true() and false()
boolean(arg)
transformation
38. Concatenates strings together with separator between each string
string-join((str1, str2, str3), separator)
books/book[position()
div
substring(str,start)
39. Selects first two book elements from the children of books element
boolean(arg)
books/book[last()]
books/book[position()
compare(arg1, arg2)
40. Element nodes may have zero - one - or more _________
string(arg)
substring-before(str1, str2)
child nodes
books/book[position()
41. Compares strings, returns 0 if same, -1 if not same
compare(arg1, arg2)
ceiling(num)
index-of((item1, item2), item3...), target)
lower-case(str)
42. Returns logically rounded integer
round(num)
sequence
books/book[position()
@
43. Returns length of current node string
sequence
remove((item1, item2, item3...), position)
string-length()
index-of((item1, item2), item3...), target)
44. every element and every attribute have just one _________
parent node
arrays and functions
ends-with(str1, str2)
//book[@isbn]
45. Returns day value from date passed
day-from-date(date)
nodes
transforming
substring-after(str1, str2)
46. Returns minute value from time passed
arrays and functions
round(num)
minutes-from-time(time)
substring(str,start)
47. Seven kinds of nodes in XPath: element - attribute - text - namespace - __________ - comment - document (root) nodes - a.k.a. DECANT-PI
processing-instruction
Predicates
current-date()
compare(arg1, arg2)
48. Selects all title elements of the book element AND all price elements in the entire document
/bookstore/book/title | //price
transformation
/bookstore/*
index-of((item1, item2), item3...), target)
49. Returns timezone value from time passed
contains(str1, str2)
timezone-from-time(time)
current-dateTime()
insert-before((item1, item2, item3...), positionX, itemX)
50. Returns false or true
timezone-from-time(time)
minutes-from-time(time)
boolean(arg)
current-date()