Problem with the transformation

i’ve installed the Passthru Servlet. All tests are OK, but the presentation does not work. Is something wrong with my Stylesheet? I see only the emty table in the HMTL-File with this url:

http://localhost/examples/servlet/transform/tamino/Computer/Laden?_xql=/PRODUKT&_xslsrc=http://localhost/produkt-tabellarisch.xsl


Here’s the xsl-File:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version=“1.0” xmlns:xsl=“XSLT Namespace” xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” xmlns:xql=“XQL FAQ (XML Query Language - Frequently Asked Questions)”>

<xsl:template match=“/”>
<xsl:apply-templates select=“ino:response/xql:result”/>
</xsl:template>

<xsl:template match=“/”>


Tabellarische Ansicht von <xsl:value-of select=“PRODUKT/BEZ” />



Tabellarische Ansicht:

<xsl:value-of select=“PRODUKT/BEZ” />

























<xsl:if test=“PRODUKT/GEWICHT”>




</xsl:if>
<xsl:if test=“PRODUKT/BILD”>




</xsl:if>
Bezeichnung <xsl:value-of select=“PRODUKT/BEZ” />
Komponenten <xsl:apply-templates select=“PRODUKT/BESCHREIBUNG/PART”/>
Hoehe <xsl:value-of select=“PRODUKT/ABMESSUNGEN/H” /><xsl:value-of select=“PRODUKT/ABMESSUNGEN/@einheit” />
Breite <xsl:value-of select=“PRODUKT/ABMESSUNGEN/B” /><xsl:value-of select=“PRODUKT/ABMESSUNGEN/@einheit” />
Laenge <xsl:value-of select=“PRODUKT/ABMESSUNGEN/L” /><xsl:value-of select=“PRODUKT/ABMESSUNGEN/@einheit” />
Gewicht <xsl:value-of select=“PRODUKT/GEWICHT”/><xsl:value-of select=“PRODUKT/GEWICHT/@einheit” />
Ansicht <xsl:attribute name=“src”><xsl:value-of select=“PRODUKT/BILD/@file”/></xsl:attribute>



</xsl:template>
<xsl:template match=“PART”>
<xsl:attribute name=“href”><xsl:value-of select=“@idref”/>.htm</xsl:attribute><xsl:value-of select=“.” />


</xsl:template>
</xsl:stylesheet>


And with this url I get the correct xml-File:

http://localhost/examples/servlet/transform/tamino/Computer/Laden?_xql=/PRODUKT


Thank you for your help.

The first obvious thing is that you have two template rules for match=“/” - the processor will probably give you a warning for this, and then use the second one.

The next obvious thing is that in the second template rule for match =“/” you are using relative path expressions like PRODUKT/GEWICHT, but I suspect that the PRODUKT element is wrapped in a Tamino result wrapper.

It would probably be a good idea to develop and test your stylesheet outside the Passthru environment before you try and integrate it with Tamino.

Michael Kay

Thank you for the answer. I have checked the stylesheet outside Tamino, but I have forgotten, that the result of a query have a diffrend structure. I have solved the prob now.