EXist rename element & attributes

出自DILA Wiki

declare namespace exist="http://exist.sourceforge.net/NS/exist"; declare namespace util="http://exist-db.org/xquery/util"; declare namespace tei = 'http://www.tei-c.org/ns/1.0';


(:下面的例子是 把所有被選取的persName 變更它的屬性名 rename @xml:id 為 key :) update rename collection('/db/fosizhi/xml/g017')//tei:persName/@xml:id as 'key'


update rename collection('/db/fosizhi/xml/g017')//tei:persName/@corresp as 'key'


詳情請見… [1]