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. Returns second value from time passed
substring-before(str1, str2)
seconds-from-time(time)
ends-with(str1, str2)
arrays and functions
2. Selects first two book elements from the children of books element
books/book[position()
'//'
string(arg)
current-dateTime()
3. xpath function categories: numeric - string - boolea - date/time - ________
'/'
sequence
..
criteria
4. Selects all the child nodes of the bookstore element
/bookstore/*
arrays and functions
sequence
timezone-from-time(time)
5. ________ allow more specific selections within the XPath
Predicates
month-from-date(current-date())
minutes-from-time(time)
timezone-from-time(time)
6. XPath is a major element in _______
substring(str,start)
current-dateTime()
path expressions
XSLT
7. Concatenates strings together (example concat('It",'is','cool') returns "Itiscool"
//title[@*]
starts-with(str1, str2)
string-join((str1, str2, str3), separator)
concat(str1, str2, str3...)
8. XML documents are treated as _________- so the root of the tree is called the document node or root node
concat(str1, str2, str3...)
trees of nodes
instinct-values(item1, item2, item3...))
processing-instruction
9. Selects current node
.
contains(str1, str2)
nodes
div
10. selects first book element from the children of books element
//title | //price
path expressions
books/book[1]
boolean(arg)
11. Returns minute value from time passed
@
day-from-date(date)
.
minutes-from-time(time)
12. Returns all unique values in that collection - example: distinct-values(a, b, c, d, a, c) returns (a, b, c, d)
year-from-date(date)
Xpath operators
usable document
instinct-values(item1, item2, item3...))
13. The XPath division operator not "/" cuz "/" is used in path expressions
current-dateTime()
div
books/book[last()]
month-from-date(date)
14. Returns October or 10 ?
month-from-date(current-date())
year-from-date(current-date())
lower-case(str)
substring-after(str1, str2)
15. Returns everything after the first occurrence of str2
child nodes
substring-after(str1, str2)
current-time()
substring-before(str1, str2)
16. Returns next lowest integer
trees of nodes
floor(num)
current-time()
string-length()
17. XSL is what we use to get from readable to _________
usable document
processor application
string-length()
compare(arg1, arg2)
18. Returns true if str1 contains str2
path
translate(str1, str2, str3)
substring-before(str1, str2)
contains(str1, str2)
19. Converts string number to numeric value
transforming
compare(arg1, arg2)
number(arg)
ends-with(str1, str2)
20. Compares strings, returns 0 if same, -1 if not same
.
compare(arg1, arg2)
translate(str1, str2, str3)
books/book[1]
21. Selects all title elements of the book element AND all price elements in the entire document
substring-before(str1, str2)
/bookstore/book/title | //price
//book/title | //book/price
transforming
22. Element nodes may have zero - one - or more _________
insert-before((item1, item2, item3...), positionX, itemX)
path
child nodes
processor application
23. Selects last book element from the children of books element
books/book[last()]
compare(arg1, arg2)
instinct-values(item1, item2, item3...))
day-from-date(date)
24. Converts string to upper case
year-from-date(date)
string(arg)
trees of nodes
upper-case(str)
25. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
arrays and functions
day-from-date(date)
attribute node
year-from-date(current-date())
26. Returns true if str1 ends with str2
..
attribute node
books/book[price > 35.00]
ends-with(str1, str2)
27. Trims leading and trailing spaces
replace(str1, str2, str3)
normalize-space(str)
arrays and functions
transformation
28. Selects all book elements with an attribute isbn=
insert-before((item1, item2, item3...), positionX, itemX)
'//'
@
//book[@isbn]
29. 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
30. Returns n-length substring from start position
transformation
substring(str1, start, len)
usable document
transforming
31. Returns 2008
compare(arg1, arg2)
processing-instruction
books/book[position()
year-from-date(current-date())
32. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
parent node
string(arg)
insert-before((item1, item2, item3...), positionX, itemX)
processing-instruction
33. Selects all title AND price elements in the entire document
translate(str1, str2, str3)
//title | //price
concat(str1, str2, str3...)
/bookstore/book/title | //price
34. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
substring(str1, start, len)
index-of((item1, item2), item3...), target)
month-from-date(current-date())
nodes
35. XPath is a for defining parts of an XML document
/bookstore/*
syntax
//title | //price
path expressions
36. Returns length of current node string
substring-after(str1, str2)
string-length()
/bookstore/*
replace(str1, str2, str3)
37. Selects parent of current node
string-length(str)
criteria
floor(num)
..
38. Returns month value out of date passed
month-from-date(date)
boolean(arg)
substring-before(str1, str2)
processing-instruction
39. Returns true if str2 appears anywhere inside str1
transforming
compare(arg1, arg2)
matches(str1, str2)
books/book[price > 35.00]
40. 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
//book/title | //book/price
concat(str1, str2, str3...)
criteria
/bookstore/book/title | //price
41. Replaces chars of str2 found in str1 with chars of str3
substring(str,start)
translate(str1, str2, str3)
month-from-date(current-date())
boolean(arg)
42. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
//*
string-join((str1, str2, str3), separator)
remove((item1, item2, item3...), position)
abs(num)
43. The process of taking raw XML - adding XSL - and outputting a document file of some type
transformation
Xpath operators
not(arg)
floor(num)
44. Returns day value from date passed
day-from-date(date)
@
substring-before(str1, str2)
processing-instruction
45. Returns year value out of the date passed
year-from-date(date)
remove((item1, item2, item3...), position)
processor application
books/book[position()
46. Converts string to lower case
ceiling(num)
year-from-date(date)
index-of((item1, item2), item3...), target)
lower-case(str)
47. Use a | to select more than one _____ (means AND)
path
year-from-date(date)
month-from-date(date)
usable document
48. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
//title | //price
string-join((str1, str2, str3), separator)
transforming
child nodes
49. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
Xpath operators
month-from-date(current-date())
round(num)
/bookstore/book/title | //price
50. Returns false if true - true if false (negative logic)
timezone-from-time(time)
insert-before((item1, item2, item3...), positionX, itemX)
floor(num)
not(arg)