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

Howto follow embedded Xpaths in XSL

Subject: Howto follow embedded Xpaths in XSL
From: Daniel Laird <danieljlaird@xxxxxxxxxxx>
Date: Thu, 12 Aug 2010 10:20:48 +0000
 Howto follow embedded Xpaths in XSL
Hi

I am new to XSL and relatively new to XML as well.
I have
some XML that as an attribute has a value that is an xpath to another
location within the same document - however it is not a child etc.
Is there any way for XSL to get the value of this node and then get the value
of nodes at this location?

<root>
    <component displayName="Component 1">
        <stream displayName="Elementary Stream"
reference="/root[1]/anotherElement[1]">
            <node value="bob">
        </stream>
    </component>
    <anotherElement>
        <magicNumber value="27"/>
    </anotherElement>
</root>

So in the above example, I want to do an XSL function that
1. finds all components
2. For each component get the value of <magicNumber> that is linked from the
reference attribute of my component node.

In
 this example it does not look very helpful but my real data is massive
and this would stop lots of repeated nodes and data etc (effectively
symlinks within the document)

Hope this is clear and you can help
Dan

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.