how to look up the result-tree of an XSL-transformation?

J

Johannes Busse

Hello NG,

a short question: is it possible to look up the result-tree of an
XSL-transformation also?

We have the problem to process a literature-database:
- write out an entry for each book (trivial)
- write out an entry for each author of the book (trivial)
*if and only if this author was not allocated yet*.

We have solved this problem yet like this:

<xsl:template match="author">
<xsl:choose>
<xsl:when test=" preceding-sibling::BookEntry/author = .">
<!-- we have had processed this author yet;
nothing to do -->
</xsl:when>
<xsl:eek:therwise>
<!-- allocate the author -->
</xsl:eek:therwise>
</xsl:choose>
</xsl:template>

That' fine, it works. But in other cases it would be much more easy to
look up the result-tree. Is it possible?

Thank you!



herzliche Grüße
Johannes Busse
 
D

Dimitre Novatchev

This is a grouping problem -- you can use for example the Muenchian method
for grouping.


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL



Hello NG,

a short question: is it possible to look up the result-tree of an
XSL-transformation also?

We have the problem to process a literature-database:
- write out an entry for each book (trivial)
- write out an entry for each author of the book (trivial)
*if and only if this author was not allocated yet*.

We have solved this problem yet like this:

<xsl:template match="author">
<xsl:choose>
<xsl:when test=" preceding-sibling::BookEntry/author = .">
<!-- we have had processed this author yet;
nothing to do -->
</xsl:when>
<xsl:eek:therwise>
<!-- allocate the author -->
</xsl:eek:therwise>
</xsl:choose>
</xsl:template>

That' fine, it works. But in other cases it would be much more easy to
look up the result-tree. Is it possible?

Thank you!



herzliche Grüße
Johannes Busse
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top