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. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
substring(str1, start, len)
Xpath operators
parent node
substring-after(str1, str2)
2. Compares strings, returns 0 if same, -1 if not same
compare(arg1, arg2)
starts-with(str1, str2)
lower-case(str)
processor application
3. Returns October or 10 ?
translate(str1, str2, str3)
Predicates
substring(str,start)
month-from-date(current-date())
4. Selects all title AND price elements of all book elements
//book/title | //book/price
ceiling(num)
Xpath operators
processor application
5. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
day-from-date(date)
path expressions
/bookstore/book/title | //price
..
6. Returns true if str2 appears anywhere inside str1
path
month-from-date(date)
replace(str1, str2, str3)
matches(str1, str2)
7. Returns true if str1 ends with str2
substring(str1, start, len)
'//'
ends-with(str1, str2)
syntax
8. Selects all title elements which have any attribute
//title[@*]
current-date()
ceiling(num)
floor(num)
9. Selects first two book elements from the children of books element
trees of nodes
round(num)
books/book[position()
/bookstore/*
10. Returns second value from time passed
.
current-time()
number(arg)
seconds-from-time(time)
11. Selects all elements in the document
compare(arg1, arg2)
//*
//book/title | //book/price
books/book[price > 35.00]
12. Selects all title AND price elements in the entire document
//title | //price
hours-from-time(time)
translate(str1, str2, str3)
syntax
13. Selects all book elements with a child element "price" with values greater than 35
starts-with(str1, str2)
/bookstore/book/title | //price
books/book[price > 35.00]
abs(num)
14. Selects all the child nodes of the bookstore element
insert-before((item1, item2, item3...), positionX, itemX)
string-join((str1, str2, str3), separator)
/bookstore/*
string-length(str)
15. Returns logically rounded integer
child nodes
processing-instruction
round(num)
books/book[last()]
16. 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
17. Returns everything before the first occurrence of str2
abs(num)
arrays and functions
substring-before(str1, str2)
instinct-values(item1, item2, item3...))
18. Returns length of current node string
string-length()
//title | //price
@
//book/title | //book/price
19. Returns next lowest integer
month-from-date(date)
substring(str1, start, len)
floor(num)
day-from-date(date)
20. Transformation is actually accomplished by a _____________ like Saxon XSLT
processor application
ceiling(num)
XSLT
string-length(str)
21. XPath is a for defining parts of an XML document
Predicates
syntax
attribute node
compare(arg1, arg2)
22. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
remove((item1, item2, item3...), position)
transformation
true() and false()
contains(str1, str2)
23. Returns false or true
processing-instruction
.
boolean(arg)
starts-with(str1, str2)
24. Replaces chars of str2 found in str1 with chars of str3
Predicates
books/book[last()]
standard function
translate(str1, str2, str3)
25. Returns time right now
substring(str1, start, len)
string-join((str1, str2, str3), separator)
current-time()
//title[@*]
26. Converts value to a string
starts-with(str1, str2)
books/book[1]
parent
string(arg)
27. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
ceiling(num)
/bookstore/book/title | //price
attribute node
substring(str1, start, len)
28. Returns absolute value (example abs(-2.5) returns 2.5
string-length(str)
normalize-space(str)
substring(str,start)
abs(num)
29. Returns 2008
seconds-from-time(time)
year-from-date(current-date())
matches(str1, str2)
XSLT
30. In str1, replaces all occurrences of str2 with str3
@
floor(num)
day-from-date(date)
replace(str1, str2, str3)
31. Converts string to upper case
year-from-date(current-date())
timezone-from-time(time)
upper-case(str)
translate(str1, str2, str3)
32. Returns hour value from time passed
books/book[last()]
hours-from-time(time)
starts-with(str1, str2)
path
33. XML documents are treated as _________- so the root of the tree is called the document node or root node
/bookstore/*
trees of nodes
abs(num)
syntax
34. XPath contains a library of _________
round(num)
standard function
..
day-from-date(date)
35. The process of taking raw XML - adding XSL - and outputting a document file of some type
transformation
attribute node
trees of nodes
round(num)
36. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
books/book[1]
normalize-space(str)
insert-before((item1, item2, item3...), positionX, itemX)
not(arg)
37. Returns today's date
substring-after(str1, str2)
transformation
current-date()
lower-case(str)
38. Selects current node
concat(str1, str2, str3...)
.
year-from-date(date)
..
39. Selects from the root node
'/'
40. Selects all book elements with an attribute isbn=
//book[@isbn]
translate(str1, str2, str3)
processing-instruction
substring(str,start)
41. Returns n-length substring from start position
Predicates
substring(str1, start, len)
/bookstore/book/title | //price
replace(str1, str2, str3)
42. Trims leading and trailing spaces
string-length()
normalize-space(str)
trees of nodes
remove((item1, item2, item3...), position)
43. Returns year value out of the date passed
year-from-date(date)
child nodes
current-date()
criteria
44. The XPath division operator not "/" cuz "/" is used in path expressions
..
div
current-dateTime()
remove((item1, item2, item3...), position)
45. Selects all title elements of the book element AND all price elements in the entire document
/bookstore/book/title | //price
syntax
month-from-date(date)
processor application
46. 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
compare(arg1, arg2)
number(arg)
47. Returns minute value from time passed
timezone-from-time(time)
minutes-from-time(time)
round(num)
/bookstore/*
48. Returns next highest integer
true() and false()
substring-after(str1, str2)
ceiling(num)
month-from-date(current-date())
49. Returns all unique values in that collection - example: distinct-values(a, b, c, d, a, c) returns (a, b, c, d)
starts-with(str1, str2)
arrays and functions
/bookstore/*
instinct-values(item1, item2, item3...))
50. Returns day value from date passed
day-from-date(date)
starts-with(str1, str2)
matches(str1, str2)
concat(str1, str2, str3...)