You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lionel Crine <cr...@4dconcept.fr> on 2003/02/07 17:14:57 UTC

no source in the page after two transformation

I made a query in my XMLDB :

In the sitemap :

         <map:match pattern="query">
           <map:generate type="serverpages" src="demo/query.xsp"/>
           <map:transform type="DBQuery">
               <map:parameter name="url" value="blabla"/>
               <map:parameter name="domain" value="blabla"/>
               <map:parameter name="server" value="blabla"/>
               <map:parameter name="base" value="blabla"/>
               <map:parameter name="name" value="blabla"/>
               <map:parameter name="password" value="blabla"/>
           </map:transform>
           <map:transform type="xslt" src="demo/documents.xsl"/>
           <map:serialize type="html"/>
         </map:match>

the stylesheet :

<!-- Copy all and apply templates -->
<xsl:template match="@*|node()">
    <xsl:copy>
     <xsl:apply-templates select="@*|node()" />
    </xsl:copy>
   </xsl:template>

</xsl:stylesheet>

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsp="http://apache.org/xsp" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="ISO-8859-1"/>


<xsl:template match="page">
<html>
<body>
<table>
<xsl:apply-templates/>
</table>
</body>
</html>
</xsl:template>

<xsl:template match="name">
<tr>
<td>
<xsl:apply-templates/>
</td>
</tr>
<xsl:template>


<!-- Copy all and apply templates -->
<xsl:template match="@*|node()">
    <xsl:copy>
     <xsl:apply-templates select="@*|node()" />
    </xsl:copy>
   </xsl:template>

</xsl:stylesheet>
When i look the source of the documents in my browser i found :



<html xmlns:xsp="http://apache.org/xsp"> --> this line has no link with my 
question
<body>
<table>



</table>
</body>
</html>

MY QUESTION IS : Where are the elements in table ?
When I match name I have a nullpointerexception!!!
Why my elements disappear betwean the two transformer ?





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: no source in the page after two transformation

Posted by Lionel Crine <cr...@4dconcept.fr>.
OK!!
I was sure there was no error, now It's working..
Sorry for the question, I should have found this error myself.



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: no source in the page after two transformation

Posted by Brian Johnson <jo...@mailsnare.net>.
I meant to say the name template does not end with an end tag... 
<xsl:template> instead of </xsl:template>

On Friday, February 7, 2003, at 11:19  AM, Brian Johnson wrote:

> You have an error in your stylesheet. The name template does not end 
> with a name tag. Also, I believe you need the identity template at the 
> top, so it has the lowest priority.
> Brian
>
> On Friday, February 7, 2003, at 11:14  AM, Lionel Crine wrote:
>
>> I made a query in my XMLDB :
>>
>> In the sitemap :
>>
>>         <map:match pattern="query">
>>           <map:generate type="serverpages" src="demo/query.xsp"/>
>>           <map:transform type="DBQuery">
>>               <map:parameter name="url" value="blabla"/>
>>               <map:parameter name="domain" value="blabla"/>
>>               <map:parameter name="server" value="blabla"/>
>>               <map:parameter name="base" value="blabla"/>
>>               <map:parameter name="name" value="blabla"/>
>>               <map:parameter name="password" value="blabla"/>
>>           </map:transform>
>>           <map:transform type="xslt" src="demo/documents.xsl"/>
>>           <map:serialize type="html"/>
>>         </map:match>
>>
>> the stylesheet :
>>
>> <!-- Copy all and apply templates -->
>> <xsl:template match="@*|node()">
>>    <xsl:copy>
>>     <xsl:apply-templates select="@*|node()" />
>>    </xsl:copy>
>>   </xsl:template>
>>
>> </xsl:stylesheet>
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <xsl:stylesheet version="1.0" xmlns:xsp="http://apache.org/xsp" 
>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>> <xsl:output encoding="ISO-8859-1"/>
>>
>>
>> <xsl:template match="page">
>> <html>
>> <body>
>> <table>
>> <xsl:apply-templates/>
>> </table>
>> </body>
>> </html>
>> </xsl:template>
>>
>> <xsl:template match="name">
>> <tr>
>> <td>
>> <xsl:apply-templates/>
>> </td>
>> </tr>
>> <xsl:template>
>>
>>
>> <!-- Copy all and apply templates -->
>> <xsl:template match="@*|node()">
>>    <xsl:copy>
>>     <xsl:apply-templates select="@*|node()" />
>>    </xsl:copy>
>>   </xsl:template>
>>
>> </xsl:stylesheet>
>> When i look the source of the documents in my browser i found :
>>
>>
>>
>> <html xmlns:xsp="http://apache.org/xsp"> --> this line has no link 
>> with my question
>> <body>
>> <table>
>>
>>
>>
>> </table>
>> </body>
>> </html>
>>
>> MY QUESTION IS : Where are the elements in table ?
>> When I match name I have a nullpointerexception!!!
>> Why my elements disappear betwean the two transformer ?
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> Please check that your question  has not already been answered in the
>> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>>
>> To unsubscribe, e-mail:     <co...@xml.apache.org>
>> For additional commands, e-mail:   <co...@xml.apache.org>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: no source in the page after two transformation

Posted by Brian Johnson <jo...@mailsnare.net>.
You have an error in your stylesheet. The name template does not end 
with a name tag. Also, I believe you need the identity template at the 
top, so it has the lowest priority.
Brian

On Friday, February 7, 2003, at 11:14  AM, Lionel Crine wrote:

> I made a query in my XMLDB :
>
> In the sitemap :
>
>         <map:match pattern="query">
>           <map:generate type="serverpages" src="demo/query.xsp"/>
>           <map:transform type="DBQuery">
>               <map:parameter name="url" value="blabla"/>
>               <map:parameter name="domain" value="blabla"/>
>               <map:parameter name="server" value="blabla"/>
>               <map:parameter name="base" value="blabla"/>
>               <map:parameter name="name" value="blabla"/>
>               <map:parameter name="password" value="blabla"/>
>           </map:transform>
>           <map:transform type="xslt" src="demo/documents.xsl"/>
>           <map:serialize type="html"/>
>         </map:match>
>
> the stylesheet :
>
> <!-- Copy all and apply templates -->
> <xsl:template match="@*|node()">
>    <xsl:copy>
>     <xsl:apply-templates select="@*|node()" />
>    </xsl:copy>
>   </xsl:template>
>
> </xsl:stylesheet>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsl:stylesheet version="1.0" xmlns:xsp="http://apache.org/xsp" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output encoding="ISO-8859-1"/>
>
>
> <xsl:template match="page">
> <html>
> <body>
> <table>
> <xsl:apply-templates/>
> </table>
> </body>
> </html>
> </xsl:template>
>
> <xsl:template match="name">
> <tr>
> <td>
> <xsl:apply-templates/>
> </td>
> </tr>
> <xsl:template>
>
>
> <!-- Copy all and apply templates -->
> <xsl:template match="@*|node()">
>    <xsl:copy>
>     <xsl:apply-templates select="@*|node()" />
>    </xsl:copy>
>   </xsl:template>
>
> </xsl:stylesheet>
> When i look the source of the documents in my browser i found :
>
>
>
> <html xmlns:xsp="http://apache.org/xsp"> --> this line has no link 
> with my question
> <body>
> <table>
>
>
>
> </table>
> </body>
> </html>
>
> MY QUESTION IS : Where are the elements in table ?
> When I match name I have a nullpointerexception!!!
> Why my elements disappear betwean the two transformer ?
>
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>