0

I am a rookie and I would like to ask you the following questions: I am using the XML-TEI language to study a manuscript. I would be interested in retrieving the proper names of the manuscript (marked with the [name] tag) through an XSLT stylesheet with information about its location (page [pb], chapter [div2], column [cb] and line [lb ].I have tried to write this data in a table, but it is impossible for me. This is a fragment of the XML of the manuscript:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml"
 schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
   <teiHeader>
      <fileDesc>
         <titleStmt>
            <title>Title</title>
         </titleStmt>
         <publicationStmt>
            <p>Publication Information</p>
         </publicationStmt>
         <sourceDesc>
            <p>Information about the source</p>
         </sourceDesc>
      </fileDesc>
   </teiHeader>
   <text>
      <body>
<pb n="001r"/>
         <div1 type="book" n="01">

            <div2 type="chapter" n="001">
               <head><hi rend="red">Delas obras que <name type="proper">dios</name> fizo en los
                        prime<lb n="31"/>ros <num>.vj.</num> dias. </hi></head>
               <ab><add place="margin">I</add>
                  <phr function="time">Quando nuestro sennor <lb n="32"/><name type="proper"
                        >dios</name> crio enel comienço <phr function="list">el çielo<lb n="33"/>et
                        la tierra &amp; todas las cosas que<lb n="34"/>enellos son</phr></phr>. <phr
                     function="source">segund quelo cuenta <name type="proper">moysen</name>
                     <phr function="adjetive" type="explanatory">que fue<lb n="35"/><phr
                           type="syntagm" function="copulative"><phr type="syntagm"
                              function="copulative" n="1">santo</phr> &amp; <phr type="syntagm"
                              function="copulative" n="2">sabio</phr></phr></phr>. &amp; otros
                     muchos <phr function="adjetive" type="restrictive">que acordaron con
                     el</phr></phr>.<lb n="36"/>departiolo &amp; fizo lo todo en seys dias <phr
                     function="cataphoric">desta<lb n="37"/>guisa</phr>. <phr function="list">¶ <phr
                        function="list" n="1">El primero dia crio <phr type="syntagm"
                           function="copulative"><phr type="syntagm" function="copulative" n="1">la
                              luz</phr>. &amp; <phr type="syntagm" function="copulative" n="2"
                                 >todas<lb n="38"/>las naturas delos angeles buenos et malos.<lb
                                 n="39"/><phr function="adjetive" type="explanatory">que son las
                                 criaturas spiritales</phr></phr></phr></phr>. ¶ Et partio<lb n="40"
                     />esse dia la luz delas tiniebras. Et ala luz<lb n="41"/>
                     <pb n="1v"/>
                     <cb n="a"/><lb n="1"/> llamo dia. &amp; alas tiniebras noche. ¶ <phr
                        function="list" n="1">El<lb n="2"/> segundo dia fizo el firmamento. &amp;
                        partio con el<lb n="3"/> las aguas de suso delas de deyuso</phr>. ¶ <phr
                        function="list" n="4">El terce<lb n="3"/> ro dia ayunto todas las aguas <phr
                           function="adjetive" type="restrictive">que so el çielo<lb n="5"/> son.
                              <phr function="explicative">los mares &amp; las otras aguas dulces.
                                 <phr function="explicative">de<lb n="6"/> rios &amp; de
                                 fuentes</phr></phr></phr>. &amp; <phr function="time">quando las
                           aguas fueron <phr type="syntagm" function="copulative"><phr
                                 type="syntagm" function="copulative" n="1">a<lb n="7"/> partadas
                                 &amp; <phr type="syntagm" function="copulative" n="1">ayuntadas en
                                    un logar</phr></phr></phr>. paresçio<lb n="8"/> lo seco que es
                           dicho tierra. Et crio estonçes <name type="proper">dios</name> en<lb
                              n="9"/> la tierra las yeruas &amp; los aruoles de todas<lb n="10"/>
                           naturas</phr>. ¶ <phr function="list" n="4">El quarto alumbro los çielos
                           &amp; la ti<lb n="11"/> erra con el sol &amp; con la luna &amp; con las
                              estrellas.<lb n="12"/> &amp; puso las enel firmamento. El sol pora el
                              dia.<lb n="13"/> &amp; la luna &amp; las estrellas pora la
                        noche</phr>. ¶ <phr function="list" n="5">El<lb n="14"/> quinto dia fizo los
                           peçes &amp; las aues de todas<lb n="15"/> maneras. Et bendixo los &amp;
                           dixo que creçiessen<lb n="16"/> &amp; amuchiguassen. &amp; enchiessen las
                              aguas<lb n="17"/> &amp; la tierra</phr>. ¶ <phr function="list"
                           n="final">El sexto dia crio las bestias<lb n="18"/> grandes &amp; las
                           pequennas de todas naturas</phr></phr>.</phr> ¶ Et<lb n="19"/> esse dia
                  mesmo formo all omne a su yma<lb n="20"/> gen &amp; asu semeiança que fuesse
                  adelantado &amp; se<lb n="21"/> nnor de todas las otras criaturas que so el cielo
                     son.<lb n="22"/>
                  <add place="margin"> ¶</add>
                  <phr function="incise" type="absolute">Et faziendol <phr type="syntagm"
                        function="copulative"><phr type="syntagm" function="copulative" n="1">asu
                           ymagen</phr> &amp; <phr type="syntagm" function="copulative" n="2">asu
                           semeiança</phr></phr></phr>. crio<lb n="23"/>
                  <phr type="syntagm" function="copulative"><phr type="syntagm"
                        function="copulative" n="1">los maslo</phr> &amp; <phr type="syntagm"
                        function="copulative" n="2">fenbra</phr></phr>. <phr function="source">assi
                     como lo departen<lb n="24"/>
                     <phr type="syntagm" function="copulative"><phr type="syntagm"
                           function="copulative" n="1"><phr function="list"><phr function="list"
                                 n="1"><name type="proper">moysen</name></phr> &amp; <phr
                                 type="syntagm" function="copulative" n="2"><name type="proper"
                                    >iheronimo</name></phr></phr> enel primero capitulo<lb n="25"/>
                           del <name type="book">genesis</name></phr>. <phr function="list" n="2">Et
                              <name type="proper">iosepho</name> otrossi enel primero<lb n="26"/>
                           dela estoria dela antiguedat delos iudios</phr>.<lb n="27"/>
                        <phr function="list" n="final"><add place="margin"> Et</add> otros muchos
                           quelo affirman con ellos</phr></phr></phr>. Et desi<lb n="28"/> bendixo
                  los <name type="proper">dios</name> &amp; dixo les <quote type="indirect"
                     source="Dios"><phr type="coord" function="copulative"><phr type="coord"
                           function="copulative" n="1.1">que creçiessen &amp;<lb n="29"/>
                           <phr type="coord" function="copulative" n="1.2">amuchiguassen</phr> &amp;
                              <phr type="coord" function="copulative" n="1.3">enchiessen la
                              tierra</phr></phr>. &amp; <phr type="coord" function="copulative"
                           n="final">quela<lb n="30"/> assennoreassen so el su
                     poder</phr></phr></quote>. <phr function="incise" type="absolute">bendiziendo
                        a<lb n="31"/> ellos</phr>. bendixo alas animalias dela tierra<lb n="32"/> en
                  ellos. ¶ Et mando que<phr type="syntagm" function="copulative"><phr type="syntagm"
                        function="copulative" n="1">los omnes</phr> &amp; <phr type="syntagm"
                        function="copulative" n="final"> </phr></phr><lb n="33"/> animalias. <phr
                     type="coord" function="copulative"><phr type="coord" function="copulative"
                        n="1">comiessen</phr> &amp; <phr type="coord" function="copulative"
                        n="final">uisquiessen <phr function="list"><phr function="list" n="1">delas
                              yeruas</phr><lb n="34"/>
                           <phr function="list" n="2">dela tierra</phr> &amp; <phr function="list"
                              n="3">delas simientes della</phr>. &amp; <phr function="list"
                              n="final">delas<lb n="35"/> fruytas delos
                     aruoles</phr></phr></phr></phr>. ¶ Enpos esto to<lb n="36"/> do cato nuestro
                  sennor <name type="proper">dios</name> todas las cosas <phr function="adjetive"
                     type="restrictive">que<lb n="37"/> auie fechas</phr>:' &amp; uio que eran muy
                     buenas.<lb n="38"/>
                  <add place="margin"> Et</add> fue todo acabado de fazer. <emph>enel sexto di<lb
                        n="39"/> a</emph>. <phr function="cataphoric"><phr function="incise"
                        type="source" n="Moises">Como oyredes que diz <name type="proper"
                           >moysen</name> adelante</phr></phr>.<lb n="40"/>
               </ab>
            </div2>
         </div1>
      </body>
   </text>
</TEI>

Here is the stylesheet that I created, in which I do not get anything ...

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:tei="http://www.tei-c.org/ns/1.0">
    <xsl:output method="html"/>

    <xsl:template match="/">
        <html lang="es">
            <head>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
                
            </head>
            <body>
               <h1><div align="center">Nombres propios</div></h1>
                <div align="center"><table border="1">
                    <tr bgcolor="ACF16F">                       
                        <td><b>Nombres</b></td>
                        <td><b>Folio</b></td>
                        <td><b>Columna</b></td>
                        <td><b>Línea</b></td>
                        <td><b>Capítulo</b></td>
                    </tr>
                    
                <xsl:apply-templates select="//tei:name[@type = 'proper']"/>
                    
                </table></div>
            </body>
        </html>
    </xsl:template>
    <xsl:template match="//tei:name[@type = 'proper']">
                   
            <tr>
                <td>
                    <xsl:value-of select="."/>
                </td>
                <td><xsl:value-of select="node() "/>
                </td>
               
            </tr>
       
       
        <!--<xsl:value-of select="."/>-->
    </xsl:template>
</xsl:stylesheet>
  • How does the output look like? – Aniket V Feb 01 '18 at 08:21
  • Dear @AniketV I can't edit the post to show the result. There be another way to show the result? Sorry... – Miguel Las Heras Feb 01 '18 at 09:06
  • The transformation works for me, so I think the problem must be in the way you are running it. Please tell us exactly what you did to run it, and tell us how it failed. – Michael Kay Feb 01 '18 at 09:12
  • @MichaelKay I want to configure the stylesheet to get the folio number, the column and the chapter of each of the proper names in the table. But in the configuration of the template, I do not know how to select the attributes of these elements so that they appear in the table. I do not know if the problem will be in the nesting of labels, on the route... – Miguel Las Heras Feb 01 '18 at 09:31
  • OK, you said you weren't getting anything, so I misinterpreted what your problem is (that's why we so often plead with people to tell us exactly what they did and exactly how it failed). – Michael Kay Feb 01 '18 at 12:18
  • I'm afraid you'll have to explain how your concepts such as "folio number", "column", and "chapter" relate to the tags in your markup. I don't see any tags here that cry out "this is a folio number". – Michael Kay Feb 01 '18 at 12:26
  • @MichaelKay The tags that I have used are the following: Chapter: ; page: Line: Column: . I apologize for the inconvenience – Miguel Las Heras Feb 01 '18 at 13:01
  • Possible duplicate of [Recover information of XML-TEI through XSLT](https://stackoverflow.com/questions/48527136/recover-information-of-xml-tei-through-xslt) – Louis Feb 01 '18 at 13:08
  • @MiguelLasHeras Please do not duplicate your questions. The proper thing to do when you have new information to an existing question is to edit the question originally posted, not post a new question. – Louis Feb 01 '18 at 13:09

0 Answers0