
1. Create a sequence consisting of the gear juicers followed by the centrifugal juicers.

   (//juicer[@type='gear'], //juicer[@type='centrifugal'])


2. Select the second juicer from the sequence created in (1).

   (//juicer[@type='gear'], //juicer[@type='centrifugal'])[2]


3. Remove the second juicer from the sequence created in (1) and return the resulting sequence.3.

   remove((//juicer[@type='gear'], //juicer[@type='centrifugal']), 2)


4. Create a sequence consisting of the names of the juicers. The sequence must be of atomic values, i.e.,
   not a sequence of element nodes.

   (//name/text())


5. Using the sequence created in (4), what position is 'Omega Juicer' at? Create an XPath expression to
   answer this question.

   index-of((//name/text()), 'Omega Juicer')


6. Repeat (4), but this time create a sequence of name nodes (not name atomic values).

   (//name)


7. Using the sequence created in (6), what position is the name node with value 'Omega Juicer' at? 
   Create an XPath expression to answer this question.

   index-of((//name), //name[. = 'Omega Juicer'])


8. Create a sequence of all the odd integers from one to one hundred.

   (1 to 100)[. mod 2 = 1]


9. How many items does the sequence in (8) produce? Create an XPath expression to answer this question.

   count((1 to 100)[. mod 2 = 1])


10. Repeat (4), but insert before the second name this name: 'Norwalk Juicer'.

   insert-before(//name/text(), 2, 'Norwalk Juicer')