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 current node
matches(str1, str2)
'/'
current-date()
.
2. xpath function categories: numeric - string - boolea - date/time - ________
sequence
upper-case(str)
books/book[last()]
books/book[1]
3. 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
path
criteria
timezone-from-time(time)
floor(num)
4. Returns next highest integer
current-dateTime()
parent
ceiling(num)
transformation
5. Returns true if str2 appears anywhere inside str1
criteria
not(arg)
matches(str1, str2)
Xpath operators
6. Returns day value from date passed
div
day-from-date(date)
ends-with(str1, str2)
month-from-date(current-date())
7. Returns n-length substring from start position
substring(str1, start, len)
instinct-values(item1, item2, item3...))
substring-before(str1, str2)
Xpath operators
8. Returns everything before the first occurrence of str2
books/book[price > 35.00]
substring-before(str1, str2)
child nodes
books/book[1]
9. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
Xpath operators
normalize-space(str)
attribute node
seconds-from-time(time)
10. Replaces chars of str2 found in str1 with chars of str3
transforming
translate(str1, str2, str3)
path expressions
string-length()
11. Selects all title elements of the book element AND all price elements in the entire document
Predicates
/bookstore/book/title | //price
remove((item1, item2, item3...), position)
string-join((str1, str2, str3), separator)
12. Converts value to a string
Xpath operators
path
string(arg)
transforming
13. Selects attributes
starts-with(str1, str2)
div
@
Predicates
14. Predicates work somewhat like _____________
parent
standard function
usable document
arrays and functions
15. Element nodes may have zero - one - or more _________
.
remove((item1, item2, item3...), position)
number(arg)
child nodes
16. Selects all title AND price elements of all book elements
nodes
string(arg)
matches(str1, str2)
//book/title | //book/price
17. The process of taking raw XML - adding XSL - and outputting a document file of some type
sequence
day-from-date(date)
transformation
nodes
18. XML documents are treated as _________- so the root of the tree is called the document node or root node
standard function
/bookstore/book/title | //price
trees of nodes
string-length(str)
19. Converts string to lower case
div
path expressions
lower-case(str)
string-length(str)
20. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
attribute node
usable document
current-dateTime()
//*
21. Returns boolean true or boolean false
true() and false()
parent node
..
attribute node
22. Returns everything after the first occurrence of str2
//title | //price
Xpath operators
substring-after(str1, str2)
books/book[1]
23. Selects all elements in the document
standard function
syntax
compare(arg1, arg2)
//*
24. Concatenates strings together with separator between each string
string-join((str1, str2, str3), separator)
syntax
standard function
lower-case(str)
25. every element and every attribute have just one _________
parent node
string-length(str)
standard function
contains(str1, str2)
26. Returns timezone value from time passed
timezone-from-time(time)
processing-instruction
contains(str1, str2)
month-from-date(current-date())
27. Returns absolute value (example abs(-2.5) returns 2.5
index-of((item1, item2), item3...), target)
abs(num)
normalize-space(str)
current-dateTime()
28. Selects from the root node
'/'
29. Returns next lowest integer
substring(str,start)
string-length()
floor(num)
Predicates
30. Selects all title AND price elements in the entire document
parent
//title | //price
//book[@isbn]
'//'
31. Returns October or 10 ?
//*
boolean(arg)
month-from-date(current-date())
remove((item1, item2, item3...), position)
32. Returns hour value from time passed
//book/title | //book/price
hours-from-time(time)
usable document
standard function
33. Returns 2008
year-from-date(current-date())
ends-with(str1, str2)
attribute node
'//'
34. Returns false if true - true if false (negative logic)
remove((item1, item2, item3...), position)
not(arg)
timezone-from-time(time)
books/book[last()]
35. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
not(arg)
path expressions
round(num)
parent node
36. Selects all book elements with an attribute isbn=
string-join((str1, str2, str3), separator)
parent node
//book[@isbn]
number(arg)
37. In str1, replaces all occurrences of str2 with str3
path expressions
ends-with(str1, str2)
replace(str1, str2, str3)
books/book[1]
38. Use a | to select more than one _____ (means AND)
abs(num)
//title[@*]
books/book[1]
path
39. Selects all book elements with a child element "price" with values greater than 35
@
XSLT
books/book[price > 35.00]
concat(str1, str2, str3...)
40. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
substring-after(str1, str2)
processing-instruction
parent
index-of((item1, item2), item3...), target)
41. Selects parent of current node
books/book[1]
processing-instruction
..
matches(str1, str2)
42. Returns logically rounded integer
true() and false()
round(num)
/bookstore/book/title | //price
remove((item1, item2, item3...), position)
43. The XPath division operator not "/" cuz "/" is used in path expressions
true() and false()
div
/bookstore/book/title | //price
string-length(str)
44. Returns true if str1 contains str2
string-join((str1, str2, str3), separator)
contains(str1, str2)
//book[@isbn]
@
45. Trims leading and trailing spaces
normalize-space(str)
arrays and functions
index-of((item1, item2), item3...), target)
/bookstore/book/title | //price
46. 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)
hours-from-time(time)
current-dateTime()
lower-case(str)
47. Returns substring from start position to end of string
books/book[1]
..
substring(str,start)
//*
48. XPath is a for defining parts of an XML document
nodes
string-join((str1, str2, str3), separator)
ceiling(num)
syntax
49. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
books/book[price > 35.00]
current-time()
insert-before((item1, item2, item3...), positionX, itemX)
remove((item1, item2, item3...), position)
50. Returns today's date
Xpath operators
contains(str1, str2)
//title | //price
current-date()