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