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