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 minute value from time passed
current-date()
insert-before((item1, item2, item3...), positionX, itemX)
sequence
minutes-from-time(time)
2. Selects from the root node
'/'
3. Returns boolean true or boolean false
processor application
true() and false()
//*
year-from-date(current-date())
4. Predicates work somewhat like _____________
normalize-space(str)
div
arrays and functions
ceiling(num)
5. Replaces chars of str2 found in str1 with chars of str3
standard function
round(num)
arrays and functions
translate(str1, str2, str3)
6. Returns second value from time passed
Predicates
//book[@isbn]
books/book[price > 35.00]
seconds-from-time(time)
7. Selects all title AND price elements of all book elements
/bookstore/book/title | //price
transformation
//book/title | //book/price
not(arg)
8. XML documents are treated as _________- so the root of the tree is called the document node or root node
trees of nodes
nodes
//title[@*]
timezone-from-time(time)
9. XPath is a for defining parts of an XML document
upper-case(str)
syntax
normalize-space(str)
lower-case(str)
10. Converts string to lower case
lower-case(str)
.
replace(str1, str2, str3)
@
11. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
not(arg)
attribute node
substring-after(str1, str2)
instinct-values(item1, item2, item3...))
12. Compares strings, returns 0 if same, -1 if not same
compare(arg1, arg2)
starts-with(str1, str2)
string-length()
day-from-date(date)
13. Returns time right now
current-date()
day-from-date(date)
current-time()
year-from-date(date)
14. Returns false or true
boolean(arg)
//book/title | //book/price
concat(str1, str2, str3...)
translate(str1, str2, str3)
15. Returns length of current node string
string-length()
insert-before((item1, item2, item3...), positionX, itemX)
/bookstore/*
substring(str,start)
16. XPath contains a library of _________
'//'
instinct-values(item1, item2, item3...))
contains(str1, str2)
standard function
17. Returns next lowest integer
/bookstore/*
usable document
floor(num)
/bookstore/book/title | //price
18. XPath is a major element in _______
.
XSLT
arrays and functions
..
19. _______ have 3 primary relationships: parent - child - sibling
insert-before((item1, item2, item3...), positionX, itemX)
nodes
attribute node
transformation
20. Returns hour value from time passed
ceiling(num)
month-from-date(date)
hours-from-time(time)
//*
21. Transformation is actually accomplished by a _____________ like Saxon XSLT
criteria
ends-with(str1, str2)
string-length()
processor application
22. Selects all title AND price elements in the entire document
current-date()
//title | //price
seconds-from-time(time)
'//'
23. In str1, replaces all occurrences of str2 with str3
//title[@*]
sequence
upper-case(str)
replace(str1, str2, str3)
24. Returns everything before the first occurrence of str2
seconds-from-time(time)
round(num)
transformation
substring-before(str1, str2)
25. Selects all title elements of the book element AND all price elements in the entire document
index-of((item1, item2), item3...), target)
books/book[price > 35.00]
/bookstore/book/title | //price
day-from-date(date)
26. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
path expressions
string-length()
string-length(str)
'//'
27. Travels from current node to select nodes that match - wherever they are
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
28. selects first book element from the children of books element
normalize-space(str)
/bookstore/book/title | //price
remove((item1, item2, item3...), position)
books/book[1]
29. Selects last book element from the children of books element
translate(str1, str2, str3)
'//'
/bookstore/*
books/book[last()]
30. Returns everything after the first occurrence of str2
substring-after(str1, str2)
processing-instruction
day-from-date(date)
upper-case(str)
31. Selects all title elements which have any attribute
//title[@*]
syntax
/bookstore/book/title | //price
current-dateTime()
32. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
XSLT
books/book[last()]
Xpath operators
books/book[position()
33. 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
index-of((item1, item2), item3...), target)
month-from-date(current-date())
normalize-space(str)
34. Returns timezone value from time passed
string(arg)
abs(num)
books/book[1]
timezone-from-time(time)
35. Returns logically rounded integer
div
substring(str1, start, len)
substring(str,start)
round(num)
36. Returns absolute value (example abs(-2.5) returns 2.5
string-join((str1, str2, str3), separator)
seconds-from-time(time)
floor(num)
abs(num)
37. every element and every attribute have just one _________
parent node
normalize-space(str)
'//'
matches(str1, str2)
38. Returns all unique values in that collection - example: distinct-values(a, b, c, d, a, c) returns (a, b, c, d)
instinct-values(item1, item2, item3...))
processing-instruction
books/book[position()
books/book[1]
39. Returns day value from date passed
instinct-values(item1, item2, item3...))
normalize-space(str)
//title | //price
day-from-date(date)
40. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
contains(str1, str2)
insert-before((item1, item2, item3...), positionX, itemX)
true() and false()
round(num)
41. Returns year value out of the date passed
starts-with(str1, str2)
trees of nodes
year-from-date(date)
'/'
42. Selects all the child nodes of the bookstore element
/bookstore/*
ends-with(str1, str2)
normalize-space(str)
translate(str1, str2, str3)
43. ________ allow more specific selections within the XPath
Predicates
//*
child nodes
abs(num)
44. xpath function categories: numeric - string - boolea - date/time - ________
'/'
div
sequence
path expressions
45. Sibling nodes all have the same ______
upper-case(str)
parent
compare(arg1, arg2)
insert-before((item1, item2, item3...), positionX, itemX)
46. Selects attributes
attribute node
processing-instruction
sequence
@
47. Seven kinds of nodes in XPath: element - attribute - text - namespace - __________ - comment - document (root) nodes - a.k.a. DECANT-PI
div
matches(str1, str2)
year-from-date(current-date())
processing-instruction
48. Selects all elements in the document
'/'
processor application
//*
books/book[1]
49. Element nodes may have zero - one - or more _________
substring-before(str1, str2)
normalize-space(str)
child nodes
books/book[position()
50. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
index-of((item1, item2), item3...), target)
month-from-date(date)
substring(str1, start, len)
not(arg)