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