Commits

Anonymous committed 29a9323

Convert to the TEI namespace.

Comments (0)

Files changed (1)

perl/modules/XML-Grammar-Fiction/extradata/screenplay-xml-to-tei.xslt

 <xsl:stylesheet version = '1.0'
      xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
      xmlns:sp="http://web-cpan.berlios.de/modules/XML-Grammar-Screenplay/screenplay-xml-0.2/"
+     xmlns:tei="http://www.tei-c.org/ns/1.0"
      >
 
 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"
 </xsl:template>
 
 <xsl:template match="sp:body">
-    <text>
-        <body>
-            <div type="act">
+    <tei:text>
+        <tei:body>
+            <tei:div type="act">
                 <xsl:attribute name="xml:id">
                     <xsl:value-of select="@id" />
                 </xsl:attribute>
-                <head>ACT I</head>
+                <tei:head>ACT I</tei:head>
                 <xsl:apply-templates select="sp:scene" />
-            </div>
-        </body>
-    </text>
+            </tei:div>
+        </tei:body>
+    </tei:text>
 </xsl:template>
 
 <xsl:template match="sp:scene">
-    <div type="scene" xml:id="scene-{@id}">
+    <tei:div type="scene" xml:id="scene-{@id}">
         <!-- Make the title the title attribute or "ID" if does not exist. -->
-        <head>
+        <tei:head>
             <xsl:attribute name="id">
                 <xsl:value-of select="@id" />
             </xsl:attribute>
                     <xsl:value-of select="@id" />
                 </xsl:otherwise>
             </xsl:choose>
-        </head>
+        </tei:head>
         <xsl:apply-templates select="sp:scene|sp:description|sp:saying" />
-    </div>
+    </tei:div>
 </xsl:template>
 
 <xsl:template match="sp:description">
-    <stage>
+    <tei:stage>
         <xsl:apply-templates />
-    </stage>
+    </tei:stage>
 </xsl:template>
 
 <xsl:template match="sp:saying">
-    <sp>
-        <speaker>
+    <tei:sp>
+        <tei:speaker>
             <xsl:value-of select="@character" />
-        </speaker>
+        </tei:speaker>
         <xsl:apply-templates />
-    </sp>
+    </tei:sp>
 </xsl:template>
 
 <xsl:template match="sp:para">
-    <p>
+    <tei:p>
         <xsl:apply-templates />
-    </p>
+    </tei:p>
 </xsl:template>
 
 <xsl:template match="sp:ulink">
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.