symphonycms / remote_datasource

An improved datasource to fetch data from TXT, CSV, XML and JSON sources.
Other
14 stars 9 forks source link

cdata sections droped #34

Open kmeinke opened 8 years ago

kmeinke commented 8 years ago

cdata sections of xml datasources are not copied into the symphony page data xml. resulting in errors if cdata contains reserved xml character sequences. common use case for cdata are html fragments from WYSIWYG editors.

one solution may be the option to configure elements containing cdata and use this list in the cdata-section-elements attribute of xsl:output.

a more radical solution could be to think if the extra xsl transformation of the datasoruce is realy nessesary. as far as i see it is only used to apply the xpath configured?

nitriques commented 8 years ago

Hum I wonder why this happens.... Can you share the url of the remote DS for testing purpose ?

nitriques commented 8 years ago

Does it works if you remove this line ?

kmeinke commented 8 years ago

can't share the dynamic datasource url. made you a static snapshot:

datasource: http://www.kontrast-consulting.de/test/source.xml symphony page XML http://www.kontrast-consulting.de/test/result.xml

removal of that line hat no effect

kmeinke commented 8 years ago

as far as i understand the code, cdata sections are droped in this transformation because the $xsl has no cdata handling at all:

https://github.com/symphonycms/remote_datasource/blob/master/data-sources/datasource.remote.php#L943

nitriques commented 8 years ago

We might giving a try to process it with the ninja technique... with cdata-section-elements ... mmm... Will try to test it. In the mean time, I would try to inject the cdata-section-elements manually.