Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > how to look up the result-tree of an XSL-transformation?

Reply
Thread Tools

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

 
 
Johannes Busse
Guest
Posts: n/a
 
      07-01-2003
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>
<xsltherwise>
<!-- allocate the author -->
</xsltherwise>
</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 Gre
Johannes Busse
 
Reply With Quote
 
 
 
 
Dimitre Novatchev
Guest
Posts: n/a
 
      07-01-2003
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



"Johannes Busse" <(E-Mail Removed)-heidelberg.de> wrote in message
news:(E-Mail Removed)-heidelberg.de...
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>
<xsltherwise>
<!-- allocate the author -->
</xsltherwise>
</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 Gre
Johannes Busse


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use a look-ahead and a look-behind at the same time? dan.j.weber@gmail.com Perl Misc 4 04-09-2008 10:25 PM
HEXUS.review - Scan Cool Chameleon - A First Look Silverstrand Front Page News 0 07-01-2005 07:15 PM
Why do look-ahead and look-behind have to be fixed-width patterns? inhahe Python 3 01-28-2005 12:50 PM
<tr> with a 1x1 image as a filler on a table with padding of 2 look thicker in netscape but they look ok in IE. Serial # 19781010 HTML 1 08-10-2003 09:05 PM



Advertisments