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

Re: nesting flat XML based on attribute value.

Subject: Re: nesting flat XML based on attribute value.
From: David Holden <dh@xxxxxxxx>
Date: Wed, 14 Dec 2005 13:16:35 +0000
david holden
On Wednesday 14 Dec 2005 11:41, Ragulf Pickaxe wrote:
thanks Ragulf,

Yes Michael also pointed this out. I've posted the working style sheet.

Many thanks for replying.

Dave.


> Hi Dave,
>
> > it needs to some how remember what it has already grouped (sorry for the
> > procedural thinking here.)
> >
> > This isn't too much of a problem in this case because I can remove those
> > extra sec tags with a second script based on depth.
>
> How do you apply the sec template in the first occurrence?
>
> <xsl:template match="ch">
> ..
> <xsl:apply-templates select="sec"/>  <- This will select too much
>
> You need to find out which elements are the top level ones, for
> example this way (where string-length(@id) is known):
> <xsl:apply-templates select="sec[string-length(@id)=8]"/>
> ..
>
> This is an example. You might want to use modes, as another approach.
>
> Regards,
> Ragulf Pickaxe :-)

-- 
Dr. David Holden.
Please avoid sending me Word or PowerPoint attachments, thanks.
See: <http://www.gnu.org/philosophy/no-word-attachments.html>
Public GPG key available on request.
-------------------------------------------------------------

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.