Subject: Re: [xsl] XSL FO - undeclared namespace problem From: Betty Harvey <betty@xxxxxxxxxx> Date: Sun, 27 Apr 2003 21:52:31 -0400 (EDT) |
Try adding the 'fo' namespace to the <xsl:stylesheet> declaration: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> Betty ECC, Inc. On Sun, 27 Apr 2003, Mark Ivs wrote: > 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"/>  > </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()"/>  > </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 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSL FO - undeclared names, G. Ken Holman | Thread | [xsl] XSLT Evening Course, Steve Ball |
Re: [xsl] XSL FO - undeclared names, G. Ken Holman | Date | Re: AW: [xsl] two nodes (or attribu, Jarkko . Moilanen |
Month |