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

Re: Processing 2 files and using one with key() lookup

Subject: Re: Processing 2 files and using one with key() lookups?
From: "David Carlisle d.p.carlisle@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Oct 2015 17:06:03 -0000
Re:  Processing 2 files and using one with key() lookup
On 27 October 2015 at 17:03, David Carlisle d.p.carlisle@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> On 27 October 2015 at 16:43, dvint@xxxxxxxxx
> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>> I've run into a couple of odd problems trying to use keys and I guess I
>> have never processed 2 files where one is there to just be used to lookup
>> values.
>>
>> First problem
>>
>> So one file is the one that drives the processing. I was using this as the
>> input to my stylesheet and using the document() function to read the

>> I couldn't find a way to make this work, so my workaround was to feed the
>> reference document to the stylesheet and then read in the driver file and
>> continue processing. Seems to work but lead to the next problem
>>
>> Second problem
>>
>> The key definition seems to get lost when I do the following:
>>
>>    <xsl:template match="/">
>>        <xsl:copy-of select="key('TOPIC', 'dan1370798005424')"/>
>>            <!-- Force processing to continue with the second file -->
>>         <xsl:apply-templates select="$FLATMAP" mode="map"/>
>>     </xsl:template>
>
> You need to specify the document at this point
>
> key('TOPIC',, 'dan1370798005424',$QAREPORT)"/>
>
> or in XSLT1
>
> $QAREPORT/key('TOPIC', 'dan1370798005424')
>

Sigh so long did I did xslt1

<xsl:for-each select="$QAREPORT">
<xsl:copy-of select="key('TOPIC', 'dan1370798005424')"/>
</xsl:for-each>

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.