OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [XSLT] Determining the entry column

Hello Everyone,

I am investigating possibilities of the DB tables export into the given
proprietary format. Now I am stuck with the demand to specify the location
for every table entry in the form column:row.

My test data follows:

   <table frame="none">
        <tgroup cols="3">
          <colspec colname="c1" colnum="1"/>
          <colspec colname="c2" colnum="2"/>
          <colspec colname="c3" colnum="3"/>
              <entry morerows="1">2:0</entry>
              <entry namest="c1" nameend="c2">0:1</entry>

This location should match the info in the content of every entry. While the
row number is quite easy to get, retrieving the column number has turned out
to be quite tricky.

I am using the following code with some external calls

<xsl:template match="entry">
  <xsl:variable name="location">
    <!-- column number -->
    <xsl:call-template name="entry.colnum"/>
    <!-- row number -->
    <xsl:value-of select="count(../preceding-sibling::row)"/>

The problem is, that entry.colnum template returns the correct values only
when there are sufficient data in the original table (namest and colname
With morerows (aka rowspan) it is quite tricky to calculate the given column
number and that task seems to be too complex. Isn't there any overlooked
template in the DB distribution which can handle this and to return the
correct number? ;-)

Is there better place where to discuss these low-level things?

Thanks in advance for any hints.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]