]> granicus.if.org Git - docbook-dsssl/commitdiff
Titlepage mechanism is now namespace aware to support XHTML. Please note that when...
authorJirka Kosek <jirka@kosek.cz>
Tue, 4 Oct 2011 21:36:11 +0000 (21:36 +0000)
committerJirka Kosek <jirka@kosek.cz>
Tue, 4 Oct 2011 21:36:11 +0000 (21:36 +0000)
xsl/Makefile.incl
xsl/epub3/Makefile [new file with mode: 0644]
xsl/fo/Makefile
xsl/template/titlepage.xsl
xsl/xhtml/Makefile

index cab7e19ae027070cde3bc8c350bea7d767f552ad..83c89be91c4267565e99d8090f4eee0ece69376c 100644 (file)
@@ -77,7 +77,12 @@ endif
 
 
 titlepage.templates.xsl: titlepage.templates.xml $(NESTLEVEL)../template/titlepage.xsl
+ifdef TARGETNS
+       $(XSLT) $< $(NESTLEVEL)../template/titlepage.xsl $@ ns=$(TARGETNS)
+else
        $(XSLT) $< $(NESTLEVEL)../template/titlepage.xsl $@
+endif
+
 
 Makefile.param:
 ifneq ($(shell uname -s | grep -i cygwin),)
diff --git a/xsl/epub3/Makefile b/xsl/epub3/Makefile
new file mode 100644 (file)
index 0000000..0c19132
--- /dev/null
@@ -0,0 +1,6 @@
+include $(DOCBOOK_SVN)/buildtools/Makefile.incl\r
+\r
+TARGETNS=http://www.w3.org/1999/xhtml\r
+\r
+titlepage.templates.xsl: titlepage.templates.xml $(NESTLEVEL)../template/titlepage.xsl\r
+       $(XSLT) $< $(NESTLEVEL)../template/titlepage.xsl $@ ns=$(TARGETNS)\r
index a72a1b1ac1a4df0b700c7c85082674851d9205b9..90e93330730ce43c6a9151a7ced991b1c14f4743 100644 (file)
@@ -4,5 +4,6 @@ PARAMBASE=param
 XSLFILES=param.xsl profile-docbook.xsl
 ALLTARGETS=$(XSLFILES) titlepage.templates.xsl
 PROFILECONDITION=fo
+TARGETNS=http://www.w3.org/1999/XSL/Format
 
 include ../Makefile.incl
index 45a7a44d06c6998f1d2e80fc81384a79634c4315..99a44a17caa206d4c9fbaacfc5ac11f40bb2ffd9 100644 (file)
@@ -20,6 +20,9 @@
 
 <!-- ==================================================================== -->
 
+<!-- Namespace for wrapper elements. Please set it for XHTML. -->
+<xsl:param name="ns"/>
+
 <xsl:template match="/">
   <xsl:text>&#x0a;</xsl:text>
   <xsl:apply-templates/>
@@ -178,7 +181,7 @@ and <quote>verso</quote> sides of the title page.</para>
       <xsl:text>.titlepage</xsl:text>
     </xsl:attribute>
     <xsl:text>&#xA;  </xsl:text>
-    <xsl:element name="{@t:wrapper}">
+    <xsl:element name="{@t:wrapper}" namespace="{$ns}">
       <xsl:apply-templates select="@*" mode="copy.literal.atts"/>
       <xsl:text>&#xA;    </xsl:text>
       <xsl:element name="xsl:variable">
@@ -232,7 +235,7 @@ and <quote>verso</quote> sides of the title page.</para>
       <xsl:element name="xsl:if">
         <xsl:attribute name="test">(normalize-space($recto.content) != '') or ($recto.elements.count > 0)</xsl:attribute>
         <xsl:text>&#xA;      </xsl:text>
-        <xsl:element name="{@t:wrapper}">
+        <xsl:element name="{@t:wrapper}" namespace="{$ns}">
           <xsl:apply-templates select="t:titlepage-content[@t:side='recto']/@*"
                                mode="copy.literal.atts"/>
           <xsl:element name="xsl:copy-of">
@@ -293,7 +296,7 @@ and <quote>verso</quote> sides of the title page.</para>
       <xsl:element name="xsl:if">
         <xsl:attribute name="test">(normalize-space($verso.content) != '') or ($verso.elements.count > 0)</xsl:attribute>
         <xsl:text>&#xA;      </xsl:text>
-        <xsl:element name="{@t:wrapper}">
+        <xsl:element name="{@t:wrapper}" namespace="{$ns}">
           <xsl:apply-templates select="t:titlepage-content[@t:side='verso']/@*"
                                mode="copy.literal.atts"/>
           <xsl:element name="xsl:copy-of">
@@ -382,7 +385,7 @@ and <quote>verso</quote> sides of the title page.</para>
           <xsl:text>.auto.mode</xsl:text>
         </xsl:attribute>
         <xsl:text>&#xA;</xsl:text>
-        <xsl:element name="{../../@t:wrapper}">
+        <xsl:element name="{../../@t:wrapper}" namespace="{$ns}">
           <xsl:attribute name="xsl:use-attribute-sets">
             <xsl:value-of select="../../@t:element"/>
             <xsl:text>.titlepage.</xsl:text>
@@ -884,7 +887,7 @@ names.</para>
     <xsl:when test="@t:force and @t:force != '0'">
       <xsl:choose>
         <xsl:when test="@t:named-template">
-          <xsl:element name="{../../@t:wrapper}">
+          <xsl:element name="{../../@t:wrapper}" namespace="{$ns}">
             <xsl:attribute name="xsl:use-attribute-sets">
               <xsl:value-of select="../../@t:element"/>
               <xsl:text>.titlepage.</xsl:text>
index 4bf5f1b2ebdeb925adef3c1922c6fcf70447d044..98cff4e3e777be15f001aa9bbd3956f5b5124466 100644 (file)
@@ -1,5 +1,7 @@
 include $(DOCBOOK_SVN)/buildtools/Makefile.incl
 
+TARGETNS=http://www.w3.org/1999/xhtml
+
 all: xsl-files profile-docbook.xsl profile-chunk.xsl profile-onechunk.xsl
 
 remove-old: