Hi!

Trying to use saxon:assign and while in fop, but i recive this:
(dont know if saxon extension works within the fop?)

Mar 13, 2007 1:07:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
WARNING: Unknown formatting object http://saxon.sf.net^assign
Mar 13, 2007 1:07:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
WARNING: Unknown formatting object http://saxon.sf.net^while

SEVERE: No LayoutManager maker for class class org.apache.fop.fo.UnknownXMLObj
Mar 13, 2007 1:07:34 PM org.apache.fop.layoutmgr.LayoutManagerMapping 
makeLayoutManagers
SEVERE: No LayoutManager maker for class class org.apache.fop.fo.UnknownXMLObj
Mar 13, 2007 1:07:34 PM org.apache.fop.layoutmgr.LayoutManagerMapping 
makeLayoutManagers
SEVERE: No LayoutManager maker for class class org.apache.fop.fo.UnknownXMLObj
Mar 13, 2007 1:07:34 PM org.apache.fop.layoutmgr.LayoutManagerMapping 
makeLayoutManagers
SEVERE: No LayoutManager maker for class class org.apache.fop.fo.UnknownXMLObj
Mar 13, 2007 1:07:34 PM org.apache.fop.layoutmgr.LayoutManagerMapping 
makeLayoutManagers
SEVERE: No LayoutManager maker for class class org.apache.fop.fo.UnknownXMLObj
Mar 13, 2007 1:07:34 PM org.apache.fop.layoutmgr.LayoutManagerMapping 
makeLayoutManagers
SEVERE: No LayoutManager maker for class class org.apache.fop.fo.UnknownXMLObj
Mar 13, 2007 1:07:34 PM org.apache.fop.layoutmgr.LayoutManagerMapping 
makeLayoutManagers
SEVERE: No LayoutManager maker for class class org.apache.fop.fo.UnknownXMLObj
Mar 13, 2007 1:07:34 PM org.apache.fop.layoutmgr.LayoutManagerMapping 
makeLayoutManagers


the code:

<xsl:stylesheet
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
     xmlns:fo="http://www.w3.org/1999/XSL/Format";
     xmlns:saxon="http://saxon.sf.net";
     xmlns:redirect="http://xml.apache.org/xalan/redirect";
     extension-element-prefixes="redirect"
     version="1.0">


<xsl:template name="text">
 <!-- Hämtar text rader -->
 <xsl:for-each select="text">
   <xsl:variable name="left"><xsl:value-of select="(@left div $dpi) * 
72"/>px</xsl:variable>
   <xsl:variable name="top"><xsl:value-of select="(@top div $dpi) * 
72"/>px</xsl:variable>
   <xsl:variable name="font-size"><xsl:value-of 
select="@font-size"/>px</xsl:variable>
   <xsl:variable name="font-family"><xsl:value-of 
select="@font-face"/></xsl:variable>
   <xsl:variable name="height"><xsl:value-of select="@height"/>px</xsl:variable>
   <xsl:variable name="width"><xsl:value-of select="@width"/>px</xsl:variable>
   <xsl:variable name="font-style">
    <xsl:choose>
     <xsl:when test="@font-style = 'regular'">normal</xsl:when>
    <xsl:otherwise><xsl:value-of select="@font-style"/></xsl:otherwise>
    </xsl:choose>
   </xsl:variable>   
  <xsl:element name="fo:block-container">
   <xsl:attribute name="position">absolute</xsl:attribute>
   <xsl:attribute name="absolute-position">absolute</xsl:attribute>
   <xsl:attribute name="left"><xsl:value-of select="$left" /></xsl:attribute>
   <xsl:attribute name="top"><xsl:value-of select="$top" /></xsl:attribute>
   <xsl:attribute name="height"><xsl:value-of select="$height" 
/></xsl:attribute>
   <xsl:attribute name="width"><xsl:value-of select="$width" /></xsl:attribute>
   <xsl:element name="fo:block">
    <xsl:attribute name="font-family"><xsl:value-of select="$font-family" 
/></xsl:attribute>
    <xsl:attribute name="font-size"><xsl:value-of select="$font-size" 
/></xsl:attribute>
    <xsl:attribute name="color">black</xsl:attribute>
    <xsl:attribute name="font-weight"><xsl:value-of select="$font-style" 
/></xsl:attribute>
     <!-- COLOR på fonter är onödigt för svart/vit utskrift :-)
     <xsl:choose>
      <xsl:when test="@color">
       <xsl:attribute name="color"><xsl:value-of select="@color" 
/></xsl:attribute>
      </xsl:when>
    <xsl:otherwise></xsl:otherwise>
     </xsl:choose> -->
    <xsl:value-of select="." />
    <xsl:call-template name="loop" />
   </xsl:element>
  </xsl:element>
 </xsl:for-each>
</xsl:template>

<xsl:variable name="i" select="0" saxon:assignable="yes"/>
<xsl:template name="loop">
  <saxon:while test="$i &lt; 10">
    The value of i is <xsl:value-of select="$i"/>
    <saxon:assign name="i" select="$i+1"/>
  </saxon:while>
</xsl:template>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to