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