its20 CVS commit

Update of /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/tools/xslt
In directory hutz:/tmp/cvs-serv30214/tools/xslt

Modified Files:
	odd2xmlspec.xsl verbatim.xsl 
Log Message:
action-203 publication pipeline now OK for HTML5 processing, some example now in HTML serialization

Index: verbatim.xsl
===================================================================
RCS file: /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/tools/xslt/verbatim.xsl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- verbatim.xsl	27 Aug 2012 15:28:49 -0000	1.5
+++ verbatim.xsl	15 Sep 2012 21:47:10 -0000	1.6
@@ -95,6 +95,11 @@
   </xsl:choose>
 </xsl:template>
 
+<xsl:template match="meta[ancestor::html]" mode="verbatim">
+  <xsl:call-template name="makeIndent"/>
+  <xsl:text>&lt;meta charset=utf-8&gt;</xsl:text>
+</xsl:template>
+
 <xsl:template match="*" mode="verbatim">
   <xsl:choose>
     <xsl:when test="not(preceding-sibling::node())">
@@ -371,8 +376,8 @@
     </xsl:when>    
     <xsl:otherwise>
       <xsl:choose>
-        <xsl:when test="not(/html)"><xsl:text>/&gt;</xsl:text></xsl:when>
-        <xsl:otherwise><xsl:text>&gt;&lt;</xsl:text><xsl:value-of select="name()"/><xsl:text>&gt;</xsl:text></xsl:otherwise></xsl:choose>
+        <xsl:when test="not(ancestor::html)"><xsl:text>/&gt;</xsl:text></xsl:when>
+        <xsl:otherwise><xsl:text>&gt;&lt;/</xsl:text><xsl:value-of select="name()"/><xsl:text>&gt;</xsl:text></xsl:otherwise></xsl:choose>
       <xsl:value-of disable-output-escaping="yes" select="$endBold"/>
     </xsl:otherwise>
   </xsl:choose>

Index: odd2xmlspec.xsl
===================================================================
RCS file: /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/tools/xslt/odd2xmlspec.xsl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- odd2xmlspec.xsl	27 Aug 2012 15:28:49 -0000	1.6
+++ odd2xmlspec.xsl	15 Sep 2012 21:47:10 -0000	1.7
@@ -18,7 +18,8 @@
     xmlns:exsl="http://exslt.org/common"
     xmlns:estr="http://exslt.org/strings"
     xmlns:spec="http://example.com/xmlspec"
-    exclude-result-prefixes="exsl estr edate fo a xd tei rng local teix xs eg its html dbk xlink" 
+    xmlns:parsehtml5="Html5ToSaxon65Node"
+    exclude-result-prefixes="exsl estr edate fo a xd tei rng local teix xs eg its html dbk xlink parsehtml5" 
     extension-element-prefixes="edate exsl estr spec"
     version="1.0">
 
@@ -1240,11 +1241,20 @@
 
   <xsl:template match="eg:egXML[@target]">
       <eg>
-        <xsl:if test="@type='html5'">&lt;!DOCTYPE html&gt;&#xD;</xsl:if>
-        <xsl:apply-templates 
-            select="document(@target)/*" 
-            mode="verbatim">
-        </xsl:apply-templates>
+        <xsl:choose>
+          <xsl:when test="@type='html5'">
+            <xsl:text>&lt;!DOCTYPE html&gt;&#xD;</xsl:text>
+            <xsl:variable name="html5doc">
+              <doc><xsl:copy-of select="parsehtml5:createDom(@target)"/></doc>
+            </xsl:variable>
+            <xsl:apply-templates           select="exsl:node-set($html5doc)/doc/html" 
+              mode="verbatim"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates           select="document(@target)" 
+              mode="verbatim"/>
+          </xsl:otherwise>
+        </xsl:choose>
       </eg>
       <p>[Source file: <loc href="{@target}"><xsl:value-of select="@target"/></loc>]</p>
   </xsl:template>

Received on Saturday, 15 September 2012 21:47:18 UTC