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