Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2005, 04:27 PM
Registered User
 
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Grouping Records

Hello All -

I have been reading the posts here, along with various books and articles, but have not found a solution to this problem. I have an XML data file created as the results log of a conversion utility. The XML appears to me to be poorly structured, as shown in this example:


    <logMsg msgID="TRANSFORMINGREPORT" comp="S7" severity="info" sect="msg">
        <time>2005-09-20 15:31:38</time>
        <param name="INDEXPOSITION">30</param>
        <param name="INDEXTOTAL">235</param>
        <param name="REPORTNAME">Inventory Report 1</param>
        <text>Transforming report 30 of 235: Inventory Report 1</text>
    </logMsg>
    <logMsg comp="S7" sect="msg" msgID="STANDALONETEXTFRAME" severity="warning">
        <param name="FRAMEIDENT" index="1">Team Name</param>
        <param name="BLOCKID" index="2">_451</param>
        <text>Warning! The following text frame was migrated as a block element: Team Name. The block element ID is: _451. You may not get data rendered inside this object.</text>
    </logMsg>
    <logMsg comp="S7" sect="msg" msgID="STANDALONETEXTFRAME" severity="warning">
        <param name="FRAMEIDENT" index="1">Counts of appID</param>
        <param name="BLOCKID" index="2">_471</param>
        <text>Warning! The following text frame was migrated as a block element: Counts of appID. The block element ID is: _471. You may not get data rendered inside this object.</text>
    </logMsg>

    <logMsg msgID="TRANSFORMINGREPORT" comp="S7" severity="info" sect="msg">
        <time>2005-09-20 15:31:40</time>
        <param name="INDEXPOSITION">31</param>
        <param name="INDEXTOTAL">235</param>
        <param name="REPORTNAME">Inventory Report 2</param>
        <text>Transforming report 31 of 235: Inventory Report 2</text>
    </logMsg>
    <logMsg comp="S7" sect="msg" msgID="STANDALONETEXTFRAME" severity="warning">
        <param name="FRAMEIDENT" index="1">Team Name</param>
        <param name="BLOCKID" index="2">_306</param>
        <text>Warning! The following text frame was migrated as a block element: Team Name. The block element ID is: _306. You may not get data rendered inside this object.</text>
    </logMsg>
    <logMsg comp="S7" sect="msg" msgID="STANDALONETEXTFRAME" severity="warning">
        <param name="FRAMEIDENT" index="1">Counts of appID</param>
        <param name="BLOCKID" index="2">_290</param>
        <text>Warning! The following text frame was migrated as a block element: Counts of appID. The block element ID is: _290. You may not get data rendered inside this object.</text>
    </logMsg>

Every "record" written to the log file is tagged as a 'logMsg', and as you can see the 'msgID' really indicates what the relations are among the repeated sub-records showing each error found in the conversion. I need to format this into something human-readable showing a report and all errors found in that report, and then the next report and all it's errors, etc. I'm finding it hard to code an XSLT that needs to test attribute values and loop through these sub-records.

Any suggestions would be greatly appreciated.

Regards,
Opher
 
Old September 28th, 2005, 10:39 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I don't understand quite what you want, can you show an example of the output needed?

If it's jus grouping all the logMsg elements with the same msgID then search for "Muenchian grouping XSLT" on google or see here:

http://www.jenitennison.com/xslt/gro...muenchian.html

--

Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in updating records & finding records naveed77 VB Databases Basics 1 January 16th, 2007 12:12 PM
problem in updating records & finding records naveed77 VB How-To 1 January 16th, 2007 12:10 PM
Protect cells and allow grouping/un-grouping sfreuden Excel VBA 4 December 14th, 2006 08:01 AM
Grouping Indexes ShaileshShinde XSLT 3 November 30th, 2005 05:46 AM
Grouping and Counting records Con Access VBA 1 September 17th, 2003 11:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.