Rebooting TEI Pointers

582 views

Published on

  • Be the first to comment

  • Be the first to like this

Rebooting TEI Pointers

  1. 1. Rebooting TEI PointersHugh A. Cayless, NYUTwitter: @hcaylessphilomousos@gmail.com
  2. 2. Outline✤ What are XPointers?✤ Why should you care?✤ Rebooting the TEI Pointer Guidelines✤ Implementation and examples
  3. 3. What are XPointers?✤ http://example.com/example.xml#xpath(//lb[@n=5]) { xpointer✤ Tacked on to a URL to indicate a section inside the document.✤ http://example.com/example.xml#anID (also an XPointer, technically)✤ TEI Xpointer Schemes: http://www.tei-c.org/release/doc/tei-p5-doc/en/html/SA.html#SATS
  4. 4. TEI Pointers address:✤ nodes (elements, attributes, or text nodes)✤ points (conceptual locations between elements or inside text nodes)✤ ranges (chunks of document between two points).
  5. 5. Why should you care?
  6. 6. <?xml version="1.0" encoding="UTF-8"?><foo type="barbecue"> <bar> <baz>Here be dragons.</baz> </bar></foo>
  7. 7. <?xml version="1.0" encoding="UTF-8"?><foo type="barbecue"> <bar> <baz>Here be dragons.</baz> </bar></foo> I want to say something about dragons...
  8. 8. <?xml version="1.0" encoding="UTF-8"?><foo type="barbecue"> <bar> <baz>Here be dragons.</baz> </bar></foo> I want to say something about dragons... <?xml version="1.0" encoding="UTF-8"?> <foo type="barbecue"> <bar> <baz>Here be <n xml:id="d1">dragons</n>.</baz> </bar> </foo>
  9. 9. <?xml version="1.0" encoding="UTF-8"?><foo type="barbecue"> <bar> <baz>Here be dragons.</baz> </bar></foo> I want to say something about dragons... <?xml version="1.0" encoding="UTF-8"?> <foo type="barbecue"> <bar> <baz>Here be <n xml:id="d1">dragons</n>.</baz> </bar> </foo> Easy.
  10. 10. Rebooting TEI Pointers
  11. 11. what we need to do✤ break out of the vicious cycle of apathy✤ implementations!✤ make the spec more detailed and clear
  12. 12. <?xml version="1.0" encoding="UTF-8"?> <foo type="barbecue"> <bar>start <p>Here be dragons.</p> </bar> </foo> end
  13. 13. start × <?xml version="1.0" encoding="UTF-8"?> <foo type="barbecue"> <bar> <p>Here be dragons.</p> </bar> </foo> end
  14. 14. #range(left(/foo),string-index(//p,10)) <?xml version="1.0" encoding="UTF-8"?> <foo type="barbecue"> <bar>start <p>Here be dragons.</p> </bar> </foo> end
  15. 15. #range(left(/foo),string-index(//p,10)) <?xml version="1.0" encoding="UTF-8"?> <foo type="barbecue"> <bar> start <p>Here be dragons.</p> </bar> </foo> end("n ", "n ", "Here be dr")
  16. 16. #range(right(//lb[@n=5]),string-index(//lb[@n=5],5) start <lb n="5"/><unclear>Ἰσ</unclear>ά<hi rend="diaeresis">ι</hi>ς ἁλιεύς <num value="5">ε</num> end
  17. 17. usage scenarios✤ Including and transcluding text ✤ I want to import chunks of document from outside, or from another part of my document.✤ Leveraging annotations or standoff markup during transformations ✤ I want to make standoff annotations and have their effects show up in the results
  18. 18. <div type="edition"> <ab> <lb n="5"/><unclear>Ἰσ</unclear>ά<hi rend="diaeresis">ι</hi>ς ἁλιεύς <num value="5">ε</num> </ab></div><div type="annotations"> <ab> <name ref="#name1"><ref target="#match(//lb[@n=5],Ἰσάις)"/></name> </ab></div>
  19. 19. <div type="edition"> <ab> <lb n="5"/><unclear>Ἰσ</unclear>ά<hi rend="diaeresis">ι</hi>ς ἁλιεύς <num value="5">ε</num> </ab> </div> <div type="annotations"> <ab> <name ref="#name1"><ref target="#match(//lb[@n=5],Ἰσάις)"/></name> </ab> </div>5 Ἰ̣σ̣άι(¨)ς ἁλιεύς ε On mouseover, we get more info about the person, name, etc., pulled from the annotation.
  20. 20. Ovid, Ibis, Merkel & Ehwald Ovid, Ibis – apparatus, Owen<?xml version="1.0" encoding="utf-8"?><TEI.2><text><body><div1 type="book" n="1" org="uniform" sample="complete"><p> <?xml version="1.0" encoding="UTF-8"?><pb id="p.103" /> <?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> <TEI<lb rend="displayNum" n="1" /> xmlns="http://www.tei-c.org/ns/1.0"> <milestone unit="alt" n="1" />Tempus ad hoc; lustris bis iam mihi quinque peractis, <teiHeader><lb rend="displayNum" n="2" />Omne fuit Musae carmen inerme meae; <fileDesc><lb rend="displayNum" n="3" />Nullaque; quae possit; scriptis tot milibus, extat <titleStmt><lb rend="displayNum" n="4" />Littera Nasonis sanguinolenta legi: <title>Ovid: Ibis – Apparatus</title><lb rend="displayNum" n="5" /> Nec quemquam nostri nisi me laesere libelli, </titleStmt><lb rend="displayNum" n="6" />Artificis periit cum caput Arte sua. <publicationStmt><lb rend="displayNum" n="7" />Unus — et hoc ipsum est iniuria magna — perennem <p>An experiment</p> </publicationStmt><lb rend="displayNum" n="8" />Candoris titulum non sinit esse mei. <sourceDesc><lb rend="displayNum" n="9" />Quisquis is est, — nam nomen adhuc utcumque tacebo — <p><bibl>S. G. Owen, <title>P. Ovidi Nasonis Tristium Libri Quinque,<lb rend="displayNum" n="10" /> Cogit inassuetas sumere tela manus. Ibis, Ex Ponto Libri Quattuor, Halieutica Fragmenta, Oxford (1915)</title></bibl></p><lb rend="displayNum" n="11" />Ille relegatum gelidos aquilonis ad ortus </sourceDesc> </fileDesc><lb rend="displayNum" n="12" />Non sinit exilio delituisse meo; </teiHeader><lb rend="displayNum" n="13" />Vulneraque inmitis requiem quaerentia vexat, <text><lb rend="displayNum" n="14" />Iactat et in toto nomina nostra foro; <body><lb rend="displayNum" n="15" /> Perpetuoque mihi sociatam foedere lecti <div type="apparatus"><lb rend="displayNum" n="16" />Non patitur vivi funera flere viri. <ab><lb rend="displayNum" n="17" />Cumque ego quassa meae complectar membra carinae, <app corresp="ibis-perseus.xml#match(//lb[@n=9],tacebo)"><lb rend="displayNum" n="18" />Naufragii tabulas pugnat habere mei: <lem>tacebo</lem><lb rend="displayNum" n="19" />Et qui debuerat subitas extinguere flammas, <rdg wit="#F #T #X">latebit</rdg><lb rend="displayNum" n="20" /> Hic praedam medio raptor ab igne petit. </app> <app corresp="ibis-perseus.xml#match(//lb[@n=30],Qua)"><lb rend="displayNum" n="21" /> <lem>quod</lem> <milestone unit="alt" n="2" />Nititur, ut profugae desint alimenta senectae. <rdg wit="#G">qua</rdg><lb rend="displayNum" n="22" />Heu! quanto est nostris dignior ipse malis! <rdg wit="#P">quam</rdg> </app><pb id="p.104" /> <app corresp="ibis-perseus.xml#match(//lb[@n=30],ei!)"> <lem wit="#P">et</lem><lb rend="displayNum" n="23" />Di melius; quorum longe mihi maximus ille est, <rdg wit="#F #H #T #V">hei</rdg><lb rend="displayNum" n="24" />Qui nostras inopes noluit esse vias. <rdg wit="#G #X #Zamoscianus">heu</rdg><lb rend="displayNum" n="25" /> Huic igitur meritas grates, ubicumque licebit, </app><lb rend="displayNum" n="26" />Pro tam mansueto pectore semper agam. </ab><lb rend="displayNum" n="27" />Audiat hoc Pontus. faciet quoque forsitan idem, </div> </body><lb rend="displayNum" n="28" />Terra sit ut propior testificanda mihi. </text><lb rend="displayNum" n="29" />At tibi, calcasti qui me, violente, iacentem, </TEI><lb rend="displayNum" n="30" /> Qua licet ei! misero, debitus hostis ero.
  21. 21. Ovid, Ibis, Merkel & Ehwald Ovid, Ibis – apparatus, Owen<?xml version="1.0" encoding="utf-8"?><TEI.2><text><body><div1 type="book" n="1" org="uniform" sample="complete"><p> <?xml version="1.0" encoding="UTF-8"?><pb id="p.103" /> <?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> <TEI<lb rend="displayNum" n="1" /> xmlns="http://www.tei-c.org/ns/1.0"> <milestone unit="alt" n="1" />Tempus ad hoc; lustris bis iam mihi quinque peractis, <teiHeader><lb rend="displayNum" n="2" />Omne fuit Musae carmen inerme meae; <fileDesc><lb rend="displayNum" n="3" />Nullaque; quae possit; scriptis tot milibus, extat <titleStmt><lb rend="displayNum" n="4" />Littera Nasonis sanguinolenta legi: <title>Ovid: Ibis – Apparatus</title><lb rend="displayNum" n="5" /> Nec quemquam nostri nisi me laesere libelli, </titleStmt><lb rend="displayNum" n="6" />Artificis periit cum caput Arte sua. <publicationStmt><lb rend="displayNum" n="7" />Unus — et hoc ipsum est iniuria magna — perennem <p>An experiment</p> </publicationStmt><lb rend="displayNum" n="8" />Candoris titulum non sinit esse mei. <sourceDesc><lb rend="displayNum" n="9" />Quisquis is est, — nam nomen adhuc utcumque tacebo — <p><bibl>S. G. Owen, <title>P. Ovidi Nasonis Tristium Libri Quinque,<lb rend="displayNum" n="10" /> Cogit inassuetas sumere tela manus. Ibis, Ex Ponto Libri Quattuor, Halieutica Fragmenta, Oxford (1915)</title></bibl></p><lb rend="displayNum" n="11" />Ille relegatum gelidos aquilonis ad ortus </sourceDesc> </fileDesc><lb rend="displayNum" n="12" />Non sinit exilio delituisse meo; </teiHeader><lb rend="displayNum" n="13" />Vulneraque inmitis requiem quaerentia vexat, <text><lb rend="displayNum" n="14" />Iactat et in toto nomina nostra foro; <body><lb rend="displayNum" n="15" /> Perpetuoque mihi sociatam foedere lecti <div type="apparatus"><lb rend="displayNum" n="16" />Non patitur vivi funera flere viri. <ab><lb rend="displayNum" n="17" />Cumque ego quassa meae complectar membra carinae, <app corresp="ibis-perseus.xml#match(//lb[@n=9],tacebo)"><lb rend="displayNum" n="18" />Naufragii tabulas pugnat habere mei: <lem>tacebo</lem><lb rend="displayNum" n="19" />Et qui debuerat subitas extinguere flammas, <rdg wit="#F #T #X">latebit</rdg><lb rend="displayNum" n="20" /> Hic praedam medio raptor ab igne petit. </app> <app corresp="ibis-perseus.xml#match(//lb[@n=30],Qua)"><lb rend="displayNum" n="21" /> <lem>quod</lem> <milestone unit="alt" n="2" />Nititur, ut profugae desint alimenta senectae. <rdg wit="#G">qua</rdg><lb rend="displayNum" n="22" />Heu! quanto est nostris dignior ipse malis! <rdg wit="#P">quam</rdg> </app><pb id="p.104" /> <app corresp="ibis-perseus.xml#match(//lb[@n=30],ei!)"> <lem wit="#P">et</lem><lb rend="displayNum" n="23" />Di melius; quorum longe mihi maximus ille est, <rdg wit="#F #H #T #V">hei</rdg><lb rend="displayNum" n="24" />Qui nostras inopes noluit esse vias. <rdg wit="#G #X #Zamoscianus">heu</rdg><lb rend="displayNum" n="25" /> Huic igitur meritas grates, ubicumque licebit, </app><lb rend="displayNum" n="26" />Pro tam mansueto pectore semper agam. </ab><lb rend="displayNum" n="27" />Audiat hoc Pontus. faciet quoque forsitan idem, </div> </body><lb rend="displayNum" n="28" />Terra sit ut propior testificanda mihi. </text><lb rend="displayNum" n="29" />At tibi, calcasti qui me, violente, iacentem, </TEI><lb rend="displayNum" n="30" /> Qua licet ei! misero, debitus hostis ero.
  22. 22. Perseus’ Ibis: 30 Qua licet ei! misero, debitus hostis ero.Perseus’ Ibis with Owen’s apparatus lemmata interpolated: 30 quod licet et misero, debitus hostis ero.
  23. 23. Perseus’ Ibis: 30 Qua licet ei! misero, debitus hostis ero.Perseus’ Ibis with Owen’s apparatus lemmata interpolated: 30 quod licet et misero, debitus hostis ero.“Another poem, more than 600 lines long, was written by Ovid in hisexile and has come down to our own times. Its name is not on Mr.Owen’s title-page, but under cover of this silence, it has been slippedinto the middle of the book, — medio tutissimus Ibis, as its authorhimself observed, — apparently in the hope that it may escapenotice. Well, so it shall.” – A. E. Housman
  24. 24. Where are we now?
  25. 25. Where are we now?✤ Draft spec: http://goo.gl/8YRqe
  26. 26. Where are we now?✤ Draft spec: http://goo.gl/8YRqe✤ Im working on a reference implementation of the draft spec as it stands: https://github.com/hcayless/tei-pointers (very little there, and not yet working, but watch this space)
  27. 27. Where are we now?✤ Draft spec: http://goo.gl/8YRqe✤ Im working on a reference implementation of the draft spec as it stands: https://github.com/hcayless/tei-pointers (very little there, and not yet working, but watch this space)✤ This talk: http://goo.gl/4R5zo
  28. 28. Where are we now?✤ Draft spec: http://goo.gl/8YRqe✤ Im working on a reference implementation of the draft spec as it stands: https://github.com/hcayless/tei-pointers (very little there, and not yet working, but watch this space)✤ This talk: http://goo.gl/4R5zo✤ Thanks!

×