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

Encompassing Element extraction

Subject: Encompassing Element extraction
From: <mhbush@xxxxxxxxxxx>
Date: Mon, 16 Oct 2006 10:53:42 -0500 (CDT)
element extraction
sent to xsl-list@xxxxxxxxxxxxxxxxxxxxxx

Looking to create a particularly encompassing Element extraction using keys in XSL.

Version:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

Example XML:
<a1>
   <b1>
      <c1/>
      <c2/>
   </b1>
   <b1>
      <c1/>
      <c3/>
   </b1>
   <b2>
      <c2/>
      <c3/>
   </b2>
   <b3>
      <c1/>
      <c4/>
   </b3>
</a1>
<a1>
   <b2/>
   <b3/>
</a1>


I want the following output (with a count in parens):
(2) a1
(2) a1/b1
(2) a1/b1/c1
(1) a1/b1/c2
(1) a1/b1/c3
(2) a1/b2
(1) a1/b2/c2
(1) a1/b2/c3
(1) a1/b3
(1) a1/b3/c3
(1) a1/b3/c4


Things to notice:
 - all nodes can be repeated
 - any name for any node (dont rely on a1,b1,c1 etc.)
 - unique key for each type of node (based on depth)
 - two different nodes with the same name are joined
    (a1/b1 + a1/b2 are both included in a1)
 - potentially very large xml files to be parsed, should go line by line through the source files and create one list of keys. Follow guidelines written by Muenchian Method, found at http://www.jenitennison.com/xslt/grouping/muenchian.html

Any insight you are able to provide would be most useful.
thanks,
-m

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.