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