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