Return-Path: Delivered-To: apmail-synapse-dev-archive@www.apache.org Received: (qmail 28877 invoked from network); 18 Apr 2009 12:45:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Apr 2009 12:45:34 -0000 Received: (qmail 57754 invoked by uid 500); 18 Apr 2009 12:45:33 -0000 Delivered-To: apmail-synapse-dev-archive@synapse.apache.org Received: (qmail 57653 invoked by uid 500); 18 Apr 2009 12:45:33 -0000 Mailing-List: contact dev-help@synapse.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@synapse.apache.org Delivered-To: mailing list dev@synapse.apache.org Received: (qmail 57645 invoked by uid 99); 18 Apr 2009 12:45:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Apr 2009 12:45:33 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of andreas.veithen@gmail.com designates 74.125.78.27 as permitted sender) Received: from [74.125.78.27] (HELO ey-out-2122.google.com) (74.125.78.27) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Apr 2009 12:45:25 +0000 Received: by ey-out-2122.google.com with SMTP id 9so242150eyd.33 for ; Sat, 18 Apr 2009 05:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=lL2zUM5p/a3Hh3/+C1VC8T6F7rWlqlZ5KToEZOT0r5s=; b=Sy5UmU25H7AnSsGRRU3jmOLKRBFRimnO7NX3wJ8sLxO/jLU2QhD3vlIY8vRbjwGJIO VRyWeJAv3gCr4Aj7dpooxxf+kTgY8P+hoPo+ZOIhB9cVGcuaKRJwAeEPVYPffQRmxbGd c3hnYkZlPnV3Ef6yaWxBp/CiCHqw5dpJoOc9k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Xbzo+4IHfg8YeS5/nI4xX0FzAfVK3GXcKdVN4e8qqIGX1KxMQa6G21FKWjk5gkIGB4 Lmgd/2KWJDan9zojSjEhAKHepGkXzor9hzLIj9kY/uFZ+mIzXrnmrIi9hKsndk6yEzU+ crwU/t/7GZRRnjxKa+YrNzQ9+6Ymra7uPEtfo= MIME-Version: 1.0 Received: by 10.210.59.3 with SMTP id h3mr1692447eba.86.1240058703488; Sat, 18 Apr 2009 05:45:03 -0700 (PDT) In-Reply-To: <23088563.post@talk.nabble.com> References: <23052352.post@talk.nabble.com> <23067194.post@talk.nabble.com> <23088563.post@talk.nabble.com> Date: Sat, 18 Apr 2009 14:45:03 +0200 Message-ID: Subject: Re: Does CData work ? From: Andreas Veithen To: dev@synapse.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Update: WSCOMMONS-461 is now implemented. See [1] for instructions on how to use this feature. [1] http://people.apache.org/~veithen/synapse/faq.html#cdata On Fri, Apr 17, 2009 at 02:34, kimhorn wrote: > > Hi, > > thanks again for that. You saved me some time experimenting. > I will look at Jira 280 etc; and wait for 1.2.9. > Did you mean a Synapse snapshot ? > > Kim > > > > Andreas Veithen-2 wrote: >> >> I think the primary issue is SYNAPSE-280. There are three >> solutions/workarounds for this issue: >> >> 1. Modify Synapse as described in the JIRA issue (only works for >> standalone deployments). >> 2. Make CDATA processing configurable at the Axiom level, as described >> in WSCOMMONS-461. This will only be ready for 1.2.9, but you can use a >> snapshot version. Since this is a change to a single class, we could >> also prepare a patch with this. >> 3. Simply upgrade Woodstox to 4.0.x, because in that version the XML >> parser is non coalescing by default (as required by the specs) and >> reports CDATA sections. >> >> As mentioned in SYNAPSE-280, there could be issues because of code in >> Axis2 or Synapse that implicitly assumes that the parser is >> coalescing. If this problem arises, there is a workaround: by >> carefully setting the properties on the Woodstox parser, one can >> configure it to coalesce text nodes and CDATA sections separately >> (i.e. without merging text nodes and CDATA sections as in the real >> coalescing mode). >> >> There is also another thing that could become an issue under some >> circumstances: when sending several consecutive CDATA events to a >> XMLStreamWriter, it will write them as distinct CDATA sections. This >> makes sense but it is a limitation when there is a need to wrap a very >> long text in a single CDATA section. >> >> I'm not aware of any other issues related to CDATA sections. >> >> >> Andreas >> >> On Wed, Apr 15, 2009 at 23:09, kimhorn wrote: >>> >>> Thanks, i'l try that. There was a lot of issues around CDATA, in the >>> past, >>> and I was wondering if Synapse (Axis, Axiom..) handles them before >>> experimenting further ? >>> >>> Kim >>> >>> >>> Andreas Veithen-2 wrote: >>>> >>>>> Is the Javascript the problem ? >>>>> Note it is impossible to insert the CDATA in the Javascript as then the >>>>> Javscript become invalid due to the nested CDATA. Hence why I used >>>>> Java. >>>> >>>> I see 3 possible ways to achieve this (assuming that the XML scripting >>>> supports CDATA sections, which needs to be confirmed): >>>> >>>> * I think scripts can be loaded from registry entries and that plain >>>> text files are supported by the registry. In that case there is no >>>> problem with escaping. >>>> >>>> * Instead of escaping the JavaScript using a CDATA section, use >>>> entities, i.e. replace all < by <: >>>> >>>> <ws1:claimData><![CDATA["{claimData}"]]></ws1:claimData> >>>> >>>> * Escape the JavaScript using a CDATA section, except for the embedded >>>> ]]>: >>>> >>>> >>> ... >>>> ]]> >>>> ... >>>> ]]> >>>> >>>> Alternatively, if you want something (slightly) more readable: >>>> >>>> >>> ... >>>> ]]><![CDATA["{claimData}"]]> >>>> ... >>>> ]]> >>>> >>>> >>>> Andreas >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org >>>> For additional commands, e-mail: dev-help@synapse.apache.org >>>> >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Does-CData-work---tp23052352p23067194.html >>> Sent from the Synapse - Dev mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org >>> For additional commands, e-mail: dev-help@synapse.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org >> For additional commands, e-mail: dev-help@synapse.apache.org >> >> >> > > -- > View this message in context: http://www.nabble.com/Does-CData-work---tp23052352p23088563.html > Sent from the Synapse - Dev mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org > For additional commands, e-mail: dev-help@synapse.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org For additional commands, e-mail: dev-help@synapse.apache.org