Jump to content


  • Posts

  • Joined

  • Last visited

TMT's Achievements


Newbie (1/7)



  1. I feel so ashamed about this question, but I can't find a solution, and I hope you can help me.This is my code xml: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="C:/Program%20Files/XML%20Copy%20Editor/esercizi%20xml/prova2.xsl"?><TEI xmlns="http://www.tei-c.org/ns/1.0"><teiHeader> <fileDesc> <titleStmt> <title></title> </titleStmt> <publicationStmt><p>AA</p></publicationStmt> <sourceDesc><p>AA</p></sourceDesc> </fileDesc></teiHeader> <text> <body><div> <head>Titolo</head> <p>Scriverò un <rs>nome</rs> di luogo come questo: <rs key="Persia" type="luogo">Persia</rs>.</p> </div></body> </text></TEI> and this is what I wrote in my file xsl: <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <xsl:template match="/"> <back> <div> <xsl:value-of select="//rs"/> </div> </back> </xsl:template></xsl:stylesheet> The output is: <?xml version="1.0" encoding="UTF-8"?><back xmlns="http://www.w3.org/1999/xhtml" xmlns:tei="http://www.tei-c.org/ns/1.0"> <div/></back> I don't understand where is my error; I suppose it is in the namespace, but I can't find the solution.Thank you in advice! --- EDIT: I've found the solution, is:"//tei:rs"
  2. I'm working on the TEI stylesheet for EPUB for a BA degree project. I'm trying to modify the stylesheet files, so that they create a list of names selected by me, displayed at the bottom of the file (a final index).I'm trying to force the xsl to write an xml code in preflight mode after the body section (inside “<back>”). But I find hard to define what to do in my template... I even thought to use a function, but I don't understand how do that.I tried to make sure that the right file is selected with the code xsl: attribute; I found this method on the internet but I do not know if it's right.This is my code: <xsl:template match="tei:body" mode="preflight"><xsl:attribute name="href"><xsl:value-ofselect="inputDir"/></xsl:attribute><xsl:choose><xsl:when test="position()=last()"><back><div type="indiceNomi"><b>Indice dei luoghi:</b><xsl:apply-templates select="tei:rs[@type='luogo']"><xsl:sort order="ascending"><p><xsl:value-of select="."/></p></xsl:sort></xsl:apply-templates></div></back></xsl:when><xsl:otherwise></xsl:otherwise></xsl:choose></xsl:template> I would like to know if you can show me which file I need to edit to change the CSS in the epub outuput.Can you please explain me what you would do in my situation, or help me in some other way?Thank you.
  • Create New...