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

Re: [XSL-FO] creating business forms

Expand Messages
  • G. Ken Holman
    ... I can t tell from your post what this is. ... Looking at your PDF I don t see the invoice total on each detail line. ... I see on each
    Message 1 of 5 , Apr 19, 2006
    • 0 Attachment
      At 2006-04-20 01:29 +0000, freefly_xml wrote:
      >There must be a way to do this

      I can't tell from your post what "this" is.

      >without repeating the invoice total
      >on each detail line but I haven't been able to figure it out.

      Looking at your PDF I don't see the invoice total on each detail line.

      >I could change the code that creates the xml to only include the
      >totals on the last line but that seems like a work around that isn't
      >the right way to go about it
      >
      >Any ideas? Here is an example of what I'm working on.
      >http://www.bangboompow.com/examples/xml

      I see <invoice_total> on each line ... you are not obliged to display
      it, so don't. I'm not sure what the problem is.

      >This example makes me think I should be able to get to any of the
      >XML inside my XSL at any time,

      You can.

      >I couldn't figure out how to make it work,

      What is "it"?

      >Please let me know is I'm missing some simple syntax issue or if I'm
      >going about the entire thing incorrectly.

      Can you describe your problem in more detail? Perhaps others can
      understand what you are asking, but I think you need to supply more
      detail to get the help you need.

      . . . . . . . . . . Ken

      --
      Registration open for XSLT/XSL-FO training: Wash.,DC 2006-06-12/16
      Also for XML/XSLT/XSL-FO training:Birmingham,England 2006-05-22/25
      Also for XSLT/XSL-FO training: Copenhagen,Denmark 2006-05-08/11
      World-wide on-site corporate, govt. & user group XML/XSL training.
      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)
      Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/f/bc
      Legal business disclaimers: http://www.CraneSoftwrights.com/legal
    • Mads Hansen
      Dennis, You are correct, there is an easier way to obtain the invoice total from the XML data, whether calculated from the XML records using functions such as
      Message 2 of 5 , Apr 19, 2006
      • 0 Attachment
        Dennis,

        You are correct, there is an easier way to obtain the invoice total from the XML data, whether calculated from the XML records using functions such as sum (http://www.w3schools.com/xpath/xpath_functions.asp#sequence), or from selecting a single value within the XML data.

        Any time you use an xsl:value-of, the select uses an XPATH expression that can pull nodes from anywhere within the XML document. You can specify a specific location, or relative from where you are within the document node-tree when the xsl:value-of is called.

        It looks as if you have done a decent job of specifying the structure of your FO document, but are trying to process all of the content sequentially (top to bottom). However, you should remember that XSLT stylesheets do not need to read the information in document order(from start to end). When you specify an <xsl:for-each> and other xslt functions, you controll what node-set is fed into the processor through XPATH expressions in the select="" that can pull node-sets relative to where you are standing in the node-tree or that can jump to completely different nodes in the XML node tree (<xsl:value-of select="/invoice/Detail_Line[3]/Unit_Price"/> returns the Unit_Price of the third Detail_Line in the invoice document).

        If you brush up on your XPATH expressions and combine that with some XSLT functions, such as sum(), you should be able to calculate the invoice total from the order details, rather than putting it in each record.

        Hope that helps,
        Mads

        freefly_xml <wonderboy@...> wrote: There must be a way to do this without repeating the invoice total
        on each detail line but I haven't been able to figure it out.
        I could change the code that creates the xml to only include the
        totals on the last line but that seems like a work around that isn't
        the right way to go about it

        Any ideas? Here is an example of what I'm working on.
        http://www.bangboompow.com/examples/xml


        This example makes me think I should be able to get to any of the
        XML inside my XSL at any time, I couldn't figure out how to make it
        work, I tried every variation I could think of.
        http://www.w3schools.com/xsl/xsl_value_of.asp

        Please let me know is I'm missing some simple syntax issue or if I'm
        going about the entire thing incorrectly.

        Thanks
        Dennis






        ---------------------------------
        YAHOO! GROUPS LINKS


        Visit your group "XSL-FO" on the web.

        To unsubscribe from this group, send an email to:
        XSL-FO-unsubscribe@yahoogroups.com

        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


        ---------------------------------





        _____________________
        Mads C.M. Hansen III
        madscmhansen3@...
        Cell: 703-861-7435

        ---------------------------------
        Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.

        [Non-text portions of this message have been removed]
      • ravi gupta
        i m a member of XSL-FO group, i m working on xml to pdf conversion tool, can u just guide tht wher i can get information that how it process the INPUT file and
        Message 3 of 5 , Apr 25, 2006
        • 0 Attachment
          i m a member of XSL-FO group, i m working on xml to pdf conversion tool, can u just guide tht wher i can get information that how it process the INPUT file and how produce the OUTPUT. plz help me . atleast tell me some site name where i can get information related to tht,

          thx

          Mads Hansen <madscmhansen3@...> wrote:
          Dennis,

          You are correct, there is an easier way to obtain the invoice total from the XML data, whether calculated from the XML records using functions such as sum (http://www.w3schools.com/xpath/xpath_functions.asp#sequence), or from selecting a single value within the XML data.

          Any time you use an xsl:value-of, the select uses an XPATH expression that can pull nodes from anywhere within the XML document. You can specify a specific location, or relative from where you are within the document node-tree when the xsl:value-of is called.

          It looks as if you have done a decent job of specifying the structure of your FO document, but are trying to process all of the content sequentially (top to bottom). However, you should remember that XSLT stylesheets do not need to read the information in document order(from start to end). When you specify an and other xslt functions, you controll what node-set is fed into the processor through XPATH expressions in the select="" that can pull node-sets relative to where you are standing in the node-tree or that can jump to completely different nodes in the XML node tree ( returns the Unit_Price of the third Detail_Line in the invoice document).

          If you brush up on your XPATH expressions and combine that with some XSLT functions, such as sum(), you should be able to calculate the invoice total from the order details, rather than putting it in each record.

          Hope that helps,
          Mads

          freefly_xml wrote: There must be a way to do this without repeating the invoice total
          on each detail line but I haven't been able to figure it out.
          I could change the code that creates the xml to only include the
          totals on the last line but that seems like a work around that isn't
          the right way to go about it

          Any ideas? Here is an example of what I'm working on.
          http://www.bangboompow.com/examples/xml


          This example makes me think I should be able to get to any of the
          XML inside my XSL at any time, I couldn't figure out how to make it
          work, I tried every variation I could think of.
          http://www.w3schools.com/xsl/xsl_value_of.asp

          Please let me know is I'm missing some simple syntax issue or if I'm
          going about the entire thing incorrectly.

          Thanks
          Dennis






          ---------------------------------
          YAHOO! GROUPS LINKS


          Visit your group "XSL-FO" on the web.

          To unsubscribe from this group, send an email to:
          XSL-FO-unsubscribe@yahoogroups.com

          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


          ---------------------------------





          _____________________
          Mads C.M. Hansen III
          madscmhansen3@...
          Cell: 703-861-7435

          ---------------------------------
          Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.

          [Non-text portions of this message have been removed]




          Yahoo! Groups Links










          ---------------------------------
          Jiyo cricket on Yahoo! India cricket
          Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

          [Non-text portions of this message have been removed]
        • G. Ken Holman
          ... We have a freely-downloadable excerpt of our XSL-FO book Practical Formatting Using XSL-FO on our web site. The full text of the first three chapters,
          Message 4 of 5 , Apr 25, 2006
          • 0 Attachment
            At 2006-04-25 23:43 +0100, ravi gupta wrote:
            >i m a member of XSL-FO group, i m working on xml to pdf conversion
            >tool, can u just guide tht wher i can get information that how it
            >process the INPUT file and how produce the OUTPUT. plz help me .
            >atleast tell me some site name where i can get information related to tht,

            We have a freely-downloadable excerpt of our XSL-FO book "Practical
            Formatting Using XSL-FO" on our web site. The full text of the first
            three chapters, the introductory text of all of the other chapters,
            and the full text of the annexes are all in the excerpt PDF. You'll
            find explanatory text and data flow diagrams in the excerpt.

            From our home page in my trailer below, follow the "Books & free
            excerpts" link at the right hand side of the page.

            I hope this helps.

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


            --
            Registration open for XSLT/XSL-FO training: Wash.,DC 2006-06-12/16
            Also for XSLT/XSL-FO training: Minneapolis, MN 2006-07-31/08-04
            Also for XML/XSLT/XSL-FO training:Birmingham,England 2006-05-22/25
            Also for XSLT/XSL-FO training: Copenhagen,Denmark 2006-05-08/11
            World-wide on-site corporate, govt. & user group XML/XSL training.
            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)
            Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/f/bc
            Legal business disclaimers: http://www.CraneSoftwrights.com/legal
          Your message has been successfully submitted and would be delivered to recipients shortly.