Odd error at end of transform
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 269
- Joined: Sat Jul 10, 2010 4:03 pm
Odd error at end of transform
I added a section to my style sheet to output multiple documents from a single input document, to create an epub or mobi style ebook output.
using a for-each loop calling result-document for every chapter
<xsl:result-document href="{$filename}" format="xhtml">
.....
</xsl:result-document>
I now get this at the end of the transform
SystemID: /home/scott/workspace/books_changes2/books/sh-tei.xml_xslt_cascade
Engine name: Saxon-EE 9.3.0.4
Severity: fatal
Description: Content is not allowed in prolog.
Start location: 1:39
URL: http://www.saxonica.com/documentation/j ... l#SXXP0003
It appears that the book is created successfully, but I hate having some unknown waiting around to bite me later.
here is the complete template that I added
The location of 1:39 doesn't make alot of sense to me?
using a for-each loop calling result-document for every chapter
<xsl:result-document href="{$filename}" format="xhtml">
.....
</xsl:result-document>
I now get this at the end of the transform
SystemID: /home/scott/workspace/books_changes2/books/sh-tei.xml_xslt_cascade
Engine name: Saxon-EE 9.3.0.4
Severity: fatal
Description: Content is not allowed in prolog.
Start location: 1:39
URL: http://www.saxonica.com/documentation/j ... l#SXXP0003
It appears that the book is created successfully, but I hate having some unknown waiting around to bite me later.
here is the complete template that I added
Code: Select all
<xsl:template name="genEBOOK">
<xsl:param name="context"/>
<xsl:for-each select=" $context/tei:text/tei:front | $context/tei:text/tei:body/descendant::tei:div[@type='part' or @type='chapter']">
<xsl:variable name="nodeName" select="if (name(.) = 'front') then 'front' else concat(@type,@n)"/>
<xsl:variable name="filename" select="concat($ebook, '_', $title[1], '_', $nodeName, '.html')"/>
<xsl:value-of select="$filename"/>
<xsl:result-document href="{$filename}" format="xhtml">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<title> <xsl:value-of select="$title"></xsl:value-of></title>
<link rel="stylesheet" href="csps.css" type="text/css" charset="utf-8"></link>
</head>
<body>
<xsl:choose>
<xsl:when test="$production='no'">
<div id="proof-book-content">
<div class="build-number">build number: <xsl:value-of select="$buildNumber"/></div>
<div class="build-time"> build time: <xsl:value-of select="$buildTimestamp"/></div>
<xsl:apply-templates select="."/>
</div>
</xsl:when>
<xsl:otherwise>
<div id="proof-book-content">
<xsl:choose>
<xsl:when test="name(.) = 'front'">
<xsl:apply-templates select="."/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." mode="ebook"/>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:otherwise>
</xsl:choose>
</body>
</html>
</xsl:result-document>
</xsl:for-each>
</xsl:template>
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Odd error at end of transform
Hello,
From the SystemID of the error(/home/scott/workspace/books_changes2/books/sh-tei.xml_xslt_cascade) it appears you are using additional(cascading) XSLT stylesheets. The error is on the intermediary result of a stylesheet transformation.
Duplicate the transformation scenario and edit the duplicate. Remove some or all of the stylesheets under "Additional XSLT stylesheets", and verify the output of the transformation(look at 1:39).
Regards,
Adrian
From the SystemID of the error(/home/scott/workspace/books_changes2/books/sh-tei.xml_xslt_cascade) it appears you are using additional(cascading) XSLT stylesheets. The error is on the intermediary result of a stylesheet transformation.
Duplicate the transformation scenario and edit the duplicate. Remove some or all of the stylesheets under "Additional XSLT stylesheets", and verify the output of the transformation(look at 1:39).
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service