Jörg F. wrote:


with v7.5 the customized xsl was running.
after updating to v8.0 some errors occur.


Fatal error: Error reported by XML parser...Line 59, 34


What is wrong here?

 <xsl:template match="processing-instruction('dbfo-pagebreak')">
   <fo:block break-before="page"/>
 </xsl:template>

When uncommenting the above template, the error occurs in a similar way:

  <xsl:template match="para[@role='oberes_trigramm']">
    <fo:block>
      <fo:inline font-size="9pt" padding-before="9px">
      <xsl:apply-imports/>
      </fo:inline>
     </fo:block>  
  </xsl:template>




Can you please help? What's wrong?


Your docbook_custom.xsl was initially created and modified using the "XMLmind XSL Customizer" helper application. See http://www.xmlmind.com/xmleditor/_distrib/doc/help/com.xmlmind.xslcustom.Customizer.html

Because XMLmind XSL Customizer only deals with xsl:param elements like:

---
  <xsl:param name="formal.title.placement">
figure after
example after
equation after
table after
procedure after
task after
</xsl:param>
---

and xsl:attribute-set elements like:

---
  <xsl:attribute-set name="formal.title.properties">
    <xsl:attribute name="font-size">9pt</xsl:attribute>

    <xsl:attribute name="font-weight">normal</xsl:attribute>

    <xsl:attribute name="text-align">left</xsl:attribute>
  </xsl:attribute-set>
---

it does not need to declare the "fo" prefix which is used in xsl:template elements.

When you have later added by hand xsl:template elements like

---
  <xsl:template match="processing-instruction('dbfo-pagebreak')">
    <fo:block break-before="page"/>
  </xsl:template>
---

you forgot to declare the "fo" prefix.

We'll probably modify "XMLmind XSL Customizer" in order to make it declare the "fo" prefix to prevent errors in use cases like yours.



====================================================================
Adding xmlns:fo="http://www.w3.org/1999/XSL/Format"; fixes this issue. Example:

---
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:fo="http://www.w3.org/1999/XSL/Format";
                version="1.0">
---
====================================================================



--
PS: Please note that, as you send it to us, your docbook_custom.xsl could not have worked in XXE v7.5 for the very same reasons it did not work in XXE v8.



--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to