Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Cannot enter data into Dynamic Table cells

From: Klaas_Bals@----------------------
To:
Date: 7/1/2004 7:44:00 PM
> I have looked through numerous mailing lists and forums but i am unable
to
> find the solution i require, so hopefully there is someone who could
help.
>
> I am creating reports in HTML and RTF format from a flat file. This has
been
> easily done, but I am also required to create a title page that lists
unique
> references. I am able to get the unique references, but when i try to
write
> them in my table, the incorrect field values are entered.

You might want to take a look at our product, called Scriptura XBOS. (The
XSL Business Output Solution). It uses XSLT and XSL-FO technologies to
generate output. Is supports XML, database and **flat text files** as
input. It can generate **HTML**, PDF, **RTF**, PCL, AFP, XSLT and XSL-FO as
output.

It you take a look at
http://www.inventivedesigners.com/scriptura/action.html and choose the 'A
text or spooled file as data source' demo. If you are interested, you can
request a free trial.

Best regards,
-----
Klaas Bals  -  CTO
Inventive Designers
Direct Phone: +32 - 3 - 8210183
Office Phone: +32 - 3 - 8210170
Office Fax: +32 - 3 - 8210171
Email: Klaas_Bals at inventivedesigners dot com






"Colin Mathieson" <colinmathieson@xxxxxxxxxxx> wrote on 07/01/2004 02:19:01
PM:

>
> I am using an xml file to map the different elements required as follows:
>
> <mappings root="RegistrationList" child="Registration" delimiter="">
>    <mapping pos="0" length="4" name="title" type="Element" />
>    <mapping pos="1" length="10" name="surname" type="Element" />
>    <mapping pos="2" length="10" name="extsurname" type="Element" />
>    <mapping pos="3" length="15" name="forename" type="Element" />
>    <mapping pos="4" length="1" name="initial" type="Element" />
>                 <mapping pos="5" length="5" name="ref" type="Element" />
>                 <mapping pos="6" length="1" name="selind" type="Element"
/>
>    <mapping pos="7" length="1" name="deadind" type="Element" />
>    <mapping pos="8" length="1" name="tranind" type="Element" />
>                 <mapping pos="9" length="1" name="depind" type="Element"
/>
> </mappings>
>
>
> I am using the following code to get the unique references and trying to
> write them to a dynamic table. Instead of the references being entered,
it
> writes the fields after i.e. values of selind,deadind,tranind,depind.
>
> It does however put the correct amount of rows, and the correct reference

> value in the first cell of each row.
>
> <xsl:key name="ref-key" match="ref" use="." />
> <xsl:template match="/">
> <xsl:variable name="unique-ref"
> select="/RegistrationList/Registration/ref[generate-id() =
> generate-id(key('ref-key', .))]" />
> <table align="center" cellspacing="5" cellpadding="5">
>    <xsl:for-each select="$unique-ref[position() mod 5 = 1]">
>       <tr>
>          <td>
>             <xsl:value-of select="current()" />
>          </td>
>          <xsl:for-each select="current()[position()]/following::
> *[position() &lt;
> 5]">
>             <td>
>                <xsl:value-of select="current()" />
>             </td>
>          </xsl:for-each>
>       </tr>
>    </xsl:for-each>
> </table>
> </xsl:template>
>
>
> the problem seems to be the line :
>
> <xsl:for-each select="current()[position()]/following::*[position() &lt;
> 5]">
>
> I have also used
>
> <xsl:for-each
> select="current()[position()]/following::$unique-ref[position() &lt; 5]">
>
> but it only produces a blank page.
>
> Please someone help as this has been driving me crazy, and there is
probably
> a simple solution.
>
> Thanks in advance
>
> Colin
>
> _________________________________________________________________
> Express yourself with cool new emoticons
http://www.msn.co.uk/specials/myemo
>
>
> --+------------------------------------------------------------------
> 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@xxxxxxxxxxxxxxxxxxxxxx>
> --+--
>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent