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

RE: Can I generate position() values for nodes I refe

Subject: RE: Can I generate position() values for nodes I reference by key()?
From: "mwebster" <mwebster@xxxxxxxxxxxxxxx>
Date: Wed, 23 Mar 2005 11:28:55 -0800
oligolist
I have an XML document with three basic parts.

Part one lists all my available probes and their related information.  Each
probe has a unique ID as an attribute:

       <probe uid="i_QC.20.5prime_factory" name="QC 5prime">

Part two describes where these various probes get positioned on a grid:

       <probeAssignment electrodeIndex="1"
assignedProbe="i_QC.20.5prime_factory"/>

Part three lists data for all the possible locations on the grid:

       <stats index="12543" elementName="e12543">

My task is to change this XML into a spreadsheet with one line for each grid
location with information about the stats and what probe they relate to.


I was doing this by using a for-each to go through the whole probeAssignment
section until it found a probeAssigment/@electrodeIndex that matched the
current stats/@index.  Then I used probeAssignment/@assignedProbe in a
similar manner to find the proper probe/@name and various other bits of
probe information.


As you can imagine, this was very time consuming, so I switched to using the
key() function and got wonderful improvements in speed.  However, the one
thing the for-each business did get me was the position of each particular
<probe> in the list of probes, which is a piece of information I am asked to
display but that does not appear anywhere in the XML. 


So I have these lines:

 
    <xsl:key name="electrodeIndexKey"
match="/pd:chipDesign/pd:layout/pd:microarray/pd:probeAssignment"
use="@electrodeIndex"/>

    <xsl:key name="uidKey" match="/pd:chipDesign/pd:oligoList/pd:probe"
use="@uid"/>

 
And was hoping I could do something like this:

 
    <xsl:key name="positionKey" match="/pd:chipDesign/pd:oligoList/pd:probe"
use="position()"/>


Does anyone have a suggestion on who I could so something like this?


Michael Webster
CombiMatrix Corporation
Software Department
(425) 493-2266

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.