Hi, All:
I have a problem related to cross referencing.
I have two groups of <row> elements in which the first
group are questionnaires and second group are
questions within the questionnaires (defined in the
first group). The first <cell> element of the
question group cross references to the second <cell>
element of the questionnaire group. For example, the
below XML, row 28 and 29 cell 1 "References" cross
references to row 16 cell 2.
<row row="16">
<cell column="1">References Name</cell>
<cell column="2">References</cell>
<cell column="3">References Description</cell>
</row>
...<rows in between skipped for brevity>...
<row row="28">
<cell column="1">References</cell>
<cell column="2">text of Question 8<cell>
</row>
<row row="29">
<cell column="1">References</cell>
<cell column="2">text of Question 9</cell>
</row>
Relationship of questionnaire to question is one to
many, so each questionnaire should appear only once in
the 1st group; but in the 2nd group, multiple
questions could refer to the same questionnaire.
The way I currently handles it is create a xsl:key
matching rows in the 2nd group (questions) using the
1st cell. When I process the 1st group of rows
(questionnaires), I call key() function by passing in
the value in the 2nd cell. The problem with this
approach is that it ignores question with a
questionnaire not defined in the 1st group. Is there
an elegant way to address this problem?
Much thanks,
Xiaocun Xu
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list