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. Travels from current node to select nodes that match - wherever they are
2. Selects all the child nodes of the bookstore element
current-time()
/bookstore/*
/bookstore/book/title | //price
substring(str,start)
3. Seven kinds of nodes in XPath: element - attribute - text - namespace - __________ - comment - document (root) nodes - a.k.a. DECANT-PI
boolean(arg)
ends-with(str1, str2)
/bookstore/*
processing-instruction
4. Selects from the root node
'/'
5. Compares strings, returns 0 if same, -1 if not same
compare(arg1, arg2)
normalize-space(str)
usable document
arrays and functions
6. Returns false or true
trees of nodes
@
boolean(arg)
substring-after(str1, str2)
7. XPath is a for defining parts of an XML document
syntax
attribute node
//title | //price
substring(str1, start, len)
8. The XPath division operator not "/" cuz "/" is used in path expressions
//title[@*]
/bookstore/book/title | //price
substring(str1, start, len)
div
9. Selects all book elements with a child element "price" with values greater than 35
timezone-from-time(time)
//title | //price
books/book[price > 35.00]
number(arg)
10. Returns substring from start position to end of string
parent
//*
substring(str,start)
normalize-space(str)
11. Returns length of passed string
floor(num)
transformation
string-length(str)
year-from-date(current-date())
12. XPath is a major element in _______
XSLT
timezone-from-time(time)
current-time()
trees of nodes
13. Returns hour value from time passed
hours-from-time(time)
books/book[last()]
criteria
month-from-date(current-date())
14. Replaces chars of str2 found in str1 with chars of str3
translate(str1, str2, str3)
div
//book/title | //book/price
transformation
15. The process of taking raw XML - adding XSL - and outputting a document file of some type
path expressions
arrays and functions
transformation
floor(num)
16. Selects all title elements which have any attribute
//title[@*]
standard function
index-of((item1, item2), item3...), target)
//book[@isbn]
17. Returns next highest integer
nodes
ceiling(num)
current-date()
current-dateTime()
18. Returns second value from time passed
.
/bookstore/*
normalize-space(str)
seconds-from-time(time)
19. In str1, replaces all occurrences of str2 with str3
replace(str1, str2, str3)
Xpath operators
not(arg)
parent
20. Returns today's date
insert-before((item1, item2, item3...), positionX, itemX)
substring(str,start)
current-date()
syntax
21. 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)
//*
not(arg)
instinct-values(item1, item2, item3...))
22. Returns everything after the first occurrence of str2
child nodes
/bookstore/book/title | //price
//book[@isbn]
substring-after(str1, str2)
23. Returns false if true - true if false (negative logic)
syntax
not(arg)
floor(num)
minutes-from-time(time)
24. Returns October or 10 ?
month-from-date(current-date())
current-date()
current-time()
current-dateTime()
25. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
arrays and functions
books/book[price > 35.00]
ceiling(num)
Xpath operators
26. Converts string to lower case
lower-case(str)
//book/title | //book/price
current-time()
instinct-values(item1, item2, item3...))
27. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
hours-from-time(time)
Predicates
'/'
remove((item1, item2, item3...), position)
28. Sibling nodes all have the same ______
div
hours-from-time(time)
/bookstore/*
parent
29. Returns logically rounded integer
matches(str1, str2)
round(num)
nodes
//title[@*]
30. Selects all book elements with an attribute isbn=
//book[@isbn]
books/book[last()]
string(arg)
div
31. Returns everything before the first occurrence of str2
ends-with(str1, str2)
string-length()
remove((item1, item2, item3...), position)
substring-before(str1, str2)
32. Returns next lowest integer
/bookstore/book/title | //price
'//'
usable document
floor(num)
33. Returns day value from date passed
day-from-date(date)
index-of((item1, item2), item3...), target)
instinct-values(item1, item2, item3...))
trees of nodes
34. Returns true if str2 appears anywhere inside str1
timezone-from-time(time)
child nodes
matches(str1, str2)
substring-after(str1, str2)
35. Selects attributes
substring-before(str1, str2)
//book[@isbn]
substring(str1, start, len)
@
36. Returns boolean true or boolean false
starts-with(str1, str2)
trees of nodes
usable document
true() and false()
37. _______ have 3 primary relationships: parent - child - sibling
.
nodes
true() and false()
replace(str1, str2, str3)
38. Selects all title AND price elements in the entire document
ceiling(num)
//title | //price
'/'
current-date()
39. every element and every attribute have just one _________
XSLT
parent node
criteria
nodes
40. Returns true if str1 contains str2
//book/title | //book/price
number(arg)
contains(str1, str2)
arrays and functions
41. Use a | to select more than one _____ (means AND)
starts-with(str1, str2)
contains(str1, str2)
path
XSLT
42. Returns minute value from time passed
string-join((str1, str2, str3), separator)
path expressions
minutes-from-time(time)
string(arg)
43. Returns true if str1 ends with str2
Predicates
//title[@*]
arrays and functions
ends-with(str1, str2)
44. Returns timezone value from time passed
ceiling(num)
//title[@*]
hours-from-time(time)
timezone-from-time(time)
45. Converts string to upper case
ceiling(num)
'/'
boolean(arg)
upper-case(str)
46. Returns absolute value (example abs(-2.5) returns 2.5
hours-from-time(time)
abs(num)
Predicates
..
47. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
//*
starts-with(str1, str2)
attribute node
concat(str1, str2, str3...)
48. XML documents are treated as _________- so the root of the tree is called the document node or root node
trees of nodes
parent node
processor application
minutes-from-time(time)
49. selects first book element from the children of books element
syntax
/bookstore/*
books/book[1]
usable document
50. Transformation is actually accomplished by a _____________ like Saxon XSLT
//*
matches(str1, str2)
instinct-values(item1, item2, item3...))
processor application