You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ma...@swisscom.com on 2003/06/13 16:01:55 UTC

Sitemap parameters

That works :

<map:parameter name="rootdn" value="{request-param:name}"/>
and the value entered (for "name" is "CORPROOT\TFRGHM00")

but that don't :

<map:parameter name="rootdn" value="CORPROOT\{request-param:name}"/>
and the value entered (for "name" is "TFRGHM00")

Why?

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: strange transform behavior

Posted by Markus Blasl <bl...@fzi.de>.
David LAGARDERE wrote:

>Yes, this is because you haven't declared the prefix
>in your "stylesheet" tag (I advise to write it here so
>that it can be recognized anywhere in your XSL).
>Rewrite your "xsl:stylesheet" opening tag like this :
>
><xsl:stylesheet version="1.0"
>xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>xmlns:sql="http://apache.org/cocoon/SQL/2.0">
>
Wow, great thanks!!!
THAT'S IT ;-)
Thank you very much!


cheers,
Markus



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: strange transform behavior

Posted by David LAGARDERE <dl...@yahoo.fr>.
Yes, this is because you haven't declared the prefix
in your "stylesheet" tag (I advise to write it here so
that it can be recognized anywhere in your XSL).
Rewrite your "xsl:stylesheet" opening tag like this :

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sql="http://apache.org/cocoon/SQL/2.0">

 --- Markus Blasl <bl...@fzi.de> a écrit : > David
LAGARDERE wrote:
> 
> >Try :
> ><xsl:template match="sql:rowset">
> > <table>
> > <tbody>
> >   <xsl:apply-templates />
> > </tbody>
> > </table>
> ></xsl:template>
> >
> ><xsl:template match="sql:row">
> > <tr>
> >   <xsl:apply-templates />
> > </tr>
> ></xsl:template>
> >
> 
> Then I get an error and it says something like,
> Prefix needs to get solved in namespace.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
>  

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: strange transform behavior

Posted by Markus Blasl <bl...@fzi.de>.
David LAGARDERE wrote:

>Try :
><xsl:template match="sql:rowset">
> <table>
> <tbody>
>   <xsl:apply-templates />
> </tbody>
> </table>
></xsl:template>
>
><xsl:template match="sql:row">
> <tr>
>   <xsl:apply-templates />
> </tr>
></xsl:template>
>

Then I get an error and it says something like,
Prefix needs to get solved in namespace.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: strange transform behavior

Posted by David LAGARDERE <dl...@yahoo.fr>.
Try :
<xsl:template match="sql:rowset">
 <table>
 <tbody>
   <xsl:apply-templates />
 </tbody>
 </table>
</xsl:template>

<xsl:template match="sql:row">
 <tr>
   <xsl:apply-templates />
 </tr>
</xsl:template>


 --- Markus Blasl <bl...@fzi.de> a écrit : > Markus
Blasl wrote:
> 
> > I tried it with copy and paste for the "generated"
> xml-file and my 
> > xsl-file.
> > And there it works, everything is put in a table.
> > The values now show up, but they are left
> untouched, or better they 
> > are lined up, without any spaces at all.
> 
> 
> I meant it works local, outside cocoon.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
>  

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: strange transform behavior

Posted by Markus Blasl <bl...@fzi.de>.
Markus Blasl wrote:

> I tried it with copy and paste for the "generated" xml-file and my 
> xsl-file.
> And there it works, everything is put in a table.
> The values now show up, but they are left untouched, or better they 
> are lined up, without any spaces at all.


I meant it works local, outside cocoon.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: strange transform behavior

Posted by Ali Mesbah <al...@West.NL>.
I also found somewhat the same problem with Transformers. 

I have a pipeline which makes a stylesheet. I want to use that generated
stylesheet as the input of a transformer in a second pipeline. The result of the
second pipeline is indeed strange and not what it should be. I tried it with Cocoon 1.0.4 and later with (CVS) Cocoon 1.2 but the outcome is the same. 
Is this a known bug?

Thanks,
Ali
-- 
-- Ali Mesbah, West Consulting B.V., www.west.nl, +31 15 2191600

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: strange transform behavior

Posted by Markus Blasl <bl...@fzi.de>.
David LAGARDERE wrote:

>Are you sure that your DB element templates in your
>stylesheet match elements with the "sql" namespace
>prefix ?
>
>  
>
I tried it with copy and paste for the "generated" xml-file and my xsl-file.
And there it works, everything is put in a table.
The values now show up, but they are left untouched, or better they are 
lined up, without any spaces at all.

Here is a snapshot

xml:
<rowset name="films">
            <row>
                <code>A0001</code>
                <kind>Action</kind>
                <date_prod>1996-01-01</date_prod>
            </row>

xsl:
<xsl:template match="rowset">
 <table>
 <tbody>
   <xsl:apply-templates />
 </tbody>
 </table>
</xsl:template>

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

<xsl:template match="code">
 <td>
 <span style="font-weight:bold; color:blue"><xsl:value-of select="." 
/></span>
 </td>
</xsl:template>
........




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: strange transform behavior

Posted by David LAGARDERE <dl...@yahoo.fr>.
Are you sure that your DB element templates in your
stylesheet match elements with the "sql" namespace
prefix ?

 --- Markus Blasl <bl...@fzi.de> a écrit : > Hi all,
> 
> i get values from a postgres database and i want to
> show them in a 
> html-table view.
> everything gets touched and transformed by my
> xsl-file, except for the 
> data from the database.
> Maybe someone can help solve this problem.
> 
> Here is what i have in my sitemap:
> 
>    <map:match pattern="dbtest2.html">
>      <map:generate
> src="mount/postgres/dbtest2.xml"/>
>      <map:transform type="sql">
>     <map:parameter name="use-connection"
> value="films"/>
>      </map:transform>
>      <!--map:transform type="xslt"
> src="mount/postgres/db_form.xsl"/-->
>      <map:serialize type="xml"/>
>    </map:match>
> 
> As soon as I put the comment back in, my values from
> the DB dissappears 
> completly, but everything else gets transformed.
> 
> Thanks,
> 
> Markus
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
>  

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


strange transform behavior

Posted by Markus Blasl <bl...@fzi.de>.
Hi all,

i get values from a postgres database and i want to show them in a 
html-table view.
everything gets touched and transformed by my xsl-file, except for the 
data from the database.
Maybe someone can help solve this problem.

Here is what i have in my sitemap:

   <map:match pattern="dbtest2.html">
     <map:generate src="mount/postgres/dbtest2.xml"/>
     <map:transform type="sql">
    <map:parameter name="use-connection" value="films"/>
     </map:transform>
     <!--map:transform type="xslt" src="mount/postgres/db_form.xsl"/-->
     <map:serialize type="xml"/>
   </map:match>

As soon as I put the comment back in, my values from the DB dissappears 
completly, but everything else gets transformed.

Thanks,

Markus


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org