Overview

The following page on TEI Publisher showcases various visualization examples.

https://teipublisher.com/exist/apps/tei-publisher/index.html?query=&collection=test&sort=title&field=text&start=1

In this and subsequent articles, I will introduce the above visualization examples.

Letter #6 from Robert Graves to William Graves (at Oundle School) November 15, 1957

Overview

https://teipublisher.com/exist/apps/tei-publisher/test/graves6.xml

As shown below, the text is displayed alongside a list of place names and person names, as well as a map.

It is described as follows:

A 20th century manuscript letter from Robert Graves where emphasis has been put on visualizing rich encoding of semantic information in the letter, in particular geographic and prosopographical data. The map is displayed with a pb-leaflet component.

Data

Here are the characteristics of the XML file.

teiHeader > profileDesc > abstract

The contents of the abstract tag appear to be displayed on the search page mentioned above.

teiHeader > profileDesc > textClass

There are entries like the following. These were used for faceted search.

<t<<<<<<<</ecccccccctxaaaaaaaaetttttttttxCRRRRRRRRtleeeeeeeeCafffffffflsassssssssss>ccccccccshhhhhhhh>eeeeeeeemmmmmmmmeeeeeeee========""""""""########gffffffpeoeeeeeenraaaaarrmtttttie"uuuuuo"rrrrrdteeeee"ta"""""artrgtttttageaaaaaretrrrrrgt=ggggge="eeeeet"#ttttt=#m====="ca"""""#on#####mrupppmlorsaelatdecgrapresresc""rpisoe//nop"n">>"nt/"/d">>e/n>ce"/>

teiHeader > profileDesc > particDesc

A <listPerson> is described within <particDesc>.

<particDesc><list<<Pp/p/eepeprreress<<<<rs<<<roop/bsnsop!nsnnepieoone-oo>rerxtnr-tnxs<<rte>xseaao>mNfsshv>mNt>nsflaouNaRlaoRd:mrrawlo:moa2ieenmhubiebbh<0d>naeeeed>eeitst=am>n=r=Rrsiuh"me="t"octttrGe>"MGboolvCr>G1"GremGreieaWr9>rarpri>vnvia4mavtlaaIotelv0aveevn,rusle"lesGte.CrWis>esRreslayia<1<'oadPanlm/9bv(rudEl<s4seeeb1odni/u0elrsy8bipgafr<xdt<9auolmon/>e"/t5bsei"rabs>ph-l<ts>emitee1y/hnerr9toa>tsss8bifPmhoNt5etoe>nau)slte>mdtehtbeew>ery>nak,ytsnGBsoaraeawnenrndadyptloa<L<estWi/tiatn,ttreohl,rtneeaeo>ht>vaCeueulrltaieihus.sod<trio/,unnoseomftytoethf>heotgGhroeadp<gh/reteria,ttlcefr>iigtauinrcdes

teiHeader > profileDesc > settingDesc

This section contains a list of place names. The <geo> tag includes latitude and longitude coordinates.

<sett<ilnigsDt<<ePp/p/sllplpcaalal>cc<<<<<ac<<<<aeeppl/l/ncepl/l/nc>llololoelololoexaacocot>xacocot>mcca<ca<<<<cefllgfWmca<ca<<<<celeetgatsrrca>ooiroaletgatsrrca>:NNietieeeotDrctorr:NietieeeotGiaaooiotgguiemaev.iaooiotgguirdmmn>ontiinoistreG<dmn>ontiinoa=ee>3nlootnàease/=e>3nlootnv">>9>tennr>tdrrn">9>tennr>eDDD.ym>>yihyomoCC.ym>>yseee7peMB>seanataa7peMB>'iyi4enaaSbanenn4enaaSaaà8=tjlpanons,>ee8=tjlph"<<4">oeaoudtll4">oeao>//gDraisrteEllgDraiupp2eecrnmtmenuu2eecrnsll.oyai<ahtupgnn.oyai<eaa6pa<c/leesl"<6pa<c/cc4o<clrnici>/4o<ciee9lrIonclsp9lrIonNN1isesucmaihl1isesuaa8teglnorilf,a8teglnDmm<itiatailfc<itiateee/ctonrsdersae/ctonri>>galndytgsenNgalndyaele>s>aesdaele>s><o"m<lnivmo"m</>>e/oodeAe>>e/nnrvfrerm>nroteitnletet>glthtor>geilhsoii>oaeo.kcongfian>eSInn>pVtgiaasennltxilihptsddeahheytemlMrioleiSssidaelscitraatern,lesadaranradondafefdsntceeTMiaarratpnale,tmli,huossenroetckrrFaanavin.onerawgds,InettawfasWhionoisrdarclhioddtlrsiavwe

text

Named entities in the body text use the <name> tag, with the ref attribute referencing the id specified in the above lists. The type attribute is used to distinguish between person names and place names.

<text<>body<>pobpoepfn<<eaed/sncradaes>talr=e<tu>"ldet/WialenGnti>a.een<m5>eDae7w>eb>.hab:1err1ne>.=sW/1"tms51<a.9</la5nau.7abtj-mbep1er>g1>"-r/1e>5f"=>"N#oGvreamvbeesrWi1l5l,ia1m9"57t<y/pdea=t"ep>erson">

ODD

Login may be required, but the ODD file is available at the following link:

https://teipublisher.com/exist/apps/tei-publisher/odd-editor.html?odd=graves.odd&root=/db/apps/tei-publisher/odd&output-root=/db/apps/tei-publisher/transform&output=transform&source=true

name - model [inline] @type=‘place’

The following section defines the use of italic styling.

Indeed, “Yug” written as follows is displayed in italics.

foryour<nameref="#Yugoslavia"type="place">Yug</name>visa.

name - model [webcomponent] @type=‘place’ and id(substring-after(@ref, ‘#’), root($parameters?root))/location/geo

There is also an entry with the above description.

First, I asked GPT-4 to explain the content starting with id(....


This is part of a query language called XPath, used to select specific elements and attributes within XML documents. Specifically, this XPath expression performs the following operations:

  1. id(substring-after(@ref, '#'), root($parameters?root)): This part extracts the portion after the hash symbol (#) from the @ref attribute (using the substring-after function) and passes the result to the id function. The id function finds elements with the specified ID within the XML document. In this case, root($parameters?root) specifies the root element of the document in which to search.

  2. /location/geo: Within the found element’s child elements, it searches for an element called location and selects its child element geo.

Overall, this XPath expression is used to find a specific element based on a reference ID and select its location and geo child elements. This can be useful for retrieving specific geographic location information within an XML document.


In other words, this applies to elements that reference a place name with a geo tag. In this case, the style is defined as follows:

ccoulrosro:r:#1p5o6i5nct0e;r;

This style is applied to place names like the following.

Additionally, Parameters are specified in the ODD as shown below.

As a result, the HTML tags were written as follows. The name tag has been converted to a pb-geolocation tag, with attributes set based on the above XPath (or XQuery?).

<pC/bclllksedap-loaaecmunbgantbyrir-esgie=otaFgositl"l=tlel=tu=Cl"iooo"ud"a=loqlctdeCn"enuoaee=aFst=ecti="nlct"ai-"3ore1ton29Fqor0ina..lul"0om67oel0ne44q""">498u>"14e8"""
.}tei-ccnoualrmosero4:r:{#1p5o6i5nct0e;r;

Template

Finally, let’s examine the template. The relevant file is:

/db/apps/tei-publisher/templates/pages/letter.html

<<<hh/b//tehobhmaedotld<<<<<<<<<<<<<ay<<dm>>mmllllltmlsss/d>p/dyleeiiiiiieiccts>bpi>>ttnnnnnttnrryt-bvaakkkkklakiilb}p}#}.}a}a}p}.}yp<<-eppeobvcssbtlapa/pccnrrrrrnrtt>d-ioii-oegbpaalhaeeeeedaeyvenddlc>e-ppgaamlllllamlttifwfmmhtpdjmefmmmhedwpewh-dd-<<pesre=====te=yy{-eo1laaeveoiualiaaeviiaaietidodaa/->ss="""""a="pppwnexriensssr{enxriepsddfdiosacrppad=e"sssss-"seebt{x-ggrtiptgx--ggrbptdltggptuapppr"tvhhhhhtdt==-{::wihf-tlii:wwihf-lhiehhglamw--<<<pas=ioooooeey""vintlbiafniintlha:nt:tla-eedha/s/s/-wp"errrrrmslmmiv3d::oooyy:1dd-:oiyg-:eytnrrepaesesheluwtttttpceooeatwdn:-ttrwg:1:m1,:et-aappceceeratpccccclrsddwr0h8v:y:c00hhiv:h0a01mlwd-<<pt<ct<<<ca-sfouuuuuaihuu-(;:pafo;::galb00p00pnpiaeehaa-ip/tipa/a/tdlh-rttttttpellh-xra{rln1hrail%%0boldyrrepphobpiobsasaiea"8teteeee-6(ueet034t(ugo;8{;%-na=o-appen-bon-isisory/""iiiii=it""ip01-tlxep68:-thcp;net"udld--av<-nvd<id<<in-o>/ccccc"o"gbv6-oa;nx00-otkxa;edtaaettdcipv>ciep/dep!d>lu>cooooocnssh-wpp;tt;pp1p;;;v=otyrooelebilebpe>b-eatonnnnno"hrrtb;xbi:xx6b{i"cfaoooraw-eawc-b>-->y>n"""""nrcc:a;-v;;p-gpuo-usll>spwslv<-lpotfce==svecxvaamrttlbbsia>siaipvebuetttttiof""cei;e;itgece>oaa=dr=dsebia-tnyyyyygn=ppa-eneienemtrr"=a"=sw-efm>tppppp:t"bblfwtwost-p=b"mc"=pwla=eeeeeaer--co-e-n:1nl"ddrtov"sa>ep"=====pnecl(nhrhp"aahaaeinniprrtw"""""ptsoe1te;e{brtettatatelca-aiiiiii-=oma0)ii-dreaaadlmewa=mmpdmmmmmt"upf0;ggpao=d--ceen1c"aitaaaaaiGrolvhhatw"ettr-=t"ednp-hgggggtrcnehttga=lreeuv"-soak=eeeeelaeet))e-"i"mmmihbs"cmsed/////evsn--;;"tfbppbeeor>ueuyexpppp"e/tmeo:rllswadcm=b=v-nnnn/scsa2umrieaa"1dy=e"s"iigggg>'s-p2npcnvtt>"e""nmcYcc""""sb.0rleceeer>dtorOeoL/ujpea-la==s"o1diU-nhhhhetnsxstnul""rc"ebRw"rrrrthd")oeadsllcvu"e_ieeeetel;l=re=ii=amo=Gdhffffemedv"r""bb"ledv"Otr====re.aepor::dundalOhe""""".jtdawdeiioet=leG,frrrr/csa=g"avnnc=1"utL=eeee>s"-"e>teccu""getEm"ssssstusaallmsr=e_iroooo"den:-luuehca"rAneuuuu/amrptsddnoovf"Pisrrrr>tpebe"eetrleaImoccccals-m""1tusca_uueeee-aodpf""m"ecKmrssssttlolidd/ntcE-c////eevcaxaax>-sseYseiiiim=eutettpsu"s"csmmmmp"dmedaaaeb/sa/aaaalp"e-=--tps>-zliggggaa>np"tthactoemeeeetgtafee=rroo=assssee"timm"aikm1g////=s/hxpp/tbe=,effff":>=ell/oen"saaaapl"daatr==1i/vvvvaot"tte=""4nfiiiigaeeei"tY"iaccccedme--H.rOtvoooos-pfppetaUsiinnnn:clfaaaenRuac----loaettdis_blo1236omtchhe-cMs-n6424apet==rcrAcs.....doss""/biPrcipppp-n/=ttf"pBiacnnnnced"eeitObloggggonrwmmlaiXee"""""mtaappepo_==/pswtllDpnA"1>sssso"eeaaee"Cl,iiiin/rrttsnCezzzze>.feecdeEtueeeenhass/-mStsssssttl//tfiSee====smlmtiot_rr"""""l"eoto=T"-1236/">nolt"O>s6424>/ulenlK<cxxxx>.bSoeE/a1236hatttNpl6424trmet"ba""""m.tse/-b////lh/=r>ml>>>>"tt""ae/miap=>ltpw-y"lpa-e/eei>s>"nt"d-/v-f>ifoeorwo==t""npsobit-nelgsel"aef"sl>uebts-cmraipb"e>="transcription"emit="transcription"/>

pb-view and pb-leaflet-map are used. The second pb-view subscribes to transcription and emits letter. The ODD graves is also specified. Additionally, pb-leaflet-map subscribes to letter.

<s<<<</ep/p!scbpb-et<<-b<--cipav<-/alp/tobsipasebain-iebisia-sovdw-eidfminciepwdelad>lesa>e>epeawcrr>t>slca-asia=mmp=ds"ai"=sdnp-c"=oakov"cmsenipueuytelm=b=ewae"s"n1cnmcYt"etorO-s1diUbs""ebRor>"e_dco=Gy=dv"O""dalO>d=leGo"utLcgetEur=e_ma"rAevf"PneaItsca_1"ecK"tcEsseYcu"s"ob/sls>-zuctomroonikm-be=sen"e==1p""4atY"rrOaaUstnRuos_brcMs=rAc"iPr.pBittObeiXeio_=-nA"c"ClbCe"eEtmStaiSept_rp=T"e"O>nlK<deE/-tNpft"boe/-or>mt"anpow-ta-ei>st=-"faoprp=e"npdb--floeoatfnloette-sm"aps"u>bscribe="transcription"emit="transcription"/>

Using the above relationships, it appears that geographic information including latitude and longitude from the TEI/XML is being exchanged.

Summary

In the next article, I will examine the contents of pb-view and pb-leaflet-map. While this article may be somewhat incomplete, I hope some parts serve as a helpful reference.