In some search operations in calibre one can use an xpath expression to get the values for particular tags, i.e. the following expression:
Code:
//h:div[re:test(@class, "figbox", "i")]
selects the content of a "div" tag whose "class" attribute is set to "figbox", so in the following html line:
Code:
<div class="figbox">Volterra</div>
the preceding xpath expression get the value "Volterra".
Now, with the following processing-instructions
Code:
<?bag value="2" content="Volterra"?>
<?bag value="3" content="Ferrara"?>
which xpath expression can I use to obtain the value "Ferrara" and not "Volterra"?
EDIT ===============================
I've tried putting in a book the following line
Code:
<?bag value="3" content="Ferrara"?>
and trying the following expression to add the word "Ferrara" in the ToC:
Code:
//processing-instruction("bag")[@value="3"]/@content
but I get only
Code:
"calibre, version 3.30.0
ERROR: No items found: No items were found that could be added to the Table of Contents.
ss