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. Gets position(s) of target item(s) - example: index-of(15, 40, 25, 40, 10), 40) returns (2, 4)
upper-case(str)
index-of((item1, item2), item3...), target)
//book/title | //book/price
nodes
2. Predicates work somewhat like _____________
'//'
arrays and functions
month-from-date(date)
books/book[last()]
3. Returns absolute value (example abs(-2.5) returns 2.5
abs(num)
year-from-date(current-date())
current-time()
month-from-date(date)
4. Selects current node
ceiling(num)
.
insert-before((item1, item2, item3...), positionX, itemX)
hours-from-time(time)
5. Trims leading and trailing spaces
trees of nodes
'/'
normalize-space(str)
processor application
6. Element nodes may have zero - one - or more _________
'/'
boolean(arg)
child nodes
transforming
7. Use a | to select more than one _____ (means AND)
substring-before(str1, str2)
round(num)
path
transformation
8. Selects all elements in the document
compare(arg1, arg2)
XSLT
//*
not(arg)
9. XPath is a major element in _______
parent
string(arg)
hours-from-time(time)
XSLT
10. 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[@*]
path expressions
current-time()
11. Selects all book elements with an attribute isbn=
//book[@isbn]
month-from-date(current-date())
ends-with(str1, str2)
attribute node
12. 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
starts-with(str1, str2)
string-length(str)
criteria
concat(str1, str2, str3...)
13. Returns false if true - true if false (negative logic)
ends-with(str1, str2)
not(arg)
round(num)
year-from-date(current-date())
14. Returns year value out of the date passed
year-from-date(date)
'//'
books/book[price > 35.00]
path expressions
15. Selects all title AND price elements in the entire document
//title | //price
string-length(str)
trees of nodes
.
16. Selects all book elements with a child element "price" with values greater than 35
nodes
books/book[price > 35.00]
//title[@*]
round(num)
17. Returns true if str1 starts with str2
boolean(arg)
seconds-from-time(time)
starts-with(str1, str2)
lower-case(str)
18. Seven kinds of nodes in XPath: element - attribute - text - namespace - __________ - comment - document (root) nodes - a.k.a. DECANT-PI
not(arg)
processing-instruction
//*
Xpath operators
19. Returns boolean true or boolean false
minutes-from-time(time)
substring-after(str1, str2)
processor application
true() and false()
20. Selects last book element from the children of books element
insert-before((item1, item2, item3...), positionX, itemX)
books/book[last()]
processor application
hours-from-time(time)
21. Returns time right now
current-time()
upper-case(str)
day-from-date(date)
.
22. Sibling nodes all have the same ______
processor application
parent
/bookstore/book/title | //price
books/book[price > 35.00]
23. Converts string to upper case
upper-case(str)
current-time()
/bookstore/*
ends-with(str1, str2)
24. Returns everything after the first occurrence of str2
substring-after(str1, str2)
Predicates
day-from-date(date)
'/'
25. xpath function categories: numeric - string - boolea - date/time - ________
concat(str1, str2, str3...)
seconds-from-time(time)
sequence
ceiling(num)
26. +, -, *, div, =, !=, <, <=, >, >=, or, and, mod (modulus)
syntax
Xpath operators
books/book[last()]
month-from-date(date)
27. XPath contains a library of _________
/bookstore/book/title | //price
standard function
'/'
//*
28. The process of taking raw XML - adding XSL - and outputting a document file of some type
year-from-date(date)
transformation
path expressions
attribute node
29. Converts string number to numeric value
books/book[price > 35.00]
/bookstore/*
number(arg)
concat(str1, str2, str3...)
30. 3 parts of XSL (eXtensible stylesheet language): Xpath for navigating XML documents - XSLT for ______ documents - XSL-FO for formatting XML documents
transforming
not(arg)
contains(str1, str2)
syntax
31. Returns false or true
substring-after(str1, str2)
syntax
//title[@*]
boolean(arg)
32. Returns true if str1 contains str2
contains(str1, str2)
processor application
true() and false()
day-from-date(date)
33. Selects from the root node
'/'
34. Returns true if str1 ends with str2
ends-with(str1, str2)
floor(num)
year-from-date(current-date())
translate(str1, str2, str3)
35. 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
36. Returns second value from time passed
ceiling(num)
seconds-from-time(time)
books/book[last()]
substring(str1, start, len)
37. 3 wildcards: ? matches any element node - @ matches any ___________ - node() matches any node of any kind
year-from-date(date)
syntax
current-time()
attribute node
38. selects first book element from the children of books element
path expressions
processing-instruction
books/book[1]
number(arg)
39. Returns length of passed string
remove((item1, item2, item3...), position)
string-length(str)
transforming
transformation
40. Returns n-length substring from start position
attribute node
usable document
books/book[price > 35.00]
substring(str1, start, len)
41. Selects all the child nodes of the bookstore element
/bookstore/*
transforming
@
parent
42. Returns October or 10 ?
month-from-date(current-date())
translate(str1, str2, str3)
replace(str1, str2, str3)
year-from-date(current-date())
43. Selects parent of current node
string-length(str)
string(arg)
..
round(num)
44. Returns 2008
year-from-date(current-date())
processor application
nodes
floor(num)
45. In str1, replaces all occurrences of str2 with str3
round(num)
processor application
replace(str1, str2, str3)
substring(str1, start, len)
46. Selects all title elements which have any attribute
arrays and functions
.
round(num)
//title[@*]
47. Selects all title AND price elements of all book elements
normalize-space(str)
books/book[1]
abs(num)
//book/title | //book/price
48. XPath uses ____________ to navigate in XML documents - selecting nodes or node-sets
//*
parent node
path expressions
processor application
49. Selects all title elements of the book element AND all price elements in the entire document
books/book[position()
/bookstore/book/title | //price
substring-before(str1, str2)
seconds-from-time(time)
50. Returns logically rounded integer
transformation
round(num)
current-time()
'/'