xsl-list
[Top] [All Lists]

[xsl] Applying Attributes with Grouping Method

2007-03-21 05:12:07
Hello,

I'm having a problem with grouping using attributes and I'm tired of
banging my head against the wall.  I'm using Saxon V8.5.

I've found part of my answer to my original grouping question in the FAQ
section and got that to work, however, I'm still not getting my desired
output.

My desired output is this:

<report>
        <item part="W1123" quantity="3" val="Part_A" name="P21,P22,P23"
/>
        <item part="W1144" quantity="1" val="Part_B" name="J31" />
        <item part="W1145" quantity="1" val="Part_C" name="J32" />
</report>

My original question was with grouping, specifically with the name
attribute, and I think I kind of understand grouping now, thanks to the
link on "Grouping Using the Muenchian Method". 

My problem is bringing the name attribute into my existing
reportdetails.   Currently I'm generating this:

<report>
        <item part="W1123" quantity="3" val="Part_A" />
        <item part="W1144" quantity="1" val="Part_B" />
        <item part="W1145" quantity="1" val="Part_C" />
</report>

Now, I can get the name attributes grouped using the Muenchian Method in
a separate XSL style sheet.

My problem is when I start applying attributes.  Obviously the attribute
value is not behaving like I thought it would.

Could someone provide insight on how to tackle this problem?

Here is a small sample of the xml data:

<connection>
        <conn name="P21" part="W1123">
                <property name="s_des" val="Part_A"/>
        </conn>
        <conn name="P22" part="W1123"/>
                <property name="s_des" val="Part_A"/>
        </conn>
        <conn name="P23" part="W1123"/>
                <property name="s_des" val="Part_A"/>
        </conn>
        <conn name="J31" part="W1144"/>
                <property name="s_des" val="Part_B"/>
        </conn>
        <conn name="J32" part="W1145"/>
                <property name="s_des" val="Part_C"/>
        </conn>
</connection>

Thank you,

Karl

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>