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
translate(str1, str2, str3)
day-from-date(date)
attribute node
true() and false()
2. Selects parent of current node
..
arrays and functions
path
insert-before((item1, item2, item3...), positionX, itemX)
3. Selects attributes
trees of nodes
round(num)
standard function
@
4. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
books/book[1]
Xpath operators
path
month-from-date(date)
5. ________ allow more specific selections within the XPath
floor(num)
remove((item1, item2, item3...), position)
matches(str1, str2)
Predicates
6. The XPath division operator not "/" cuz "/" is used in path expressions
instinct-values(item1, item2, item3...))
string-length()
div
seconds-from-time(time)
7. Seven kinds of nodes in XPath: element - attribute - text - namespace - __________ - comment - document (root) nodes - a.k.a. DECANT-PI
books/book[price > 35.00]
//book/title | //book/price
processing-instruction
starts-with(str1, str2)
8. every element and every attribute have just one _________
abs(num)
//book/title | //book/price
minutes-from-time(time)
parent node
9. Returns complete date/time
criteria
index-of((item1, item2), item3...), target)
minutes-from-time(time)
current-dateTime()
10. Returns year value out of the date passed
@
//book[@isbn]
starts-with(str1, str2)
year-from-date(date)
11. Returns length of passed string
XSLT
index-of((item1, item2), item3...), target)
string-length(str)
matches(str1, str2)
12. XSL is what we use to get from readable to _________
substring-before(str1, str2)
@
usable document
starts-with(str1, str2)
13. Predicates work somewhat like _____________
/bookstore/*
arrays and functions
true() and false()
'//'
14. Returns false if true - true if false (negative logic)
not(arg)
hours-from-time(time)
current-date()
//title[@*]
15. Use a | to select more than one _____ (means AND)
not(arg)
path
seconds-from-time(time)
parent
16. Concatenates strings together (example concat('It",'is','cool') returns "Itiscool"
//book[@isbn]
concat(str1, str2, str3...)
'/'
substring(str1, start, len)
17. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
upper-case(str)
insert-before((item1, item2, item3...), positionX, itemX)
remove((item1, item2, item3...), position)
//*
18. Selects all the child nodes of the bookstore element
path
round(num)
/bookstore/*
@
19. Returns true if str1 ends with str2
current-time()
abs(num)
remove((item1, item2, item3...), position)
ends-with(str1, str2)
20. Selects all title AND price elements in the entire document
//title | //price
'/'
lower-case(str)
usable document
21. Returns October or 10 ?
year-from-date(current-date())
month-from-date(current-date())
compare(arg1, arg2)
XSLT
22. Converts string to lower case
processing-instruction
lower-case(str)
contains(str1, str2)
substring(str1, start, len)
23. Returns 2008
year-from-date(current-date())
not(arg)
books/book[position()
/bookstore/book/title | //price
24. Converts value to a string
div
month-from-date(current-date())
string(arg)
//book[@isbn]
25. 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
26. Concatenates strings together with separator between each string
'//'
processing-instruction
string-join((str1, str2, str3), separator)
path
27. Selects all book elements with an attribute isbn=
books/book[1]
'//'
Predicates
//book[@isbn]
28. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
current-dateTime()
normalize-space(str)
books/book[last()]
index-of((item1, item2), item3...), target)
29. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
string-length(str)
remove((item1, item2, item3...), position)
month-from-date(current-date())
//*
30. Returns true if str1 contains str2
day-from-date(date)
contains(str1, str2)
books/book[position()
syntax
31. Returns substring from start position to end of string
child nodes
attribute node
substring(str,start)
standard function
32. Selects from the root node
'/'
33. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
substring-before(str1, str2)
transforming
true() and false()
normalize-space(str)
34. Selects last book element from the children of books element
day-from-date(date)
minutes-from-time(time)
books/book[last()]
@
35. Selects current node
XSLT
.
day-from-date(date)
current-time()
36. Returns true if str2 appears anywhere inside str1
abs(num)
matches(str1, str2)
nodes
year-from-date(current-date())
37. Returns logically rounded integer
matches(str1, str2)
true() and false()
round(num)
books/book[position()
38. In str1, replaces all occurrences of str2 with str3
translate(str1, str2, str3)
replace(str1, str2, str3)
minutes-from-time(time)
month-from-date(current-date())
39. selects first book element from the children of books element
books/book[1]
ceiling(num)
not(arg)
upper-case(str)
40. Returns boolean true or boolean false
nodes
month-from-date(current-date())
true() and false()
processing-instruction
41. Selects all title elements which have any attribute
books/book[price > 35.00]
transforming
//title[@*]
.
42. Selects first two book elements from the children of books element
seconds-from-time(time)
upper-case(str)
books/book[position()
compare(arg1, arg2)
43. Returns everything after the first occurrence of str2
upper-case(str)
floor(num)
nodes
substring-after(str1, str2)
44. Returns time right now
//*
current-time()
substring-after(str1, str2)
concat(str1, str2, str3...)
45. Compares strings, returns 0 if same, -1 if not same
compare(arg1, arg2)
substring(str,start)
@
'//'
46. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
path expressions
not(arg)
current-dateTime()
current-date()
47. XML documents are treated as _________- so the root of the tree is called the document node or root node
//book/title | //book/price
/bookstore/book/title | //price
Predicates
trees of nodes
48. 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
transforming
current-dateTime()
processor application
criteria
49. _______ have 3 primary relationships: parent - child - sibling
boolean(arg)
div
nodes
/bookstore/book/title | //price
50. Selects all elements in the document
//*
month-from-date(current-date())
round(num)
XSLT