View Single Post
Old 04-21-2010, 08:28 PM   #1
NASCARaddicted
Addict
NASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and grace
 
Posts: 340
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch, Pocketbook Touch HD
Need help with XPath

Hello

I don't knpw if this is possible or not, so I hope you can help me.

Right now I am working on an ebook in html.

The chapter starts with roman numbers and the chapter name. The roman number is in h3, the chapter name in h4.

So it looks like

III

A new Beginning.


Now, I want to convert it to epub with Calibre. Under chapter recognition, I used //*[re:match(name(), 'h4')] . In the chapter list, I see it as "A new Beginning". Basically, that is exactly what I wanted - in the past.

But now I thought to myself: It would be better, if the roman number would be included.
In the chapter list, it should look like III - A new Beginning
Is that possible ? I thought, something like //*[re:match(name(),'h3' - 'h4')] should work, but so far, the preview in Calibre doesn't show roman numbers.

Can anyone tell me, how the correct expression should be ?

Thanks in advance
NASCARaddicted is offline   Reply With Quote