0

我是一个菜鸟,想问你以下问题: 我正在使用 XML-TEI 语言来研究一个手稿。我有兴趣通过 XSLT 样式表检索手稿的正确名称(标有 [name] 标记),其中包含有关其位置的信息(页面 [pb]、章节 [div2]、列 [cb] 和行 [lb] .我曾尝试将这些数据写在一个表中,但对我来说是不可能的。这是手稿的 XML 片段:

<?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>

这是我创建的样式表,其中我没有得到任何东西......

<?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>

4

0 回答 0