This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XSLT/FO Newbie Question


Add
xmlns:fo="http://www.w3.org/1999/XSL/Format"; to xsl:stylesheet


----- Original Message -----
From: "Scott Meadows" <scott@towerdb.net>
To: <XSL-List@lists.mulberrytech.com>
Sent: Monday, May 20, 2002 11:05
Subject: [xsl] XSLT/FO Newbie Question


> I'm trying to create a simple XSL-FO document, but the following code
> produces a syntax error when I try to view it in IE.
>
> Error: reference to undeclared namespace
>
> The resulting FO document also adds xmlns:fo="" to each of the prefixed
> block elements. I'm assuming these problems are one and the same
(something
> to do with my fo:block nesting), but I don't know enough about XSLT and
> namespaces to understand how to correct it.
>
> Can anybody help me with this one?
>
>
> ----------------------
>
> <?xml version="1.0"?>
>
> <xsl:stylesheet version="1.0"
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>
>     <xsl:output method="xml"/>
>
>
> <xsl:template match="/">
>
>   <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
>
>         <fo:layout-master-set>
>             <fo:simple-page-master master-name="II_18">
>                 <fo:region-body margin-left=".5in" margin-right=".5in"
>                 margin-top="1in" margin-bottom="1in"/>
>             </fo:simple-page-master>
>         </fo:layout-master-set>
>
>         <fo:page-sequence master-name="II_18">
>             <fo:flow flow-name="xsl-region-body">
>
>                 <xsl:apply-templates/>
>
>
>                 </fo:flow>
>         </fo:page-sequence>
>     </fo:root>
>
> </xsl:template>
>
>
> <xsl:template match="chapter">
>     <fo:block
>     space-after.optimum="10pt"
>     font-weight="bold"
>     font-size="12pt"
>     text-align="center">
>
>         <xsl:value-of select="."/>
>
>     </fo:block>
>
> </xsl:template>
>
> <xsl:template match="title">
>     <fo:block
>     space-after.optimum="10pt"
>     font-weight="bold"
>     font-size="16pt"
>     text-align="center">
>
>         <xsl:value-of select="."/>
>
>     </fo:block>
>
> </xsl:template>
>
>
>
> <xsl:template match="para">
>
> <fo:block
>         text-align="left"
>         font-size="10px"
>         font-family="Helvetica">
>
>     <xsl:value-of select="."/>
>
>     </fo:block>
>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]