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 title AND price elements of all book elements
day-from-date(date)
index-of((item1, item2), item3...), target)
//book/title | //book/price
hours-from-time(time)
2. Predicates work somewhat like _____________
day-from-date(date)
arrays and functions
@
attribute node
3. xpath function categories: numeric - string - boolea - date/time - ________
sequence
boolean(arg)
path expressions
round(num)
4. Returns n-length substring from start position
/bookstore/book/title | //price
//title | //price
substring(str1, start, len)
matches(str1, str2)
5. Transformation is actually accomplished by a _____________ like Saxon XSLT
/bookstore/book/title | //price
processor application
year-from-date(date)
//book[@isbn]
6. The process of taking raw XML - adding XSL - and outputting a document file of some type
transformation
normalize-space(str)
ends-with(str1, str2)
books/book[last()]
7. Returns complete date/time
path
current-dateTime()
..
minutes-from-time(time)
8. Use a | to select more than one _____ (means AND)
processing-instruction
hours-from-time(time)
path
insert-before((item1, item2, item3...), positionX, itemX)
9. _______ have 3 primary relationships: parent - child - sibling
current-time()
upper-case(str)
nodes
ceiling(num)
10. Selects current node
.
ceiling(num)
//title[@*]
'/'
11. Seven kinds of nodes in XPath: element - attribute - text - namespace - __________ - comment - document (root) nodes - a.k.a. DECANT-PI
/bookstore/*
processing-instruction
transformation
lower-case(str)
12. Returns today's date
instinct-values(item1, item2, item3...))
ends-with(str1, str2)
XSLT
current-date()
13. Returns timezone value from time passed
timezone-from-time(time)
..
insert-before((item1, item2, item3...), positionX, itemX)
'/'
14. Compares strings, returns 0 if same, -1 if not same
path
compare(arg1, arg2)
//book/title | //book/price
transformation
15. Converts string to upper case
insert-before((item1, item2, item3...), positionX, itemX)
/bookstore/book/title | //price
.
upper-case(str)
16. Converts string number to numeric value
div
number(arg)
matches(str1, str2)
not(arg)
17. Returns hour value from time passed
/bookstore/book/title | //price
'/'
@
hours-from-time(time)
18. Selects from the root node
'/'
19. Selects last book element from the children of books element
books/book[last()]
Predicates
string-length(str)
Xpath operators
20. Returns boolean true or boolean false
path
substring(str,start)
true() and false()
month-from-date(current-date())
21. Returns second value from time passed
criteria
seconds-from-time(time)
transforming
translate(str1, str2, str3)
22. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
starts-with(str1, str2)
books/book[price > 35.00]
path expressions
standard function
23. Sibling nodes all have the same ______
parent
path expressions
remove((item1, item2, item3...), position)
/bookstore/*
24. every element and every attribute have just one _________
parent
starts-with(str1, str2)
insert-before((item1, item2, item3...), positionX, itemX)
parent node
25. Returns absolute value (example abs(-2.5) returns 2.5
month-from-date(date)
arrays and functions
abs(num)
string-join((str1, str2, str3), separator)
26. Returns true if str1 starts with str2
starts-with(str1, str2)
/bookstore/book/title | //price
concat(str1, str2, str3...)
usable document
27. Returns false or true
starts-with(str1, str2)
books/book[1]
criteria
boolean(arg)
28. Returns true if str2 appears anywhere inside str1
usable document
matches(str1, str2)
path
attribute node
29. Returns substring from start position to end of string
substring(str,start)
timezone-from-time(time)
processor application
@
30. 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
31. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
//book[@isbn]
insert-before((item1, item2, item3...), positionX, itemX)
lower-case(str)
remove((item1, item2, item3...), position)
32. In str1, replaces all occurrences of str2 with str3
timezone-from-time(time)
replace(str1, str2, str3)
remove((item1, item2, item3...), position)
/bookstore/*
33. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
//title | //price
transforming
index-of((item1, item2), item3...), target)
current-time()
34. Returns 2008
syntax
year-from-date(current-date())
index-of((item1, item2), item3...), target)
standard function
35. Element nodes may have zero - one - or more _________
normalize-space(str)
ceiling(num)
child nodes
number(arg)
36. Replaces chars of str2 found in str1 with chars of str3
translate(str1, str2, str3)
starts-with(str1, str2)
insert-before((item1, item2, item3...), positionX, itemX)
compare(arg1, arg2)
37. Selects all elements in the document
'/'
month-from-date(current-date())
books/book[last()]
//*
38. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
.
child nodes
insert-before((item1, item2, item3...), positionX, itemX)
attribute node
39. Selects attributes
'/'
month-from-date(date)
@
true() and false()
40. Returns false if true - true if false (negative logic)
string-length()
not(arg)
starts-with(str1, str2)
standard function
41. Concatenates strings together (example concat('It",'is','cool') returns "Itiscool"
string-join((str1, str2, str3), separator)
books/book[1]
//title[@*]
concat(str1, str2, str3...)
42. Returns year value out of the date passed
current-time()
year-from-date(date)
.
books/book[last()]
43. Selects all title elements which have any attribute
instinct-values(item1, item2, item3...))
//title[@*]
month-from-date(date)
//*
44. Returns length of current node string
//title | //price
XSLT
string-length()
matches(str1, str2)
45. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
timezone-from-time(time)
transforming
string-length(str)
insert-before((item1, item2, item3...), positionX, itemX)
46. Converts value to a string
string(arg)
insert-before((item1, item2, item3...), positionX, itemX)
//title | //price
boolean(arg)
47. Selects parent of current node
div
books/book[position()
..
trees of nodes
48. Selects all title elements of the book element AND all price elements in the entire document
/bookstore/book/title | //price
ends-with(str1, str2)
floor(num)
nodes
49. Returns true if str1 ends with str2
substring(str,start)
ends-with(str1, str2)
books/book[last()]
transformation
50. selects first book element from the children of books element
month-from-date(date)
abs(num)
'//'
books/book[1]