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. Selects all title AND price elements in the entire document
month-from-date(current-date())
//title | //price
remove((item1, item2, item3...), position)
child nodes
2. Returns logically rounded integer
standard function
seconds-from-time(time)
.
round(num)
3. Returns false or true
//book[@isbn]
/bookstore/book/title | //price
boolean(arg)
books/book[1]
4. Predicates work somewhat like _____________
arrays and functions
string-length()
substring(str,start)
current-dateTime()
5. Returns length of passed string
string-length(str)
ceiling(num)
normalize-space(str)
syntax
6. Returns everything before the first occurrence of str2
Xpath operators
month-from-date(date)
translate(str1, str2, str3)
substring-before(str1, str2)
7. XPath is a for defining parts of an XML document
syntax
parent
ends-with(str1, str2)
path expressions
8. Returns everything after the first occurrence of str2
substring-after(str1, str2)
.
path
translate(str1, str2, str3)
9. Returns false if true - true if false (negative logic)
not(arg)
books/book[1]
floor(num)
Xpath operators
10. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
attribute node
year-from-date(current-date())
seconds-from-time(time)
transformation
11. Returns time right now
books/book[1]
replace(str1, str2, str3)
current-time()
..
12. Returns timezone value from time passed
timezone-from-time(time)
month-from-date(date)
year-from-date(current-date())
number(arg)
13. Selects first two book elements from the children of books element
floor(num)
month-from-date(current-date())
round(num)
books/book[position()
14. Returns substring from start position to end of string
substring(str,start)
arrays and functions
instinct-values(item1, item2, item3...))
/bookstore/*
15. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
books/book[price > 35.00]
//book/title | //book/price
arrays and functions
index-of((item1, item2), item3...), target)
16. Selects current node
string-length()
.
matches(str1, str2)
//title | //price
17. Selects parent of current node
true() and false()
contains(str1, str2)
..
concat(str1, str2, str3...)
18. Returns next lowest integer
floor(num)
string(arg)
hours-from-time(time)
ends-with(str1, str2)
19. Compares strings, returns 0 if same, -1 if not same
current-time()
books/book[position()
ends-with(str1, str2)
compare(arg1, arg2)
20. Returns true if str2 appears anywhere inside str1
.
matches(str1, str2)
/bookstore/*
nodes
21. Travels from current node to select nodes that match - wherever they are
22. Returns October or 10 ?
remove((item1, item2, item3...), position)
books/book[1]
..
month-from-date(current-date())
23. ________ allow more specific selections within the XPath
abs(num)
Predicates
month-from-date(date)
substring-before(str1, str2)
24. Returns boolean true or boolean false
true() and false()
replace(str1, str2, str3)
path expressions
child nodes
25. Returns next highest integer
lower-case(str)
processor application
day-from-date(date)
ceiling(num)
26. Transformation is actually accomplished by a _____________ like Saxon XSLT
string-join((str1, str2, str3), separator)
.
books/book[last()]
processor application
27. Concatenates strings together (example concat('It",'is','cool') returns "Itiscool"
books/book[price > 35.00]
/bookstore/book/title | //price
true() and false()
concat(str1, str2, str3...)
28. Selects from the root node
'/'
29. XPath contains a library of _________
Xpath operators
parent node
books/book[price > 35.00]
standard function
30. Selects all title elements of the book element AND all price elements in the entire document
number(arg)
processor application
/bookstore/book/title | //price
//*
31. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
translate(str1, str2, str3)
transforming
@
string-join((str1, str2, str3), separator)
32. Returns n-length substring from start position
timezone-from-time(time)
substring(str1, start, len)
trees of nodes
abs(num)
33. Returns all unique values in that collection - example: distinct-values(a, b, c, d, a, c) returns (a, b, c, d)
matches(str1, str2)
processor application
/bookstore/*
instinct-values(item1, item2, item3...))
34. Returns length of current node string
instinct-values(item1, item2, item3...))
string(arg)
string-length()
true() and false()
35. Selects attributes
@
round(num)
month-from-date(current-date())
current-date()
36. Returns 2008
year-from-date(current-date())
substring-after(str1, str2)
transformation
parent node
37. Converts string to lower case
lower-case(str)
..
string-length(str)
sequence
38. Returns absolute value (example abs(-2.5) returns 2.5
abs(num)
boolean(arg)
round(num)
upper-case(str)
39. xpath function categories: numeric - string - boolea - date/time - ________
/bookstore/book/title | //price
year-from-date(date)
sequence
current-time()
40. Selects all elements in the document
timezone-from-time(time)
//*
transformation
substring-before(str1, str2)
41. The process of taking raw XML - adding XSL - and outputting a document file of some type
insert-before((item1, item2, item3...), positionX, itemX)
string(arg)
transformation
starts-with(str1, str2)
42. Selects all book elements with a child element "price" with values greater than 35
ends-with(str1, str2)
books/book[price > 35.00]
month-from-date(current-date())
remove((item1, item2, item3...), position)
43. Returns day value from date passed
.
parent node
day-from-date(date)
transforming
44. Returns true if str1 contains str2
ceiling(num)
contains(str1, str2)
usable document
processing-instruction
45. The XPath division operator not "/" cuz "/" is used in path expressions
translate(str1, str2, str3)
//title | //price
seconds-from-time(time)
div
46. Selects all title elements which have any attribute
hours-from-time(time)
minutes-from-time(time)
'/'
//title[@*]
47. Trims leading and trailing spaces
books/book[position()
minutes-from-time(time)
round(num)
normalize-space(str)
48. Returns second value from time passed
seconds-from-time(time)
round(num)
Xpath operators
'/'
49. Converts string number to numeric value
year-from-date(date)
books/book[last()]
/bookstore/*
number(arg)
50. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
minutes-from-time(time)
books/book[position()
child nodes
remove((item1, item2, item3...), position)