Subject: [xsl] integrating xslt and xquery From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx> Date: Thu, 21 Oct 2004 12:21:52 -0400 |
declare default element namespace "http://docbook.org/docbook-ng"; declare namespace mods="http://www.loc.gov/mods/v3"; declare namespace xbiblio="http://xbiblio.sourceforge.net";
declare function xbiblio:resolve-references($article as element()) as element()* { (: extract citation linkend values from the docbook-ng file :) for $citation in distinct-values($article//biblioref/@linkend) (: find the corresponding mods record :) let $mods := doc("bib-data/*")//mods:mods[@ID = $citation] return if(empty($mods)) then (: not found: stop processing :) error(concat("No record found for reference ", $citation)) else $mods };
let $article := doc("test.xml")/article return <article> {$article/*} <bibliography> <mods:modsCollection> {xbiblio:resolve-references($article)} </mods:modsCollection> </bibliography> </article>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Assigning keywords according , Huditsch Roman | Thread | Re: [xsl] integrating xslt and xque, David Carlisle |
Re: [xsl] HTML sortable columns, Wendell Piez | Date | [xsl] Applying Templates to a Subst, Joe Heidenreich |
Month |