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

Re: [XSL-FO] Re: psmi question

Expand Messages
  • G. Ken Holman
    ... Not sure why, Jeremy ... I would assume that in a production environment you wouldn t be running the XSL Formatter GUI and that you would probably be
    Message 1 of 6 , Jan 5, 2004
    • 0 Attachment
      At 2004-01-05 22:11 +0000, odekij61 wrote:
      >It makes sense now. I guess that means I can not use psmi to solve my
      >problem.

      Not sure why, Jeremy ... I would assume that in a production environment
      you wouldn't be running the XSL Formatter GUI and that you would probably
      be running XSL Formatter from a command line oriented batch file. Are you
      prevented from running, say, a Saxon process in advance of XSL Formatter
      and then just run XSL Formatter on the output?

      I'm curious (and I think others might be too) to know what practical
      limitations you have on implementing an external semantic as exemplified by
      the PSMI. The PSMI is a model for implementing custom formatting semantics
      as extensions to XSL-FO in an open fashion. If the details are sensitive,
      perhaps just email me off-line.

      Thanks for sharing!

      .......................... 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
    • odekij61
      Hello, I do use commandline and a web application to create pdfs, but was thinking this is too complex. Now I m trying this psmi thing out and I get an error
      Message 2 of 6 , Jan 6, 2004
      • 0 Attachment
        Hello,

        I do use commandline and a web application to create pdfs, but was
        thinking this is too complex. 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.

        I believe this is mentioned in the psmi documentation:
        The one
        <{http://www.CraneSoftwrights.com/resources/psmi}:page-sequence>
        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.

        Any idea if I can run this when I'm already in a block? I have
        chapters that are blocks, and then content inside that I will need to
        switch page layouts.

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

        Thanks,
        Jeremy


        --- In XSL-FO@yahoogroups.com, "G. Ken Holman" <gkholman@c...> wrote:
        > At 2004-01-05 22:11 +0000, odekij61 wrote:
        > >It makes sense now. I guess that means I can not use psmi to solve my
        > >problem.
        >
        > Not sure why, Jeremy ... I would assume that in a production
        environment
        > you wouldn't be running the XSL Formatter GUI and that you would
        probably
        > be running XSL Formatter from a command line oriented batch file.
        Are you
        > prevented from running, say, a Saxon process in advance of XSL
        Formatter
        > and then just run XSL Formatter on the output?
        >
        > I'm curious (and I think others might be too) to know what practical
        > limitations you have on implementing an external semantic as
        exemplified by
        > the PSMI. The PSMI is a model for implementing custom formatting
        semantics
        > as extensions to XSL-FO in an open fashion. If the details are
        sensitive,
        > perhaps just email me off-line.
        >
        > Thanks for sharing!
        >
        > .......................... 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@C...
        > 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
      • 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 3 of 6 , Jan 6, 2004
        • 0 Attachment
          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
          ><{http://www.CraneSoftwrights.com/resources/psmi}:page-sequence>
          >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
          blocks.

          >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.