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

Re: [XSL-FO] Re: psmi question

Expand Messages
  • G. Ken Holman
    ... If you ve transcribed the error message correctly, then one problem is should be ... but you re right ... PSMI cannot be in a block.
    Message 1 of 6 , Jan 6, 2004
      At 2004-01-06 17:03 +0000, odekij61 wrote:
      >Now I'm trying this psmi thing out and
      >I get an error because I call psmi in my xsl file within a block.
      >The error says : error on loading data. XSLT transformation failed:
      >Unexpected parent <xsl:block> for psmi:page-sequence.

      If you've transcribed the error message correctly, then one problem is
      <xsl:block> should be <fo:block> ... but you're right ... PSMI cannot be in
      a block.

      >I believe this is mentioned in the psmi documentation:
      >The one
      >construct is a block-level construct that must be an immediate child
      >of an <{http://www.w3.org/1999/XSL/Format}:flow> construct and not a
      >descendant of any other PSMI construct. An error is reported and
      >transformation halts if the PSMI construct is found anywhere it is not
      >allowed, and no result is produced.

      Right ... pages cannot be found *inside* blocks, they can only be next to

      >Any idea if I can run this when I'm already in a block? I have
      >chapters that are blocks,

      Why have you put a chapter *in* a block? Typical contents at the top of
      the flow are sibling blocks. If you are looking for a place for a set of
      inherited properties, you can put them in the flow object itself and not in
      a wrapping block.

      >and then content inside that I will need to switch page layouts.

      Then I think you are out of luck ... I'm not sure what it means to put a
      page *in* a page ... you've put a block on your page so what does it mean
      to put a new page in that block you've just put on another page? The PSMI
      is used for switching page geometries so it assumes it is working *outside*
      of any areas of any area tree. It has to be an immediate child of
      <fo:flow> in order to be outside of any area.

      >I have no idea how to fix this error, so it looks like psmi won't work
      >for my situation.

      I guess so ... but look again at your flow ... if you have no reason for a
      wrapper block, and all of your top-level blocks of your flow are siblings,
      and you need a top-level table on a new page, then PSMI will work for you
      ... but the <fo:flow> doesn't allocate any areas in the area tree ...
      blocks create areas in the area tree for a page ... putting a *page* inside
      an area on a page doesn't make sense to me, so I couldn't find a way of
      putting that into the PSMI.

      Perhaps if you re-examined your flow of top-level areas in the area trees
      you might find your wrapper block is unnecessary. If it is necessary, then
      you'll have to think what it means to you to have a new page geometry
      inside of the area you created with your block.

      I hope this helps.

      ..................... Ken

      North America (Washington, DC): 3-day XSLT/2-day XSL-FO 2004-02-09
      Instructor-led on-site corporate, government & user group training
      for XSLT and XSL-FO world-wide: please contact us for the details

      G. Ken Holman mailto:gkholman@...
      Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
      Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
      ISBN 0-13-065196-6 Definitive XSLT and XPath
      ISBN 0-13-140374-5 Definitive XSL-FO
      ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath
      ISBN 1-894049-11-X Practical Formatting Using XSL-FO
      Member of the XML Guild of Practitioners: http://XMLGuild.info
      Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
    Your message has been successfully submitted and would be delivered to recipients shortly.