Mercurial > hg > mpdl-group
view software/eXist/webapp/mpdl/_stuff/testDev/get-fragment.xql @ 25:e9fe3186670c default tip
letzter Stand eingecheckt
author | Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 21 May 2013 10:19:32 +0200 |
parents | 5589d865af7a |
children |
line wrap: on
line source
xquery version "1.0"; declare namespace echo="http://www.mpiwg-berlin.mpg.de/ns/echo/1.0/"; declare namespace exist="http://exist.sourceforge.net/NS/exist"; declare namespace util = "http://exist-db.org/xquery/util"; declare namespace foo = "http://exist-db.org/xquery/foo"; let $coll := collection("/db/mpdl/documents/standard/archimedes/la") let $doc := doc("/db/mpdl/documents/standard/echo/zh/SongYingxing_1637.xml") let $pn := 300 let $xpathQuery := "//place" let $node := <a xmlns="test"><b xmlns="foo"/><bla xmlns="foooo">bla</bla><c/><bla>bla</bla>ggggg</a> let $nodeTest := <a xmlns="test"><b xmlns="foo"/>bar<c/><bla>bla</bla>ggggg</a> let $login := xmldb:login('/db/', 'admin', '') let $store := xmldb:store('/db/', 'test.xml', $node) let $doc := doc('/db/test.xml') let $ms1 := subsequence($doc//*:b, 1, 1) let $ms2 := subsequence($doc//*:c, 1, 1) let $result := util:get-fragment-between($ms1, $ms2, true()) let $bla := util:parse($result) return $bla