[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSL FO - undeclared namespace problem

Subject: XSL FO - undeclared namespace problem
From: Mark Ivs <markivs2003@xxxxxxxxx>
Date: Sun, 27 Apr 2003 16:38:49 -0700 (PDT)
fo is an undeclared namespace
Hello,
   I am fairly new to xsl fo.
Below is the strip down version of my xsl file. Please
take a look at it first, because my question is based
on it. I do an apply templates on the Result node and
I get this error. 
"Undeclared namespace in fo:table-row"

I have no idea why the parser dosen't understand
fo:table-row. It's interesting because it dosen't
complain about the fo:table-row earlier in the code.

My conclusion is, anytime I do an apply template or
call template when I am inside fo:flow, the parser
complains about the first xsl tag it sees in the 
called template.

To double check this, I added a call-template
(name=testtemplate). The error I get is "Undeclared
namespace in fo:page-number"

I am using saxon.

Thanks and I really appreciate your help.

Mark


<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output media-type="application/pdf"
method="saxon:fop" xmlns:saxon="http://www.icl.com/"/>


<xsl:template match="/HOME">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">


<fo:layout-master-set> 

<!--defining the page masters-->     
<fo:simple-page-master master-name="PORTRAIT"
page-width="8.5in" page-height="11in">
	<fo:region-before extent="1in"/>
	<fo:region-after extent="1in"/>
	<fo:region-body margin-bottom="1in"
margin-left="0.2in" margin-right="0.2in"
margin-top="1in"/> 
</fo:simple-page-master>
<!--End defining the page masters-->

</fo:layout-master-set> 
           
<fo:page-sequence>
<xsl:attribute
name="master-reference">PORTRAIT</xsl:attribute> 
<fo:static-content flow-name="xsl-region-before">
<fo:table text-align="center">
   <fo:table-column><xsl:attribute
name="column-width">180px</xsl:attribute></fo:table-column>

<fo:table-body>
<fo:table-row background-color="#FFFFFF">
  <fo:table-cell display-align="center">
    <fo:block><xsl:text>header</xsl:text></fo:block>
  </fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>

<!--end header-->
	
<!--footer-->
<fo:static-content flow-name="xsl-region-after">
<fo:table text-align="center">
<fo:table-column><xsl:attribute
name="column-width">180px</xsl:attribute></fo:table-column>

<fo:table-body>
<fo:table-row background-color="#FFFFFF">
  <fo:table-cell display-align="center">
    <fo:block><xsl:text>footer</xsl:text></fo:block>
  </fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>

               
<fo:flow flow-name="xsl-region-body"
font-family="Helvetica" font-size="10pt">  
<fo:table text-align="center">		
<xsl:for-each select="/HOME/Description">
<fo:table-column>
 <xsl:attribute name="column-width"><xsl:value-of
select="@preferredWidth"/>px</xsl:attribute>
</fo:table-column>
</xsl:for-each>
	
<fo:table-body>
<fo:table-row background-color="#003399">
  <fo:table-cell>
    <fo:block>
      <xsl:value-of select="@label"/>&#160;
    </fo:block>
  </fo:table-cell>
</fo:table-row>

<xsl:apply-templates select="/HOME/Result"/>

<fo:table-row background-color="#FFFFFF">
<fo:table-cell>
  <fo:block">
   <xsl:call-template name="testTemplate"/>
  </fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
               
</fo:table>
</fo:flow> 
	
</fo:page-sequence> 
</fo:root> 
</xsl:template>

<xsl:template match="Result">
<!-- *** The parser complains at the next line *** -->
<fo:table-row background-color="#FFFFFF">
  <fo:table-cell>
    <fo:block">
	<xsl:value-of select="text()"/>&#160;
    </fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>

<xsl:template name="testTemplate">
<!-- *** The parser complains at the next line *** -->
Page number: <fo:page-number/>
</xsl:template>
		
</xsl:stylesheet>

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.