SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
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. Selects last book element from the children of books element
books/book[last()]
substring-after(str1, str2)
arrays and functions
/bookstore/book/title | //price
2. Returns today's date
starts-with(str1, str2)
not(arg)
current-date()
substring(str,start)
3. Inserts new itemX into the collection at the positionX - example insert-before("a", "b", "c"), 3, "z") returns (abzc)
insert-before((item1, item2, item3...), positionX, itemX)
matches(str1, str2)
//*
//book[@isbn]
4. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
remove((item1, item2, item3...), position)
normalize-space(str)
//book[@isbn]
Xpath operators
5. Returns next lowest integer
concat(str1, str2, str3...)
@
div
floor(num)
6. Selects all book elements with a child element "price" with values greater than 35
substring-before(str1, str2)
month-from-date(current-date())
/bookstore/*
books/book[price > 35.00]
7. Returns hour value from time passed
ceiling(num)
round(num)
string-join((str1, str2, str3), separator)
hours-from-time(time)
8. Returns October or 10 ?
criteria
//title[@*]
transformation
month-from-date(current-date())
9. Concatenates strings together with separator between each string
minutes-from-time(time)
Xpath operators
path
string-join((str1, str2, str3), separator)
10. Selects all elements in the document
starts-with(str1, str2)
sequence
//*
floor(num)
11. XSL is what we use to get from readable to _________
concat(str1, str2, str3...)
usable document
'/'
remove((item1, item2, item3...), position)
12. _______ have 3 primary relationships: parent - child - sibling
'//'
seconds-from-time(time)
..
nodes
13. Returns length of passed string
XSLT
true() and false()
starts-with(str1, str2)
string-length(str)
14. 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
number(arg)
criteria
contains(str1, str2)
'/'
15. Selects all title AND price elements of all book elements
'//'
parent node
concat(str1, str2, str3...)
//book/title | //book/price
16. XPath is a major element in _______
XSLT
path
starts-with(str1, str2)
attribute node
17. Returns timezone value from time passed
timezone-from-time(time)
hours-from-time(time)
/bookstore/*
current-date()
18. ________ allow more specific selections within the XPath
trees of nodes
current-date()
Predicates
books/book[last()]
19. Returns everything after the first occurrence of str2
month-from-date(current-date())
current-dateTime()
month-from-date(date)
substring-after(str1, str2)
20. Returns length of current node string
path expressions
string-length()
//title | //price
month-from-date(current-date())
21. Selects attributes
concat(str1, str2, str3...)
nodes
@
transforming
22. Travels from current node to select nodes that match - wherever they are
23. Converts value to a string
upper-case(str)
seconds-from-time(time)
string(arg)
translate(str1, str2, str3)
24. Selects first two book elements from the children of books element
//title[@*]
usable document
books/book[position()
/bookstore/*
25. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
transforming
substring(str,start)
not(arg)
usable document
26. XPath is a for defining parts of an XML document
syntax
hours-from-time(time)
starts-with(str1, str2)
processor application
27. Returns all unique values in that collection - example: distinct-values(a, b, c, d, a, c) returns (a, b, c, d)
instinct-values(item1, item2, item3...))
//title | //price
/bookstore/book/title | //price
substring-after(str1, str2)
28. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
attribute node
current-date()
concat(str1, str2, str3...)
substring-before(str1, str2)
29. Predicates work somewhat like _____________
arrays and functions
ends-with(str1, str2)
substring(str1, start, len)
/bookstore/book/title | //price
30. Returns false if true - true if false (negative logic)
not(arg)
Xpath operators
substring(str1, start, len)
books/book[1]
31. Selects all book elements with an attribute isbn=
true() and false()
substring(str,start)
transformation
//book[@isbn]
32. Replaces chars of str2 found in str1 with chars of str3
round(num)
translate(str1, str2, str3)
nodes
floor(num)
33. XML documents are treated as _________- so the root of the tree is called the document node or root node
trees of nodes
//book/title | //book/price
lower-case(str)
//book[@isbn]
34. Concatenates strings together (example concat('It",'is','cool') returns "Itiscool"
books/book[1]
replace(str1, str2, str3)
current-date()
concat(str1, str2, str3...)
35. Transformation is actually accomplished by a _____________ like Saxon XSLT
books/book[position()
seconds-from-time(time)
month-from-date(current-date())
processor application
36. Returns boolean true or boolean false
replace(str1, str2, str3)
true() and false()
//title[@*]
string(arg)
37. Returns minute value from time passed
current-date()
ceiling(num)
month-from-date(current-date())
minutes-from-time(time)
38. Use a | to select more than one _____ (means AND)
remove((item1, item2, item3...), position)
floor(num)
path
current-date()
39. Returns n-length substring from start position
substring(str1, start, len)
XSLT
sequence
compare(arg1, arg2)
40. Returns true if str1 ends with str2
ends-with(str1, str2)
string(arg)
contains(str1, str2)
processing-instruction
41. Selects from the root node
'/'
42. Trims leading and trailing spaces
normalize-space(str)
/bookstore/*
minutes-from-time(time)
attribute node
43. Removes item in the position - example: remove(("ab", "cd", "ef"), 1) returns ("cd", "ef")
current-time()
books/book[last()]
path expressions
remove((item1, item2, item3...), position)
44. Returns true if str1 starts with str2
'/'
round(num)
hours-from-time(time)
starts-with(str1, str2)
45. Returns complete date/time
floor(num)
current-dateTime()
index-of((item1, item2), item3...), target)
day-from-date(date)
46. Returns next highest integer
ceiling(num)
index-of((item1, item2), item3...), target)
current-time()
starts-with(str1, str2)
47. Seven kinds of nodes in XPath: element - attribute - text - namespace - __________ - comment - document (root) nodes - a.k.a. DECANT-PI
processing-instruction
month-from-date(date)
parent node
sequence
48. Selects all title elements which have any attribute
syntax
//title[@*]
year-from-date(date)
translate(str1, str2, str3)
49. Selects parent of current node
..
replace(str1, str2, str3)
/bookstore/book/title | //price
'//'
50. Compares strings, returns 0 if same, -1 if not same
compare(arg1, arg2)
//*
true() and false()
parent