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