Prefix FO not bound

Here should go questions about transforming XML with XSLT and FOP.
Posts: 37
Joined: Wed Dec 23, 2009 6:13 am

Prefix FO not bound

Post by burbles » Wed Dec 23, 2009 7:03 am

I'm trying to create a stylesheet for a simple processing instruction to add a line break within a <para>. I'm using Docbook 5 with oXygen version 11.1.
Here is part of the XML code with the new 'linebr' style:

Code: Select all

text text text.</para>
<para>Department of xx<?linebr?>May 2009</para>
And here is my stylesheet 'linebreak.xsl':

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl=""
xmlns:xs="" version="1.0">
<xsl:import href="file:///c:/Program Files/Oxygen XML Editor 11/frameworks/docbook/xsl/fo/docbook.xsl"/>
<xsl:template match="processing-instruction('linebr')">
<fo:block break-after="line" />
I'm getting a validation error of:
F [Saxon6.5.5] The prefix "fo" for element "fo:block" is not bound.

What am I missing?

Posts: 2740
Joined: Tue May 17, 2005 4:01 pm

Re: Prefix FO not bound

Post by adrian » Wed Dec 23, 2009 11:50 am


You need to add the namespace prefix declaration for fo to the root element of the stylesheet:

<xsl:stylesheet xmlns:xsl=""
xmlns:fo="" version="1.0">

Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Post Reply