SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
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. Returns boolean true or boolean false
true() and false()
number(arg)
books/book[last()]
path expressions
2. Selects attributes
@
floor(num)
not(arg)
books/book[position()
3. Converts value to a string
starts-with(str1, str2)
string(arg)
div
normalize-space(str)
4. Returns true if str2 appears anywhere inside str1
matches(str1, str2)
timezone-from-time(time)
/bookstore/book/title | //price
contains(str1, str2)
5. Selects all elements in the document
//*
path
/bookstore/book/title | //price
current-time()
6. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
index-of((item1, item2), item3...), target)
replace(str1, str2, str3)
normalize-space(str)
transforming
7. In str1, replaces all occurrences of str2 with str3
usable document
replace(str1, str2, str3)
'/'
attribute node
8. Selects all book elements with a child element "price" with values greater than 35
books/book[price > 35.00]
floor(num)
XSLT
trees of nodes
9. Selects from the root node
'/'
10. Returns time right now
year-from-date(current-date())
substring-after(str1, str2)
current-time()
transforming
11. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
compare(arg1, arg2)
standard function
//title | //price
index-of((item1, item2), item3...), target)
12. Returns all unique values in that collection - example: distinct-values(a, b, c, d, a, c) returns (a, b, c, d)
compare(arg1, arg2)
instinct-values(item1, item2, item3...))
processor application
number(arg)
13. _______ have 3 primary relationships: parent - child - sibling
arrays and functions
@
sequence
nodes
14. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
books/book[position()
day-from-date(date)
.
insert-before((item1, item2, item3...), positionX, itemX)
15. Returns true if str1 starts with str2
starts-with(str1, str2)
XSLT
@
/bookstore/*
16. Converts string to lower case
hours-from-time(time)
lower-case(str)
path expressions
/bookstore/book/title | //price
17. Returns false or true
books/book[1]
boolean(arg)
criteria
month-from-date(date)
18. Travels from current node to select nodes that match - wherever they are
19. XML documents are treated as _________- so the root of the tree is called the document node or root node
transforming
not(arg)
trees of nodes
month-from-date(current-date())
20. Converts string to upper case
string-length(str)
books/book[1]
upper-case(str)
attribute node
21. Returns substring from start position to end of string
substring(str,start)
books/book[price > 35.00]
books/book[position()
instinct-values(item1, item2, item3...))
22. A predicate is used by is used by adding square brackets [ ] to the end of a path or portion of a path - and adding ________ inside the brackets
current-date()
processor application
criteria
string-join((str1, str2, str3), separator)
23. Selects first two book elements from the children of books element
matches(str1, str2)
books/book[position()
substring-after(str1, str2)
round(num)
24. Converts string number to numeric value
transforming
number(arg)
Xpath operators
books/book[last()]
25. Compares strings, returns 0 if same, -1 if not same
insert-before((item1, item2, item3...), positionX, itemX)
Xpath operators
compare(arg1, arg2)
floor(num)
26. Selects all title elements which have any attribute
div
transforming
substring-before(str1, str2)
//title[@*]
27. Returns year value out of the date passed
year-from-date(date)
current-time()
hours-from-time(time)
normalize-space(str)
28. Returns minute value from time passed
minutes-from-time(time)
upper-case(str)
parent
insert-before((item1, item2, item3...), positionX, itemX)
29. Trims leading and trailing spaces
normalize-space(str)
XSLT
substring(str1, start, len)
.
30. Returns n-length substring from start position
normalize-space(str)
instinct-values(item1, item2, item3...))
sequence
substring(str1, start, len)
31. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
sequence
XSLT
attribute node
abs(num)
32. Returns length of passed string
string-length(str)
not(arg)
/bookstore/book/title | //price
div
33. Returns complete date/time
abs(num)
translate(str1, str2, str3)
usable document
current-dateTime()
34. Element nodes may have zero - one - or more _________
criteria
sequence
year-from-date(date)
child nodes
35. Transformation is actually accomplished by a _____________ like Saxon XSLT
processor application
remove((item1, item2, item3...), position)
seconds-from-time(time)
boolean(arg)
36. Returns everything before the first occurrence of str2
substring-before(str1, str2)
path
string-length(str)
upper-case(str)
37. Use a | to select more than one _____ (means AND)
processor application
path
year-from-date(current-date())
books/book[last()]
38. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
/bookstore/book/title | //price
syntax
index-of((item1, item2), item3...), target)
Xpath operators
39. Selects all book elements with an attribute isbn=
year-from-date(current-date())
/bookstore/book/title | //price
standard function
//book[@isbn]
40. Returns everything after the first occurrence of str2
index-of((item1, item2), item3...), target)
XSLT
ends-with(str1, str2)
substring-after(str1, str2)
41. Returns today's date
current-date()
parent
string(arg)
arrays and functions
42. Sibling nodes all have the same ______
parent
books/book[last()]
usable document
child nodes
43. Replaces chars of str2 found in str1 with chars of str3
timezone-from-time(time)
//title[@*]
translate(str1, str2, str3)
.
44. Returns length of current node string
minutes-from-time(time)
string-length()
//book[@isbn]
round(num)
45. The XPath division operator not "/" cuz "/" is used in path expressions
div
normalize-space(str)
string(arg)
instinct-values(item1, item2, item3...))
46. Returns day value from date passed
trees of nodes
'/'
//title | //price
day-from-date(date)
47. Selects parent of current node
current-date()
..
replace(str1, str2, str3)
processor application
48. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
month-from-date(date)
.
compare(arg1, arg2)
remove((item1, item2, item3...), position)
49. ________ allow more specific selections within the XPath
sequence
Predicates
substring(str,start)
transforming
50. The process of taking raw XML - adding XSL - and outputting a document file of some type
ends-with(str1, str2)
lower-case(str)
transformation
substring-after(str1, str2)