1 2 Previous Next 26 Replies Latest reply on Nov 10, 2011 11:42 AM by beverly

    xslt multiple subsummary parts

    Malcolm

      I'm using the example xslt for subsummaries provided by Filemaker and found in the XML examples folder and I want to extend it it two ways.

       

      My first question is, how do I select thirteen of perhaps twenty columns in a for-each loop?

      The first thing I want to do is to generate a sum for more than one column. The example file expects the last column to be numbers and sums them. I have thirteen columns that are going to be numbers and I want to sum each of them independently. That doesn't seem to be too much of a problem, although I haven't succeeded yet. It seems as though I simply need to apply a sum to the correct columns.

       

       

      The second thing that I want to do is to do the summary on more than one column, effectively imitating multiple subsummary parts, though the output is html. Is it possible to create nested groups? What is the syntax that I need for this sort of job?

       

      Malcolm

        • 1. Re: xslt multiple subsummary parts
          LyndsayHowarth

          I'm not sure it is worth your while to get involved with this.

          http://help.filemaker.com/app/answers/detail/a_id/7701/~/deprecation-of-xslt-api-for-custom-web-publishing

           

          Why don't you use PHP? I could help you figure this then. I struggled with the xslt and I write PHP & LDML easily.

           

          If you want to pursue this, you need to talk to / buy the book written by Beverly Voth.

           

          regards

          Lyndsay

          • 2. Re: xslt multiple subsummary parts
            Norsult

            I do still hope for continuation of the xslt processor if demand is big enough! But otherwise Lyndsay said already that FileMaker has announced the deprecation of the feature.

             

            XSLT is a very powerful programming language aiming at chunks of data in a manner that is foreign to FileMakers way of thinking or even most other (procedural) programming languages. You will need a deeper understanding of what it means to navigate data organised in a tree, what the meaning of a node (with its possible subtree) is and so forth.

             

            It is definitely out of scope in this forum to introduce those concepts. But perhaps you start looking for literature, a good starter for me was the "XSLT Cookbook" by Sal Mangano, published from O'Reilly. There (www.oreilly.com) is tons of more to explore...

             

            Even though FileMaker stops using xslt processor in its web publishing engine, that technique remains the main tool for manipulating any wellformed XML data.

             

            Regards,

            Volker

            • 3. Re: xslt multiple subsummary parts

              Volker,

               

              It has been said by FileMaker that XSL will remain as it currently is (although an update to a newer version is overdue). The only thing depreciated is the XSLT web interface which is substituted well by PHP.

               

              Winfried

              • 4. Re: xslt multiple subsummary parts
                Norsult

                Winfried, thanks for chiming in --

                a) this is a good example for a discussion to leave track: we are now talking about XSLT support in Filemaker while the original post asked for help with using xslt in a specific way. It should definitely be possible to edit the header in an answer on a thread!

                 

                b) Well, i know that in *exporting* to xml, a xsl stylesheet can be applied.  That is done locally from a FMP version. But the beauty of the xsl support in the webengine is (was) that an outside request for formatted data (which could be a HTML page description as one special case) could be handled very easily. Off course I can write a program using PHP that produces a XML stream of data, but that is definitely much more work and more difficult to maintain and adjust.

                 

                If we want to coninue this discussion, lets open a new one for that purpose.

                 

                Volker

                • 5. Re: xslt multiple subsummary parts
                  LyndsayHowarth

                  Malcolm,

                   

                  What versions of FileMaker and FileMaker Products are you working with?

                  What experience do you bring to the exercise you set yourself with the xslt?

                   

                  I would agree with Volker that xslt requires a different approach to middleware than PHP or LDML or CDML etc. It is a data-separation model in 3 parts. The majority of FileMaker developers do not use data-separation with only 2 parts in their solutions and find it a bit alien conceptually. In addition, xslt is not easily human-readable.

                   

                  PHP is the most human-readable code I've ever worked with. It was easy to learn and can be used to manipulate data and files in any ways you fancy. In addition, FileMaker inc provides a PHP site assistant to auto-generate web pages based on settings you chose. There is built in ability to set up summaries and sort orders etc. There is also an excellent basic tutorial provided with older versions of FIleMaker Server... next to the PHP Class directory files.

                   

                  I do PHP summaries all the time. You find the data and sort it then what is returned can be further filtered and arranged and calculated upon in a logical and readable code environment.

                   

                  php.org has the php manual online, it works on most servers, you can perform much more than just FileMaker interactions like file management, generating PDFs, Emailing with HTML emails etc. FM Studio plugin for Dreamweaver gives you the code components you need if you don't write raw code.

                   

                  I recommend you cut your losses on the xslt....

                   

                  Lyndsay

                  • 6. Re: xslt multiple subsummary parts

                    Web reply:

                     

                    According to my email client, I didn't chime in at all: in other words: I don't see (get) my own email posts back as email in the list.

                    That way the thread is incomplete which makes replies by email useless.

                     

                    Why me? How about others? I consider this as a bug.

                     

                     

                    Others have argued that using a web browser is just as good - THIS IS NOT TRUE!

                     

                    In email clients I have all posts at hand.

                    I don't even need an internet connection.

                    Replies are a lot quicker.

                    I can quickly search through all my emails for specific words, names, or dates.

                    I can build an email catalog (in FileMaker) that provides even more granularity.

                    I simply don't want to take the hassle to "browse" for posts I might be able to reply to - I don't want to waste my time for that.

                     

                    Winfried

                    • 7. Re: xslt multiple subsummary parts

                      Email reply:

                       

                       

                      According to my email client, I didn't chime in at all: in other words: I don't see (get) my own email posts back as email in the list.

                      That way the thread is incomplete which makes replies by email useless.

                       

                      Why me? How about others? I consider this as a bug.

                       

                       

                      Others have argued that using a web browser is just as good - THIS IS NOT TRUE!

                       

                      In email clients I have all posts at hand.

                      I don't even need an internet connection.

                      Replies are a lot quicker.

                      I can quickly search through all my emails for specific words, names, or dates.

                      I can build an email catalog (in FileMaker) that provides even more granularity.

                      I simply don't want to take the hassle to "browse" for posts I might be able to reply to - I don't want to waste my time for that.

                       

                      Winfried

                      • 8. Re: xslt multiple subsummary parts
                        datastride

                        +1 for Winfried’s issues regarding email …  in bold italic 24-point type!!!

                         

                         

                         

                        Peace, love & brown rice,

                         

                        Morgan Jones

                         

                         

                         

                        FileMaker + Web:  Design, Develop & Deploy

                         

                        Certifications: FileMaker 9, 10 & 11

                         

                        <http://www.onepartharmony.com/> One Part Harmony 

                         

                        Austin, Texas • USA

                         

                        512-422-0611

                        • 9. Re: xslt multiple subsummary parts

                          I just made a test with two posts, one on the web and one by email at the same time. After waiting for some tiem I was wondering when the mail would arrive, but they existed just on the web.

                           

                          None of them was sent to me by email.

                           

                          Conclusion: Own posts are NOT emailed!

                           

                          OK: Was mentioned on the Announcement page:

                          Feature Requests Submitted for Possible Future Updates:

                               • Copy of your post sent to yourself via email

                           

                          Wonder why this was suppressed in the first place. List is useless without this!

                           

                           

                          Winfried

                          • 10. Re: xslt multiple subsummary parts
                            tech_liaison

                            Winfried et al:

                             

                            I'm sorry you find the email support in our new Developer Community lacking. It definitely is put togehter with a different philosophy that will take some getting used to. The philosophy is essentially this: the Developer Community is a web application, so it should do the web stuff as well as it can and let the email client perform the functionality that it does really well. Having a message you just sent echoed back at you is a good example of this. You've just sent the message so you already have a copy of it in your Sent Items folder, shouldn't your email client include that message for you when viewing the thread? If you use Mail.app on Mac OS X 10.7 Lion, that's exactly what it does. Simply choose View > Organize By Conversation, and enable Preferences > Viewing > Include related messages. I view this functioanality as far more efficient for email storage as it reduces duplicate hits when searching through my received email. I hope this helps somewhat.

                            • 11. Re: xslt multiple subsummary parts
                              datastride

                              Dave,

                               

                               

                               

                              With all due respect, I strongly urge you to reconsider Winfried’s suggestion (which I echo).

                               

                               

                               

                              Using the web-based tool is highly inefficient for developers like myself who work 10 or more hours a day and try to squeeze in assistance to others along the way. Having the full thread of each conversation appear in a single email folder (inbox) makes it fast and easy to manage and complete these opportunities to assist. Having to hunt around in different email folders to see what I wrote last time is a genuine pain. And, yes, Outlook can manage threads and present them to me, but I find this feature not much to my liking for everyday work.

                               

                               

                               

                              Isn’t our world all about improving efficiency?

                               

                               

                               

                              And how tough can it be to offer the option to have one’s own posts emailed in the same manner as post by others? It just can’t be that big a hurdle, and should certainly be able to be set as an individual option so folks who share your preference can choose not to have their own posts echoed to email.

                               

                               

                               

                              So thanks in advance for your positive reconsideration of Winfried’s suggestion.

                               

                               

                               

                              Oh, and thanks for all the thousand and one other things you do for all of us in this community each and every day.

                               

                               

                               

                              Peace, love & brown rice,

                               

                              Morgan Jones

                               

                               

                               

                              FileMaker + Web:  Design, Develop & Deploy

                               

                              Certifications: FileMaker 9, 10 & 11

                               

                              <http://www.onepartharmony.com/> One Part Harmony 

                               

                              Austin, Texas • USA

                               

                              512-422-0611

                              • 12. Re: xslt multiple subsummary parts
                                Malcolm

                                I'm not doing this via the web.

                                 

                                It is an FMP export as XML with an XSL transform.

                                 

                                In this particular situation, we are creating a summary of telephone service usage for a large organisation as a cross tab report so that they can see month to month comparisions of their spending. We want to export this information for consumption by Excel in two ways, as raw data and as pretty data.

                                 

                                The sample subsummary xsl provided by Filemaker in the XML examples is my starting point. The bit that is too clever for me to understand is the way in which the file generates a group which is used to build a summary. We have multiple sub-summary parts, up to six, and I want to replicate that. The code below generates a group.

                                 

                                <!--

                                For every unique value in column one, create a new group

                                -->

                                                                                  <xsl:for-each select="fmp:RESULTSET/fmp:ROW[generate-id(.)=generate-id(key('groupKey', fmp:COL[1]/fmp:DATA)[1])]">

                                <!--

                                Sort the groups

                                -->

                                                                                            <xsl:sort select="fmp:COL[1]/fmp:DATA" data-type="text"/>

                                                                                            <xsl:variable name="currentGroup" select="key('groupKey', fmp:COL[1]/fmp:DATA)"/>

                                                                                            <xsl:for-each select="$currentGroup">

                                 

                                I can follow the logic, here, I wonder is it now a matter of nesting several of these select statements, each based on different column, and repeating the logical steps?

                                 

                                malcolm

                                • 13. Re: xslt multiple subsummary parts
                                  LyndsayHowarth

                                  Hi Malcolm,

                                   

                                  My answer is 'probably'... that's what I would try.

                                   

                                  The other option could be to use ODBC with Excel... but not too sure about the nested summaries.

                                   

                                  Good luck...

                                  • 14. Re: xslt multiple subsummary parts
                                    Malcolm

                                    Use ODBC to push summary data into an excel spreadsheet?

                                    1 2 Previous Next