xsl-list
[Top] [All Lists]

[xsl] Re: again lookup table - SOLUTION

2006-05-18 01:28:32
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. 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • [xsl] Re: again lookup table - SOLUTION, Alexander . RACHER <=