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