[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT, XML and Identity transform

Subject: Re: XSLT, XML and Identity transform
From: "Michael PG" <xrow@xxxxxxx>
Date: Mon, 27 Sep 2004 17:43:00 +0000
xslt identity michael kay
Thank you Anton,

Yes, the Muenchian may be the solution.

Could you provide me with an example according to my XML structure, since the example implementations on the provided link are not taking in concern attibute name content.

Regards,

-M

From: Anton Triest <anton@xxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  XSLT, XML and Identity transform
Date: Mon, 27 Sep 2004 18:49:54 +0200

Hi Michael,

You want to group your Article elements by their info attribute:
see http://www.jenitennison.com/xslt/grouping/muenchian.html

HTH,
Anton


Michael PG wrote:


Hello,

I am trying to solve following problem:

Today I use identity transform. to filter elements from my original XML file and create XML output file.
I have created two XSLTs (base.xslt and filter.xslt), where base.xslt does the identity transformation and filter.xslt defines filtering rules and templates.


What I basically want is to filter elements of type "sub" and sort them under one parent node and make selections of type "main" and sort them under another parent node. One parent node for each category. (see in Filtered XML how output shoul look like).

My input XML looks like:

[Original XML]

<Documents>
   <Document chapter="1" title="title 1" href="file1.xml">
         <Article title="1.1" info="sub"/>
         <Article title="1.2" info="main"/>
    </Document>
   <Document chapter="2" title="title 2" href="file2.xml">
         <Article title="2.1" info="sub"/>
         <Article title="2.2" info="main"/>
    </Document>
</Documents>

[Filtered XML SHOULD LOOK LIKE]

<Documents>
   <Document name="main">
         <Article title="1.2" info="main"/>
         <Article title="2.2" info="main"/>
    </Document>
   <Document name="sub">
         <Article title="1.1" info="sub"/>
         <Article title="2.1" info="sub"/>
    </Document>
</Documents>

[snip]


_________________________________________________________________
Get ready for school! Find articles, homework help and more in the Back to School Guide! http://special.msn.com/network/04backtoschool.armx


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.