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. The XPath division operator not "/" cuz "/" is used in path expressions
string-length(str)
/bookstore/book/title | //price
current-dateTime()
div
2. Returns length of passed string
attribute node
substring-after(str1, str2)
starts-with(str1, str2)
string-length(str)
3. Concatenates strings together (example concat('It",'is','cool') returns "Itiscool"
concat(str1, str2, str3...)
//title | //price
substring(str,start)
minutes-from-time(time)
4. Selects all book elements with an attribute isbn=
remove((item1, item2, item3...), position)
substring-before(str1, str2)
month-from-date(current-date())
//book[@isbn]
5. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
substring-after(str1, str2)
//book[@isbn]
year-from-date(current-date())
insert-before((item1, item2, item3...), positionX, itemX)
6. Sibling nodes all have the same ______
books/book[1]
parent
normalize-space(str)
XSLT
7. The process of taking raw XML - adding XSL - and outputting a document file of some type
minutes-from-time(time)
timezone-from-time(time)
child nodes
transformation
8. XPath contains a library of _________
standard function
parent node
current-time()
timezone-from-time(time)
9. Selects from the root node
'/'
10. Returns logically rounded integer
string-length(str)
round(num)
trees of nodes
day-from-date(date)
11. Returns everything before the first occurrence of str2
substring-after(str1, str2)
replace(str1, str2, str3)
substring-before(str1, str2)
month-from-date(date)
12. Selects all the child nodes of the bookstore element
Xpath operators
/bookstore/*
//*
concat(str1, str2, str3...)
13. Selects all book elements with a child element "price" with values greater than 35
current-date()
instinct-values(item1, item2, item3...))
insert-before((item1, item2, item3...), positionX, itemX)
books/book[price > 35.00]
14. Returns boolean true or boolean false
.
true() and false()
books/book[position()
nodes
15. xpath function categories: numeric - string - boolea - date/time - ________
ceiling(num)
XSLT
sequence
transformation
16. Returns day value from date passed
day-from-date(date)
boolean(arg)
div
number(arg)
17. Selects attributes
current-time()
@
.
substring(str1, start, len)
18. Returns true if str1 starts with str2
starts-with(str1, str2)
ends-with(str1, str2)
instinct-values(item1, item2, item3...))
ceiling(num)
19. Selects parent of current node
matches(str1, str2)
..
compare(arg1, arg2)
current-date()
20. Returns year value out of the date passed
processing-instruction
sequence
year-from-date(date)
index-of((item1, item2), item3...), target)
21. XML documents are treated as _________- so the root of the tree is called the document node or root node
year-from-date(current-date())
books/book[1]
boolean(arg)
trees of nodes
22. Converts string number to numeric value
starts-with(str1, str2)
remove((item1, item2, item3...), position)
number(arg)
attribute node
23. Transformation is actually accomplished by a _____________ like Saxon XSLT
upper-case(str)
replace(str1, str2, str3)
processor application
abs(num)
24. ________ allow more specific selections within the XPath
string-join((str1, str2, str3), separator)
criteria
floor(num)
Predicates
25. Selects all title elements which have any attribute
//title[@*]
timezone-from-time(time)
day-from-date(date)
transforming
26. Selects current node
.
true() and false()
books/book[position()
string-length()
27. Returns second value from time passed
substring(str1, start, len)
books/book[price > 35.00]
books/book[position()
seconds-from-time(time)
28. Converts value to a string
insert-before((item1, item2, item3...), positionX, itemX)
year-from-date(date)
string(arg)
string-length(str)
29. selects first book element from the children of books element
books/book[1]
trees of nodes
Predicates
div
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. Selects all title elements of the book element AND all price elements in the entire document
/bookstore/book/title | //price
abs(num)
//title[@*]
current-dateTime()
32. Returns month value out of date passed
child nodes
transformation
minutes-from-time(time)
month-from-date(date)
33. Returns complete date/time
current-dateTime()
seconds-from-time(time)
not(arg)
usable document
34. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
seconds-from-time(time)
abs(num)
replace(str1, str2, str3)
index-of((item1, item2), item3...), target)
35. Converts string to lower case
round(num)
lower-case(str)
day-from-date(date)
'/'
36. every element and every attribute have just one _________
/bookstore/*
Predicates
parent node
path expressions
37. Returns hour value from time passed
hours-from-time(time)
month-from-date(current-date())
/bookstore/book/title | //price
abs(num)
38. Returns length of current node string
parent node
string-length()
substring(str,start)
//*
39. Returns next lowest integer
path
parent
boolean(arg)
floor(num)
40. Returns October or 10 ?
trees of nodes
month-from-date(current-date())
translate(str1, str2, str3)
day-from-date(date)
41. Element nodes may have zero - one - or more _________
parent node
matches(str1, str2)
path
child nodes
42. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
nodes
attribute node
books/book[price > 35.00]
timezone-from-time(time)
43. Returns minute value from time passed
floor(num)
contains(str1, str2)
current-time()
minutes-from-time(time)
44. Selects all elements in the document
day-from-date(date)
//*
div
'/'
45. Selects last book element from the children of books element
syntax
attribute node
books/book[last()]
sequence
46. Compares strings, returns 0 if same, -1 if not same
compare(arg1, arg2)
starts-with(str1, str2)
.
string(arg)
47. Selects all title AND price elements in the entire document
string-length()
current-date()
//title | //price
substring-after(str1, str2)
48. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
//title[@*]
translate(str1, str2, str3)
Xpath operators
books/book[position()
49. Returns true if str1 contains str2
//title[@*]
transforming
@
contains(str1, str2)
50. Concatenates strings together with separator between each string
minutes-from-time(time)
string-join((str1, str2, str3), separator)
compare(arg1, arg2)
transformation