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