>-----Original Message-----
>From: Volker Bublitz [mailto:[EMAIL PROTECTED]
>Sent: Mittwoch, 27. April 2005 11:57
>To: [email protected]
>Subject: Re: xsp and < symbol problem
>
>
>i decided to attach my current  .xsp file since i can't get it 
>to work.  
>thanks for all your help.

>
>     String secondsql = "SELECT id FROM cmdb WHERE  
>bezeichnung='<sql:substitute-value  
>xmlns:sql=\"http://apache.org/cocoon/SQL/2.0\";  
>sql:name=\"bezeichnung\"/>' AND 
>kategorie='<sql:substitute-value  
>xmlns:sql=\"http://apache.org/cocoon/SQL/2.0\";  
>sql:name=\"kategorie\"/>' AND standort='<sql:substitute-value  
>xmlns:sql=\"http://apache.org/cocoon/SQL/2.0\";  
>sql:name=\"standort\"/>' AND admin='<sql:substitute-value  
>xmlns:sql=\"http://apache.org/cocoon/SQL/2.0\";  
>sql:name=\"admin\"/>'";
>

>       <sql:execute-query name="customer"  
>xmlns:sql="http://apache.org/cocoon/SQL/2.0";>
>         <sql:query xmlns:sql="http://apache.org/cocoon/SQL/2.0";>
>               <xsp:expr 
>disable-output-escaping="yes">secondsql</xsp:expr>
>         </sql:query>
>       <xsp:expr disable-output-escaping="yes">writeOutput()</xsp:expr>
>       </sql:execute-query>

What you need to understand is that Cocoon pipelines transport SAX events.  An 
<xsp:expr> creates a character data event which will percolate down the 
pipeline.  None of the standard transformers will try to parse these strings 
into XML again.

You have to generate any XML tags as such already in the XSP:

   <sql:query>
     SELECT id FROM cmdb
     WHERE bezeichnung='<sql:substitute-value sql:name="bezeichnung"/>' ...
   </sql:query>

But rather than using XSP-generator|SQL-transformer you should have a look at 
the esql logicsheet.  That allows you to run the SQL inside the XSP and gives 
more control over conditional output and formatting.

Btw for serious applications I would recommend to use neither SQL-transformer 
nor ESQL-logicsheet for insert/update/delete operations.  These should always 
be incapsulated in Java classes for proper transaction and exception handling.

HTH, Alfred.
 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. No confidentiality or privilege 
is waived or lost by any mistransmission. If you receive this message in error, 
please notify the sender urgently and then immediately delete the message and 
any copies of it from your system. Please also immediately destroy any 
hardcopies of the message. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. The sender's company reserves the right to monitor all e-mail 
communications through their networks. Any views expressed in this message are 
those of the individual sender, except where the message states otherwise and 
the sender is authorised to state them to be the views of the sender's company.

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

Reply via email to