1
<mets:mets>
<mets:fileSec>
<mets:fileGrp ID="fileGrp001" USE="image/dynamic">
<mets:file ID="filebib4112678_18760203_1_24_0001_m.jp2" MIMETYPE="image/jp2" SIZE="5308416"
CREATED="2009-11-10T00:00:00" USE="image/dynamic" ADMID="techMD001"
CHECKSUM="c07f516d77d8a5ca452775d489ffe78c" CHECKSUMTYPE="MD5">
<mets:FLocat LOCTYPE="URL" xlink:type="simple"
xlink:href="file:bib4112678_18760203_1_24_0001_m.jp2"/>
</mets:file>
<mets:file ID="filebib4112678_18760203_1_24_0002_m.jp2" MIMETYPE="image/jp2" SIZE="5308416"
CREATED="2009-11-10T00:00:00" USE="image/dynamic" ADMID="techMD002"
CHECKSUM="6497ceb7a8477fbe9ba4ff9e6e57999f" CHECKSUMTYPE="MD5">
<mets:FLocat LOCTYPE="URL" xlink:type="simple"
xlink:href="file:bib4112678_18760203_1_24_0002_m.jp2"/>
</mets:file>
</mets:fileGrp>
<mets:fileGrp ID="fileGrp002" USE="text/alto">
<mets:file ID="filebib4112678_18760203_1_24_0001_alto.xml" MIMETYPE="text/xml" SIZE="1114112"
CREATED="2009-11-10T00:00:00" USE="text/alto" ADMID="techMD005"
CHECKSUM="e391852693f78d2eb024caf6dbdb97c6" CHECKSUMTYPE="MD5">
<mets:FLocat LOCTYPE="URL" xlink:type="simple"
xlink:href="file:bib4112678_18760203_1_24_0001_alto.xml"/>
</mets:file>
<mets:file ID="filebib4112678_18760203_1_24_0002_alto.xml" MIMETYPE="text/xml" SIZE="1114112"
CREATED="2009-11-10T00:00:00" USE="text/alto" ADMID="techMD006"
CHECKSUM="e391852693f78d2eb024caf6dbdb97c6" CHECKSUMTYPE="MD5">
<mets:FLocat LOCTYPE="URL" xlink:type="simple"
xlink:href="file:bib4112678_18760203_1_24_0002_alto.xml"/>
</mets:file>
</mets:fileGrp>
</mets:fileSec>
</mets:mets>
這個表達式:
/大都會/ fileSec/fileGrp [2] /文件[2]/@ ADMID
給出結果「techMD006」
不過,我想用這樣的表達/查詢得到同樣的結果:
/大都會/ fileSec //文件[4]/@ ADMID
即我不想理會fileGrp元素,因爲它使事情變得更加複雜。不幸的是,上述表達式不起作用。
有沒有人知道如何做出這樣的表達?
thanx!
檢查了這一點,我想你可以查詢你的文件元素,然後選擇你想要的索引... http://stackoverflow.com/questions/4007413/xpath -query-to-get-n-instance-of-an-element – 2011-03-25 15:47:46
這個FAQ的許多重複之一:http://stackoverflow.com/questions/4007413/xpath-query-to-get-nth-instance-的-AN-元件 – 2011-03-26 01:00:17