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

RE: How to Get Nested Nodes

Subject: RE: How to Get Nested Nodes
From: Scott Trenda <Scott.Trenda@xxxxxxxx>
Date: Thu, 22 Dec 2011 08:42:57 -0500
RE:  How to Get Nested Nodes
Small comment...

    <xsl:template match="*">
         <xsl:apply-templates select="*"/>

This template is unnecessary as written, the built-in templates cover this exact behavior. The only benefit I'd see to it would be that you'd have a placeholder in case you want to add more functionality to the handling of each element later, but in that case I would just wait and add a new template at that point.

~ Scott

-----Original Message-----
From: Wolfgang Laun [mailto:wolfgang.laun@xxxxxxxxx] 
Sent: Thursday, December 22, 2011 3:23 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  How to Get Nested Nodes

See below

On 22 December 2011 09:29, Jeffry Proctor <jpgmt@xxxxxxxxxxxxx> wrote:
> List of Contacts from: feed/entry/content/Contacts
> Ultimately I would like to use a few XSLT's to extract different 
> datasets, my C# component, will just have a few functions, be somewhat 
> xml, xslt agnostic, getting the function's corresponding XSLT from an 
> xml (think ini file) to transfrom and return the datasets from the 
> resulting xml; I'm choosing this over a static looping/switch/case 
> node= xpath walking, if anything changes I'd have to re-code, I'd 
> rather just update the offending xslt(s) and push that out to the client, no install or dll issues, but I digress...


> I'm trying to get a list of contacts from the following xml source

    <xsl:template match="/">
        <ContactList xmlns="http://www.w3.org/2005/Atom" >
                <xsl:apply-templates select="/*"/>

    <xsl:template match="*">
         <xsl:apply-templates select="*"/>

    <xsl:template match="jp:Contact">
                    <xsl:value-of select="@id"/>
                    <xsl:value-of select="jp:name"/>
                    <xsl:value-of select="jp:emailAddress"/>
                    <xsl:value-of select="jp:status"/>


Current Thread


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.
First Name
Last Name
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.