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. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
arrays and functions
instinct-values(item1, item2, item3...))
books/book[1]
index-of((item1, item2), item3...), target)
2. Returns true if str1 starts with str2
string-length(str)
@
starts-with(str1, str2)
hours-from-time(time)
3. Selects all elements in the document
seconds-from-time(time)
books/book[last()]
month-from-date(current-date())
//*
4. Seven kinds of nodes in XPath: element - attribute - text - namespace - __________ - comment - document (root) nodes - a.k.a. DECANT-PI
parent
processing-instruction
timezone-from-time(time)
//book/title | //book/price
5. Returns everything after the first occurrence of str2
true() and false()
matches(str1, str2)
contains(str1, str2)
substring-after(str1, str2)
6. Replaces chars of str2 found in str1 with chars of str3
upper-case(str)
current-dateTime()
//book/title | //book/price
translate(str1, str2, str3)
7. Returns time right now
standard function
'/'
current-time()
string-length(str)
8. Converts string to upper case
processor application
contains(str1, str2)
replace(str1, str2, str3)
upper-case(str)
9. Predicates work somewhat like _____________
arrays and functions
number(arg)
processor application
processing-instruction
10. Returns absolute value (example abs(-2.5) returns 2.5
month-from-date(current-date())
abs(num)
//title | //price
standard function
11. Concatenates strings together (example concat('It",'is','cool') returns "Itiscool"
syntax
'//'
concat(str1, str2, str3...)
//*
12. XSL is what we use to get from readable to _________
books/book[position()
processor application
lower-case(str)
usable document
13. Selects all book elements with an attribute isbn=
//book[@isbn]
syntax
criteria
sequence
14. Returns today's date
current-date()
substring-before(str1, str2)
books/book[1]
Xpath operators
15. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
remove((item1, item2, item3...), position)
..
ends-with(str1, str2)
string-length()
16. Use a | to select more than one _____ (means AND)
substring(str,start)
XSLT
path
Xpath operators
17. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
not(arg)
month-from-date(date)
replace(str1, str2, str3)
Xpath operators
18. 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...))
XSLT
starts-with(str1, str2)
path expressions
19. The XPath division operator not "/" cuz "/" is used in path expressions
div
//title | //price
substring-before(str1, str2)
sequence
20. Returns 2008
'//'
syntax
remove((item1, item2, item3...), position)
year-from-date(current-date())
21. Selects all title AND price elements of all book elements
instinct-values(item1, item2, item3...))
remove((item1, item2, item3...), position)
//title | //price
//book/title | //book/price
22. Returns length of current node string
..
books/book[price > 35.00]
string-length()
lower-case(str)
23. Returns next lowest integer
standard function
true() and false()
floor(num)
//*
24. Returns next highest integer
attribute node
index-of((item1, item2), item3...), target)
ceiling(num)
insert-before((item1, item2, item3...), positionX, itemX)
25. Returns length of passed string
//book/title | //book/price
remove((item1, item2, item3...), position)
string-length(str)
XSLT
26. Returns false or true
boolean(arg)
Xpath operators
year-from-date(date)
lower-case(str)
27. In str1, replaces all occurrences of str2 with str3
'/'
day-from-date(date)
//title[@*]
replace(str1, str2, str3)
28. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
substring-after(str1, str2)
string-join((str1, str2, str3), separator)
lower-case(str)
path expressions
29. Returns substring from start position to end of string
substring-before(str1, str2)
substring(str,start)
XSLT
ceiling(num)
30. XPath is a for defining parts of an XML document
syntax
hours-from-time(time)
current-time()
.
31. 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
32. Element nodes may have zero - one - or more _________
child nodes
parent
day-from-date(date)
usable document
33. Converts value to a string
string(arg)
instinct-values(item1, item2, item3...))
abs(num)
XSLT
34. Concatenates strings together with separator between each string
timezone-from-time(time)
//book[@isbn]
string-join((str1, str2, str3), separator)
current-date()
35. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
transforming
Xpath operators
month-from-date(date)
string-length()
36. Returns true if str1 ends with str2
processor application
books/book[last()]
ends-with(str1, str2)
substring-after(str1, str2)
37. Selects attributes
'/'
/bookstore/*
@
true() and false()
38. Returns everything before the first occurrence of str2
'//'
substring-before(str1, str2)
abs(num)
syntax
39. Returns month value out of date passed
/bookstore/*
translate(str1, str2, str3)
month-from-date(date)
arrays and functions
40. Returns hour value from time passed
timezone-from-time(time)
Xpath operators
hours-from-time(time)
//title | //price
41. every element and every attribute have just one _________
parent node
div
current-date()
ceiling(num)
42. Selects all the child nodes of the bookstore element
/bookstore/*
hours-from-time(time)
//book/title | //book/price
day-from-date(date)
43. Selects from the root node
'/'
44. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
string(arg)
substring(str,start)
insert-before((item1, item2, item3...), positionX, itemX)
timezone-from-time(time)
45. Selects all title elements which have any attribute
substring-after(str1, str2)
criteria
//title[@*]
seconds-from-time(time)
46. Returns timezone value from time passed
timezone-from-time(time)
true() and false()
substring(str1, start, len)
div
47. Selects all title elements of the book element AND all price elements in the entire document
number(arg)
remove((item1, item2, item3...), position)
string(arg)
/bookstore/book/title | //price
48. Returns day value from date passed
standard function
day-from-date(date)
concat(str1, str2, str3...)
string(arg)
49. Trims leading and trailing spaces
normalize-space(str)
usable document
year-from-date(date)
processor application
50. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
attribute node
string(arg)
string-length(str)
current-time()