Okay, that's much more helpful, thank you! And it works brilliantly, (after I changed it to y, 9, 0 ;-) ). Nice!
However, it won't pick up the 'uid' I posted above. I'm not sure which bit is the raw metadata from the .epub itself, which is what I want to get at. This is the line:
I note that it doesn't have opf:scheme, which ones where I can snarf the isbn (and now urn, thank you!) do. Here's a working one:
<dc:identifier id="PrimaryID" opf:scheme="URN">urn:uuid:9780547601328</dc:identifier>
So, what I'm trying to ask is, how do I ask Calibre to just give me whatever's inside the <dc:identifer>XXXXXX</dc:identifier> tag? (or, be able to actually specify the 'id' field... doing y=select(x, 'uid') fails...)
(I'm not at all keen to reinvent any wheels; if there's already something that does this, I'll happily use it. For one of the books I posted above, 'downloading metadata' fails for all sources, even though the ISBN is sitting right there!)