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

RE: Generic stylesheet to flatten XML hierarchy

Subject: RE: Generic stylesheet to flatten XML hierarchy
From: Sara Mitchell <samitchell6@xxxxxxxxx>
Date: Fri, 4 Dec 2009 11:27:52 -0800 (PST)
RE:  Generic stylesheet to flatten XML hierarchy
Ok. I don't really have real samples as this is meant to be generic but I do
have a handle on the potential structures that need to be flattened. 
So for
example, RSS which looks like this: 

/rss (some attributes)
  /channel (some
attributes)
    /title
    /link
    /...more siblings that are not repeating
/item (repeat starts)
      /title
      /description (w/mixed content)
/pubdate
      /link
      /...more children some have descendants but no more
repeats
   /item ...
   ...

If this gets converted to XML it should look on
output like this: 
<root>
<row>
<rss-attr1>value</rss-attr1>

--- On Thu,
12/3/09, Michael Kay <mike@xxxxxxxxxxxx> wrote:

> From: Michael Kay
<mike@xxxxxxxxxxxx>
> Subject: RE:  Generic stylesheet to flatten XML
hierarchy
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Date: Thursday, December 3,
2009, 3:54 PM
> > I've been wandering through the
> archives and other
searches 
> > and so far have not found exactly what I am hoping to
> find. I
> > need to write an XSLT stylesheet that accepts an
> unknown XML 
> >
document and flattens the hierarchy to a
> two-dimensional 
> > row/columns
structure. 
> > 
> 
> The hard part of the problem is specifying what you want
to
> happen. Once
> you've done that, I would think that coding it is fairly
>
easy.
> 
> Regards,
> 
> Michael Kay
> http://www.saxonica.com/
>
http://twitter.com/michaelhkay 
> 
> 
> 
>
--~------------------------------------------------------------------
>
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@xxxxxxxxxxxxxxxxxxxxxx>
> --~--

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.