Maintenance

  • Home
  • Log in
  • « Moving github repos
  • Setup of new TV »

xpath for extracting text values (names) from children of node (persName)

Posted by sarneil on 31 Jan 2017 in Activity log

In xpath/xquery builder in oxygen:
set xquery 3.0

declare default element namespace "http://www.tei-c.org/ns/1.0";
let $names := for $n in //persName/string-join(descendant::*/text()," ") return $n
return string-join($names," ")

returns just the texts.

The equivalent in the xpath box above the editor
//persName/string-join(descendant::*/text()," ")

returns the strings, but also the system id etc for each that you then have to manually delete

This entry was posted by Stewart and filed under Activity log.

Maintenance

This blog is the location for all work involving software and hardware maintenance, updates, installs, etc., both routine and urgent.
  • Home
  • Recently
  • Archives
  • Categories

Search

Categories

  • All
  • Announcements
  • Hit by a bus
  • Labs
    • Activity log
    • Documentation
  • Notes
  • R & D
    • Activity log
    • Documentation
  • Servers
    • Activity log
    • Documentation
  • Tasks

All blogs

  • Academic
  • AdaptiveDB
  • Admin
  • Announcements
  • CanMys
  • Cascade
  • CGWP
  • ColDesp
  • Depts
  • DVPP
  • Endings
  • HCMC Blogs
  • Landscapes
  • LEMDO
  • Linguistics
  • Maint
  • LondonMap
  • Mariage
  • MoM
  • Moses
  • Pro-D
  • Projects
  • ScanCan
  • HumsSites
  • Wendat

This collection ©2022 by admin • Help • Open-source blog