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