Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • MaX MaX
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 12
    • Issues 12
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • pdn-certic
  • MaXMaX
  • Issues
  • #60
Closed
Open
Issue created Apr 24, 2020 by Guillaume Porte@gporteDeveloper

teiCorpus TOC

Bonjour à tou.te.s

Deux petites propositions pour util.xqm > max.util:teiDocTitle

  • Il me semble que ce serait plus sécurisé d'ajouter [1] à la fin du xpath (au cas où un doc ait plusieurs titres) : [XPTY0004] item() expected, element()+ found:

  • A la base je cherchais à intégrer un document dont la racine est <teiCorpus>, donc plusieurs <TEI> à l'intérieur.

  • Avec cette modif, ça fonctionne pas mal

declare function max.util:teiDocTitle($dbName, $docPath){

  if(doc($dbName || '/' || $docPath)/tei:teiCorpus)
  then(doc($dbName || '/' || $docPath)/tei:teiCorpus/tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title[1])
  else(doc($dbName || '/' || $docPath)/tei:TEI/tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title[1])

};

Qu'est ce que vous en pensez ?

Edited Apr 24, 2020 by Guillaume Porte
Assignee
Assign to
Time tracking