RE: Putting the esql:get-ascii inside CDATA block
I found a problem: it was my misunderstanding of ESQL tags. thans, Argyn - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Putting the esql:get-ascii inside CDATA block
On 05.Apr.2002 -- 11:22 AM, Steven Sedlmeyer wrote: I'm pulling out a CLOB that may or may not have embeded HTML which may or may not be XHTML... I then need to pass it on through a couple of stylesheets to format the results for a browser. I'm trying to put the text into a CDATA block so that the embeded tags will not get processed by later stylesheets. My thought to date has been that I need the text data to be inserted into the CDATA block without having the and chars escaped so that any HTML tags arrive at the end of the pipeline intact. Additionally, in all three methods, the and of any XML tags I attempt to insert around the text (![CDATA[]] and in the last case body_text/ end up also escaped and thus treated as text by later stylesheets. Sorry, but I still don't get what you want to achieve. If the data is _not_ going to be processed by _cocoon_, you can just print out the data. It will be contained in a text node and thus is safe from further processing. I believe that to the client HTML tags are reported, are they not? If the data _shall_ be processed by _cocoon_, you'll need to ensure valid (no: well-formed) XML is in your DB and can use e.g. esql:get-xml/ Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Putting the esql:get-ascii inside CDATA block
I'm pulling out a CLOB that may or may not have embeded HTML which may or may not be XHTML... I then need to pass it on through a couple of stylesheets to format the results for a browser. I'm trying to put the text into a CDATA block so that the embeded tags will not get processed by later stylesheets. My thought to date has been that I need the text data to be inserted into the CDATA block without having the and chars escaped so that any HTML tags arrive at the end of the pipeline intact. Additionally, in all three methods, the and of any XML tags I attempt to insert around the text (![CDATA[]] and in the last case body_text/ end up also escaped and thus treated as text by later stylesheets. Thanks Steve -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: Re: Putting the esql:get-ascii inside CDATA block On 04.Apr.2002 -- 12:06 PM, Steven Sedlmeyer wrote: I'm trying to place the results of an esql:get-ascii column=foo/ tag into a cdata block. I've been able to get close, with the ending up in the text node as lt; and gt; but I can't get them inserted as an actual CDATA block. Is there some simple solution I've missed or baring that, a hard one...? I presume that you want the data inside the CDATA block for the sake of the client? Since printing out the data would create a text node for the internal processing and wouldn't be touched by Cocoon at all. I think it should be possible to print the CDATA instruction (lt;![CDATA[) and the ending instruction (]]gt;). 1. body_text ![CDATA[esql:get-ascii column=foo/]] /body_text Effectively escapes the esql-tag from being replaced by the required java code. 2. xsp:logic ![CDATA[String cdOpen = ![CDATA[; ]] String cdClose = ]]gt; /xsp:logic body_text xsp:exprcdOpen/xsp:expresql:get-ascii column=foo/xsp:exprcdClose/xsp:expr /body_text //with various combinations of CDATA blocks and escaped characters in the //xsp:logic/ block Mmmh, that _should_ work. Could you please provide us with the java code produced by this? You'll find it in the work directory of your servlet engine (e.g. $CATALINA_HOME/work/localhost/cocoon/) 3. xsp:logic ![CDATA[ StringBuffer bodyText= new StringBuffer(); bodyText.append(body_text![CDATA[); ]] bodyText.append(esql:get-ascii column=foo/); ![CDATA[ bodyText.append(]]); bodyText.append(/body_text); ]] /xsp:logic xsp:expr disable-output-escaping=yes bodyText.toString()/xsp:expr // Same results except that the surrounding body_text node is now also escaped and // appears as part of the text node Wait -- that sounds like a correct result. What are you trying to achieve exactly? Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Putting the esql:get-ascii inside CDATA block
Sorry, forgot the java file. It's attached here along with the xsp it came from, the resulting xml and the xml as I wanted it to appear. Steve -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: Re: Putting the esql:get-ascii inside CDATA block On 04.Apr.2002 -- 12:06 PM, Steven Sedlmeyer wrote: I'm trying to place the results of an esql:get-ascii column=foo/ tag into a cdata block. I've been able to get close, with the ending up in the text node as lt; and gt; but I can't get them inserted as an actual CDATA block. Is there some simple solution I've missed or baring that, a hard one...? I presume that you want the data inside the CDATA block for the sake of the client? Since printing out the data would create a text node for the internal processing and wouldn't be touched by Cocoon at all. I think it should be possible to print the CDATA instruction (lt;![CDATA[) and the ending instruction (]]gt;). 1. body_text ![CDATA[esql:get-ascii column=foo/]] /body_text Effectively escapes the esql-tag from being replaced by the required java code. 2. xsp:logic ![CDATA[String cdOpen = ![CDATA[; ]] String cdClose = ]]gt; /xsp:logic body_text xsp:exprcdOpen/xsp:expresql:get-ascii column=foo/xsp:exprcdClose/xsp:expr /body_text //with various combinations of CDATA blocks and escaped characters in the //xsp:logic/ block Mmmh, that _should_ work. Could you please provide us with the java code produced by this? You'll find it in the work directory of your servlet engine (e.g. $CATALINA_HOME/work/localhost/cocoon/) 3. xsp:logic ![CDATA[ StringBuffer bodyText= new StringBuffer(); bodyText.append(body_text![CDATA[); ]] bodyText.append(esql:get-ascii column=foo/); ![CDATA[ bodyText.append(]]); bodyText.append(/body_text); ]] /xsp:logic xsp:expr disable-output-escaping=yes bodyText.toString()/xsp:expr // Same results except that the surrounding body_text node is now also escaped and // appears as part of the text node Wait -- that sounds like a correct result. What are you trying to achieve exactly? Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] test1.tar.gz Description: Binary data - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Putting the esql:get-ascii inside CDATA block
I'm trying to place the results of an esql:get-ascii column=foo/ tag into a cdata block. I've been able to get close, with the ending up in the text node as lt; and gt; but I can't get them inserted as an actual CDATA block. Is there some simple solution I've missed or baring that, a hard one...? I've tried variations of the following: 1. body_text ![CDATA[esql:get-ascii column=foo/]] /body_text // results in the text of the tag in the CDATA node 2. xsp:logic ![CDATA[String cdOpen = ![CDATA[; ]] String cdClose = ]]gt; /xsp:logic body_text xsp:exprcdOpen/xsp:expresql:get-ascii column=foo/xsp:exprcdClose/xsp:expr /body_text //with various combinations of CDATA blocks and escaped characters in the //xsp:logic/ block and finally: 3. xsp:logic ![CDATA[ StringBuffer bodyText= new StringBuffer(); bodyText.append(body_text![CDATA[); ]] bodyText.append(esql:get-ascii column=foo/); ![CDATA[ bodyText.append(]]); bodyText.append(/body_text); ]] /xsp:logic xsp:expr disable-output-escaping=yes bodyText.toString()/xsp:expr // Same results except that the surrounding body_text node is now also escaped and // appears as part of the text node Any input will be greatly appreciated. Steve Sedlmeyer Crosswalk.com, Inc. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Putting the esql:get-ascii inside CDATA block
On 04.Apr.2002 -- 12:06 PM, Steven Sedlmeyer wrote: I'm trying to place the results of an esql:get-ascii column=foo/ tag into a cdata block. I've been able to get close, with the ending up in the text node as lt; and gt; but I can't get them inserted as an actual CDATA block. Is there some simple solution I've missed or baring that, a hard one...? I presume that you want the data inside the CDATA block for the sake of the client? Since printing out the data would create a text node for the internal processing and wouldn't be touched by Cocoon at all. I think it should be possible to print the CDATA instruction (lt;![CDATA[) and the ending instruction (]]gt;). 1. body_text ![CDATA[esql:get-ascii column=foo/]] /body_text Effectively escapes the esql-tag from being replaced by the required java code. 2. xsp:logic ![CDATA[String cdOpen = ![CDATA[; ]] String cdClose = ]]gt; /xsp:logic body_text xsp:exprcdOpen/xsp:expresql:get-ascii column=foo/xsp:exprcdClose/xsp:expr /body_text //with various combinations of CDATA blocks and escaped characters in the //xsp:logic/ block Mmmh, that _should_ work. Could you please provide us with the java code produced by this? You'll find it in the work directory of your servlet engine (e.g. $CATALINA_HOME/work/localhost/cocoon/) 3. xsp:logic ![CDATA[ StringBuffer bodyText= new StringBuffer(); bodyText.append(body_text![CDATA[); ]] bodyText.append(esql:get-ascii column=foo/); ![CDATA[ bodyText.append(]]); bodyText.append(/body_text); ]] /xsp:logic xsp:expr disable-output-escaping=yes bodyText.toString()/xsp:expr // Same results except that the surrounding body_text node is now also escaped and // appears as part of the text node Wait -- that sounds like a correct result. What are you trying to achieve exactly? Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]