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 complete date/time
timezone-from-time(time)
month-from-date(current-date())
current-time()
current-dateTime()
2. Returns next highest integer
syntax
month-from-date(current-date())
..
ceiling(num)
3. Selects all title elements which have any attribute
Xpath operators
//title[@*]
transformation
number(arg)
4. Returns everything before the first occurrence of str2
//book/title | //book/price
matches(str1, str2)
//book[@isbn]
substring-before(str1, str2)
5. Returns all unique values in that collection - example: distinct-values(a, b, c, d, a, c) returns (a, b, c, d)
path expressions
instinct-values(item1, item2, item3...))
usable document
string-join((str1, str2, str3), separator)
6. Returns false or true
starts-with(str1, str2)
remove((item1, item2, item3...), position)
boolean(arg)
seconds-from-time(time)
7. Selects all title AND price elements of all book elements
criteria
//book/title | //book/price
upper-case(str)
substring(str1, start, len)
8. Replaces chars of str2 found in str1 with chars of str3
floor(num)
translate(str1, str2, str3)
matches(str1, str2)
standard function
9. Returns 2008
//book[@isbn]
ceiling(num)
year-from-date(current-date())
remove((item1, item2, item3...), position)
10. every element and every attribute have just one _________
parent node
parent
'//'
hours-from-time(time)
11. XSL is what we use to get from readable to _________
not(arg)
usable document
number(arg)
criteria
12. Returns timezone value from time passed
seconds-from-time(time)
substring(str1, start, len)
timezone-from-time(time)
/bookstore/book/title | //price
13. Returns second value from time passed
/bookstore/*
translate(str1, str2, str3)
current-time()
seconds-from-time(time)
14. Selects attributes
@
index-of((item1, item2), item3...), target)
remove((item1, item2, item3...), position)
/bookstore/book/title | //price
15. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
..
compare(arg1, arg2)
transforming
index-of((item1, item2), item3...), target)
16. Selects all title AND price elements in the entire document
abs(num)
//title | //price
books/book[last()]
transforming
17. Predicates work somewhat like _____________
arrays and functions
starts-with(str1, str2)
seconds-from-time(time)
..
18. _______ have 3 primary relationships: parent - child - sibling
Xpath operators
nodes
true() and false()
hours-from-time(time)
19. Selects from the root node
'/'
20. Converts string number to numeric value
number(arg)
XSLT
'//'
'/'
21. XPath is a for defining parts of an XML document
month-from-date(date)
syntax
compare(arg1, arg2)
path expressions
22. Selects all book elements with a child element "price" with values greater than 35
parent node
books/book[price > 35.00]
books/book[position()
/bookstore/book/title | //price
23. The XPath division operator not "/" cuz "/" is used in path expressions
round(num)
minutes-from-time(time)
index-of((item1, item2), item3...), target)
div
24. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
processor application
round(num)
index-of((item1, item2), item3...), target)
XSLT
25. ________ allow more specific selections within the XPath
.
ends-with(str1, str2)
Predicates
contains(str1, str2)
26. selects first book element from the children of books element
upper-case(str)
insert-before((item1, item2, item3...), positionX, itemX)
'/'
books/book[1]
27. Returns next lowest integer
XSLT
floor(num)
usable document
'/'
28. Returns day value from date passed
day-from-date(date)
Predicates
path expressions
ends-with(str1, str2)
29. xpath function categories: numeric - string - boolea - date/time - ________
books/book[1]
//*
sequence
timezone-from-time(time)
30. Selects first two book elements from the children of books element
sequence
books/book[position()
arrays and functions
attribute node
31. Selects all elements in the document
true() and false()
//*
substring-before(str1, str2)
trees of nodes
32. Returns true if str1 ends with str2
criteria
number(arg)
translate(str1, str2, str3)
ends-with(str1, str2)
33. Returns false if true - true if false (negative logic)
transformation
normalize-space(str)
not(arg)
current-date()
34. Returns month value out of date passed
//book[@isbn]
month-from-date(date)
Xpath operators
round(num)
35. Selects parent of current node
books/book[position()
//book[@isbn]
transformation
..
36. 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)
attribute node
transformation
string(arg)
37. Trims leading and trailing spaces
substring-after(str1, str2)
normalize-space(str)
transformation
starts-with(str1, str2)
38. Returns length of current node string
insert-before((item1, item2, item3...), positionX, itemX)
@
replace(str1, str2, str3)
string-length()
39. Returns today's date
//book[@isbn]
matches(str1, str2)
processor application
current-date()
40. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
transforming
string-length()
attribute node
substring-before(str1, str2)
41. Returns n-length substring from start position
//title[@*]
substring(str1, start, len)
timezone-from-time(time)
true() and false()
42. Returns substring from start position to end of string
path
substring(str,start)
matches(str1, str2)
lower-case(str)
43. Sibling nodes all have the same ______
year-from-date(date)
'/'
parent
day-from-date(date)
44. Returns true if str2 appears anywhere inside str1
matches(str1, str2)
path expressions
substring(str,start)
Xpath operators
45. Returns time right now
path expressions
normalize-space(str)
current-time()
current-date()
46. 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)
seconds-from-time(time)
child nodes
processing-instruction
47. Travels from current node to select nodes that match - wherever they are
48. XML documents are treated as _________- so the root of the tree is called the document node or root node
insert-before((item1, item2, item3...), positionX, itemX)
day-from-date(date)
round(num)
trees of nodes
49. Selects all title elements of the book element AND all price elements in the entire document
//book/title | //book/price
/bookstore/book/title | //price
substring(str1, start, len)
syntax
50. Returns logically rounded integer
Predicates
round(num)
month-from-date(date)
normalize-space(str)