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

psmi question

Expand Messages
  • odekij61
    Hello, I have downloaded and run the example.fo of the page master sequence interleave to help change pages from dynamic content. It worked and the table
    Message 1 of 6 , Jan 5, 2004
    • 0 Attachment
      Hello,

      I have downloaded and run the example.fo of the page master sequence
      interleave to help change pages from dynamic content. It worked and
      the table changed to landscape layout when I ran the example.fo using
      XSL Formatter V2.5MR5, but did not work when I ran the example.xml and
      example.xsl files. Is there a way to use psmi without a .fo file? Am
      I doing something wrong? Or is there a problem with XSL FormatterV2.5MR5?

      Thanks,
      Jeremy
    • G. Ken Holman
      ... Correct, I would anticipate that the landscaped table would have disappeared altogether. ... No, because none of the vendors have implemented the PSMI
      Message 2 of 6 , Jan 5, 2004
      • 0 Attachment
        At 2004-01-05 20:21 +0000, odekij61 wrote:
        >I have downloaded and run the example.fo of the page master sequence
        >interleave to help change pages from dynamic content. It worked and
        >the table changed to landscape layout when I ran the example.fo using
        >XSL Formatter V2.5MR5, but did not work when I ran the example.xml and
        >example.xsl files.

        Correct, I would anticipate that the landscaped table would have
        disappeared altogether.

        >Is there a way to use psmi without a .fo file?

        No, because none of the vendors have implemented the PSMI semantic
        natively. I've implemented the semantic in the supplied XSLT stylesheet
        that needs to be run against the *result* of running example.xml with
        example.xsl.

        >Am I doing something wrong? Or is there a problem with XSL FormatterV2.5MR5?

        You are not doing anything wrong other than assuming that any formatter
        package natively supports PSMI.

        The example.xsl creates a resulting PSMI+FO instance and must be processed
        by the psmi.xsl stylesheet in order to create a pure FO instance for
        processing by an engine. Without the conversion, FO engines are required
        to ignore unrecognized vocabulary in non-FO namespaces ... it is
        essentially an extension, but I've supplied an interpretation of the
        extension in a standard XSLT 1.0 stylesheet.

        So XSL Formatter is correctly processing the foreign unrecognized PSMI
        vocabulary without any errors (but also without the PSMI result).

        I hope this helps your understanding of the situation.

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

        p.s. for readers of the mail list: only one day remains for anyone in the
        US east coast interested in the XSL training to preregister before we make
        a go/no-go decision on running the February delivery ... the way it stands
        today we don't have enough registrants to proceed and will have to cancel
        to prevent losing our hotel deposit.

        --
        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, It makes sense now. I guess that means I can not use psmi to solve my problem. Thanks for the prompt reply! Jeremy ... stylesheet ... FormatterV2.5MR5?
        Message 3 of 6 , Jan 5, 2004
        • 0 Attachment
          Hello,
          It makes sense now. I guess that means I can not use psmi to solve my
          problem.
          Thanks for the prompt reply!
          Jeremy

          --- In XSL-FO@yahoogroups.com, "G. Ken Holman" <gkholman@c...> wrote:
          > At 2004-01-05 20:21 +0000, odekij61 wrote:
          > >I have downloaded and run the example.fo of the page master sequence
          > >interleave to help change pages from dynamic content. It worked and
          > >the table changed to landscape layout when I ran the example.fo using
          > >XSL Formatter V2.5MR5, but did not work when I ran the example.xml and
          > >example.xsl files.
          >
          > Correct, I would anticipate that the landscaped table would have
          > disappeared altogether.
          >
          > >Is there a way to use psmi without a .fo file?
          >
          > No, because none of the vendors have implemented the PSMI semantic
          > natively. I've implemented the semantic in the supplied XSLT
          stylesheet
          > that needs to be run against the *result* of running example.xml with
          > example.xsl.
          >
          > >Am I doing something wrong? Or is there a problem with XSL
          FormatterV2.5MR5?
          >
          > You are not doing anything wrong other than assuming that any formatter
          > package natively supports PSMI.
          >
          > The example.xsl creates a resulting PSMI+FO instance and must be
          processed
          > by the psmi.xsl stylesheet in order to create a pure FO instance for
          > processing by an engine. Without the conversion, FO engines are
          required
          > to ignore unrecognized vocabulary in non-FO namespaces ... it is
          > essentially an extension, but I've supplied an interpretation of the
          > extension in a standard XSLT 1.0 stylesheet.
          >
          > So XSL Formatter is correctly processing the foreign unrecognized PSMI
          > vocabulary without any errors (but also without the PSMI result).
          >
          > I hope this helps your understanding of the situation.
          >
          > ........................... Ken
          >
          > p.s. for readers of the mail list: only one day remains for anyone
          in the
          > US east coast interested in the XSL training to preregister before
          we make
          > a go/no-go decision on running the February delivery ... the way it
          stands
          > today we don't have enough registrants to proceed and will have to
          cancel
          > to prevent losing our hotel deposit.
          >
          > --
          > 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
          ... 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 4 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 5 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 6 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.