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

Re: again lookup table - SOLUTION

Subject: Re: again lookup table - SOLUTION
From: Alexander.RACHER@xxxxxxxx
Date: Thu, 18 May 2006 10:28:13 +0200
table solution
hi, this is the solution to my lookup table problem (maybe someone's
interested):

this call is done within a table cell:
<xsl:call-template name="loco">
  <xsl:with-param name="curr-loco" select="./positionsDaten/positLoco"/>
</xsl:call-template>

this is the template defnition with the xpath-expression that nearly made
me go crazy (although it looks simple. now.):
<xsl:template name="loco">
 <xsl:param name="curr-loco"></xsl:param>
 <xsl:value-of select="
document('SVZ_1001.xml')//codes/element[code=$curr-loco]/codeText"/>
</xsl:template>

thx for your contributions
cheers
alex
----- Forwarded by Alexander RACHER/SDS-WIEN/AT on 18.05.2006 10:18 -----

Alexander RACHER/SDS-WIEN/AT wrote on 16.05.2006 17:39:43:

> hi,
> i'm using xslt 1.0 with apache fop 0.92.
> i'm new to xslt / xsl-fo and until now everthing worked quite well,
> but this lookup table makes me desperate...
>
> here the xml-source dakl.xml:
>
>  <?xml version="1.0" encoding="ISO-8859-1"?>
>  <seife>
>   <at.sds.xc.reportService.ReportDaten>
>   </at.sds.xc.reportService.ReportDaten>
>   <at.sds.xc.positionsreports.DaklOutput>
>     [...]
>     <einzelPositionList arraySize="10">
>   <element>
>   <positionsDaten>
>    <positSaldoGilt>19998</positSaldoGilt>
>    <positVerwahrart>WR</positVerwahrart>
>    <positLoco>DE</positLoco>
>    <positTyp>UPOS</positTyp>
>    [...]
>    </positionsDaten>
>    <fiBezeichnungList arraySize="1">
>    [...]
>    </fiBezeichnungList>
>   </element>
> [9 similar elements following]
>
> here the lookup xml SVZ_1001.xml:
>
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> - <getTables>
> - <at.sds.xc.coreService.CodeTableList arraySize="1">
> - <element>
>   <codeTableNo>1001</codeTableNo>
>   <codeTableType>ALLG</codeTableType>
>   <codeTableName>code-table-name</codeTableName>
> - <codes arraySize="97">
> - <element>
>   <code>0000</code>
>   <hcode />
>   <sysstatus>0</sysstatus>
>   <codeText>Wien</codeText>
>   </element>
> - <element>
>   <code>DE</code>
>   <hcode />
>   <sysstatus>0</sysstatus>
>   <codeText>Deutschland</codeText>
>   </element>
> [96 similar elements following]
>



______________________________________________________________________
Der Austausch von Nachrichten mit Software Daten Service via E-Mail dient
ausschliesslich Informationszwecken. Rechtsgeschaeftliche Erklaerungen duerfen
ueber dieses Medium nicht ausgetauscht werden.

Correspondence with Software Daten Service via e-mail is only for information
purposes. This medium is not to be used for the exchange of legally-binding
communications.

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.