Loading ...
Sorry, an error occurred while loading the content.

Question about order of elements in xslfo

Expand Messages
  • mina_hurray
    Hi: I have an xml input file as shown below:
    Message 1 of 3 , May 1, 2007
    • 0 Attachment
      Hi:

      I have an xml input file as shown below:

      <mfunc>
      <text><para></para></text>

      <image><title></title></image>
      <table></table>
      <text><para></para></text>
      <text><para></para></text>
      <image><title></title></image>

      <l1>
      .....
      </l1>

      <image><title></title></image>
      <table></table>
      <text><para></para></text>

      </mfunc>


      As you can see elements image, table and text can appear before and
      after <l1>. Now in the PDF, I want all image, text and table elements
      to appear before l1 and the ones after to appear after l1.

      Here is my XSLFO piece for tjis part:

      <xsl:choose>
      <xsl:when test="*[self::image[following-sibling::table] or
      self::image[following-sibling::text] or self::image]">
      <xsl:apply-templates select="*[not(self::image) and
      not(self::table[preceding::image]) and
      not(self::text[preceding::image])]"/>
      </xsl:when>
      <xsl:otherwise>
      <xsl:apply-templates/>
      </xsl:otherwise>
      </xsl:choose>


      The issue I am facing here is:

      1) becos of "<xsl:apply-templates select="*[not(self::image)...."
      Any image that appears before <l1> is forced to the end after l1.

      2) The same holds true for text and table elements.

      Can anyone suggest a different apprach to this problem?

      Thanks in advance for your help.
    • Eliot Kimber
      ... This is an XSLT question and should really be asked on the XSLT list: http://www.mulberrytech.com/xsl/xsl-list/ Cheers, E. -- W. Eliot Kimber Professional
      Message 2 of 3 , May 1, 2007
      • 0 Attachment
        mina_hurray wrote:
        > I have an xml input file as shown below:

        >


        This is an XSLT question and should really be asked on the XSLT list:

        http://www.mulberrytech.com/xsl/xsl-list/

        Cheers,

        E.

        --
        W. Eliot Kimber
        Professional Services
        Innodata Isogen
        8500 N. Mopac, Suite 402
        Austin, TX 78759
        (214) 954-5198

        ekimber@...
        www.innodata-isogen.com
      • Eliot Kimber
        ... Just wanted to clarify: the scope of the XSL list is both XSLT and XSL-FO. The XSL-FO yahoo group list tries to limit itself to XSL-FO. Cheers, E. -- W.
        Message 3 of 3 , May 1, 2007
        • 0 Attachment
          Eliot Kimber wrote:
          >
          >
          > mina_hurray wrote:
          > > I have an xml input file as shown below:
          >
          > >
          >
          > This is an XSLT question and should really be asked on the XSLT list:
          >
          > http://www.mulberrytech.com/xsl/xsl-list/
          > <http://www.mulberrytech.com/xsl/xsl-list/>

          Just wanted to clarify: the scope of the XSL list is both XSLT and
          XSL-FO. The XSL-FO yahoo group list tries to limit itself to XSL-FO.

          Cheers,

          E.
          --
          W. Eliot Kimber
          Professional Services
          Innodata Isogen
          8500 N. Mopac, Suite 402
          Austin, TX 78759
          (214) 954-5198

          ekimber@...
          www.innodata-isogen.com
        Your message has been successfully submitted and would be delivered to recipients shortly.