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. XML documents are treated as _________- so the root of the tree is called the document node or root node
abs(num)
year-from-date(date)
trees of nodes
boolean(arg)
2. Selects from the root node
'/'
3. Selects last book element from the children of books element
Xpath operators
books/book[last()]
path
'//'
4. Returns boolean true or boolean false
true() and false()
arrays and functions
translate(str1, str2, str3)
XSLT
5. 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
not(arg)
lower-case(str)
timezone-from-time(time)
criteria
6. every element and every attribute have just one _________
parent node
@
path
Predicates
7. Converts string number to numeric value
processor application
//book/title | //book/price
ends-with(str1, str2)
number(arg)
8. Returns length of passed string
current-dateTime()
arrays and functions
string-length(str)
'/'
9. Selects all the child nodes of the bookstore element
ceiling(num)
/bookstore/*
books/book[price > 35.00]
'/'
10. Selects all title AND price elements in the entire document
timezone-from-time(time)
not(arg)
floor(num)
//title | //price
11. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
matches(str1, str2)
timezone-from-time(time)
remove((item1, item2, item3...), position)
year-from-date(current-date())
12. Predicates work somewhat like _____________
boolean(arg)
/bookstore/*
arrays and functions
string-join((str1, str2, str3), separator)
13. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
attribute node
parent
child nodes
substring-after(str1, str2)
14. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
translate(str1, str2, str3)
Xpath operators
usable document
processor application
15. Use a | to select more than one _____ (means AND)
path
instinct-values(item1, item2, item3...))
current-time()
lower-case(str)
16. Returns absolute value (example abs(-2.5) returns 2.5
div
replace(str1, str2, str3)
//title[@*]
abs(num)
17. Selects all book elements with a child element "price" with values greater than 35
processor application
books/book[price > 35.00]
substring-after(str1, str2)
boolean(arg)
18. Returns true if str1 ends with str2
timezone-from-time(time)
parent node
ends-with(str1, str2)
parent
19. Travels from current node to select nodes that match - wherever they are
20. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
round(num)
string-join((str1, str2, str3), separator)
timezone-from-time(time)
path expressions
21. ________ allow more specific selections within the XPath
attribute node
books/book[1]
Predicates
substring(str,start)
22. _______ have 3 primary relationships: parent - child - sibling
year-from-date(date)
compare(arg1, arg2)
nodes
'/'
23. Replaces chars of str2 found in str1 with chars of str3
string-length()
abs(num)
processing-instruction
translate(str1, str2, str3)
24. Returns year value out of the date passed
year-from-date(date)
//book[@isbn]
remove((item1, item2, item3...), position)
normalize-space(str)
25. Selects all book elements with an attribute isbn=
current-time()
month-from-date(date)
syntax
//book[@isbn]
26. Converts string to lower case
lower-case(str)
.
string-length(str)
//title[@*]
27. Returns true if str2 appears anywhere inside str1
XSLT
Xpath operators
matches(str1, str2)
year-from-date(current-date())
28. Returns everything before the first occurrence of str2
syntax
substring-before(str1, str2)
substring(str,start)
/bookstore/*
29. Returns n-length substring from start position
substring(str1, start, len)
remove((item1, item2, item3...), position)
//*
.
30. Selects all title AND price elements of all book elements
replace(str1, str2, str3)
'//'
day-from-date(date)
//book/title | //book/price
31. Returns false or true
boolean(arg)
upper-case(str)
concat(str1, str2, str3...)
parent
32. The XPath division operator not "/" cuz "/" is used in path expressions
string-length()
div
parent
month-from-date(date)
33. Selects all elements in the document
books/book[last()]
//book/title | //book/price
sequence
//*
34. xpath function categories: numeric - string - boolea - date/time - ________
substring-after(str1, str2)
trees of nodes
sequence
/bookstore/*
35. Returns October or 10 ?
month-from-date(current-date())
replace(str1, str2, str3)
//title | //price
string-length()
36. Returns substring from start position to end of string
.
month-from-date(current-date())
path expressions
substring(str,start)
37. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
boolean(arg)
string(arg)
insert-before((item1, item2, item3...), positionX, itemX)
current-time()
38. Returns day value from date passed
day-from-date(date)
normalize-space(str)
transforming
substring(str1, start, len)
39. XPath contains a library of _________
not(arg)
timezone-from-time(time)
standard function
/bookstore/book/title | //price
40. Returns next lowest integer
floor(num)
month-from-date(current-date())
hours-from-time(time)
not(arg)
41. Compares strings, returns 0 if same, -1 if not same
/bookstore/*
compare(arg1, arg2)
transformation
@
42. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
index-of((item1, item2), item3...), target)
string-length()
/bookstore/book/title | //price
books/book[last()]
43. Selects all title elements which have any attribute
attribute node
//title[@*]
timezone-from-time(time)
boolean(arg)
44. Returns minute value from time passed
year-from-date(current-date())
Predicates
processor application
minutes-from-time(time)
45. Selects all title elements of the book element AND all price elements in the entire document
books/book[1]
attribute node
Xpath operators
/bookstore/book/title | //price
46. Returns true if str1 starts with str2
starts-with(str1, str2)
parent
trees of nodes
child nodes
47. Returns length of current node string
remove((item1, item2, item3...), position)
string-length()
//book/title | //book/price
substring(str1, start, len)
48. Converts value to a string
compare(arg1, arg2)
string(arg)
//book[@isbn]
transformation
49. Returns next highest integer
month-from-date(date)
books/book[last()]
substring-after(str1, str2)
ceiling(num)
50. Returns logically rounded integer
string-length()
Xpath operators
round(num)
number(arg)