I am very new to xslt, and found it can be easy or complex. I want to make clear some concepts. What is preceding-sibling and what is ancestor, after searching from google, I found ancestor explanation. and the chart from their website makes easier to understand.
But I still don't understand preceding-sibling
<product>
<inventory>
<drink>
<lemonade>
<price>$2.50</price>
<amount>20</amount>
</lemonade>
<pop>
<price>$1.50</price>
<amount>10</amount>
</pop>
</drink>
<service>
<address />
<phone />
<delivery> City </delivery>
</service>
<snack>
<chips>
<price>$4.50</price>
<amount>60</amount>
</chips>
</snack>
<hotfood></hotfood>
<totalprice> $15</totleprice>
</inventory>
</product>
so how do I read this preceding-sibling::pop/ancestor::inventory/totalprice
ancestor::inventory/totalprice = product\inventory\totalprice preceding-sibling::pop - I dont understand this one then how to read all together?
Many thanks