I have tried to configure an XSL portlet for an XML source whose elements
belong to a namespace.
The transformation does not work (it returns an unformatted sequence of
values from the source XML file).
The same transformation and source file work fine when I use xalan from the
command line.
The same portlet also works fine if I remove the namespace from the source
XML file and modify the XSL accordingly.
Can anybody help?
The XML and XSL files follow.
Thank you
Cristina
============================================================================
=
<?xml version="1.0" encoding="UTF-8"?>
<ns:searchResult xmlns:ns="http://outerx.org/daisy/1.0";>
<ns:titles>
<ns:title name="id">ID</ns:title>
<ns:title name="name">Name</ns:title>
</ns:titles>
<ns:rows>
<ns:row id="1"><ns:value>1</ns:value>
<ns:value>Navigation for daisysite</ns:value>
</ns:row>
<ns:row id="2">
<ns:value>2</ns:value>
<ns:value>daisysite home</ns:value>
</ns:row>
<ns:row id="3">
<ns:value>3</ns:value>
<ns:value>Cris Document</ns:value>
</ns:row>
<ns:row id="4">
<ns:value>4</ns:value>
<ns:value>Secondo Documento</ns:value>
</ns:row>
<ns:row id="5">
<ns:value>5</ns:value>
<ns:value>Modulo Deduzioni</ns:value>
</ns:row>
</ns:rows>
<ns:executionInfo>
<ns:query>select id,name where true</ns:query>
<ns:locale>en</ns:locale>
<ns:parseAndPrepareTime>150</ns:parseAndPrepareTime>
<ns:rdbmsQueryTime>150</ns:rdbmsQueryTime>
<ns:aclFilterTime>541</ns:aclFilterTime>
<ns:outputGenerationTime>1413</ns:outputGenerationTime>
</ns:executionInfo>
</ns:searchResult>
============================================================================
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
        xmlns:ns="http://outerx.org/daisy/1.0";>
        <xsl:template match="ns:searchResult">
             <table border="1">
        <xsl:for-each select="ns:titles">
                <tr>
                <th>
                    <xsl:value-of select="ns:title[1]"/>
                </th>
                <th>
                    <xsl:value-of select="ns:title[2]"/>
                </th>
                </tr>
        </xsl:for-each>
        <xsl:for-each select="ns:rows">
            <xsl:for-each select="ns:row">
                <tr>
                <td>
                    <xsl:value-of select="ns:value[1]"/>
                </td>
                <td>
                    <xsl:value-of select="ns:value[2]"/>
                </td>
                </tr>
            </xsl:for-each>
            </xsl:for-each>
                 </table>
        </xsl:template>
</xsl:stylesheet>

-----------------------------------------------
Cristina Lissoni
[EMAIL PROTECTED] Technologies & Solutions S.p.A.
Via Esterle 9 - 20132 Milano
Tel.: 02 28014 1
Fax: 02 2610853
Cell.: 335 1023035
e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to