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