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