Laurence Rowe wrote:
>
>
> Laurence Rowe wrote:
>>
>>
>> Dan Jacka wrote:
>>>
>>>
>>> Tom Gross wrote:
>>>>
>>>> .. concerning xdv:
>>>>
>>>> 1. How can inline JavaScript be included? The Usecase is: PloneFormGen
>>>> allows to incect arbitrary (javascript) code into a form with the
>>>> HeaderInjection-field. If the field is rendered with an HTML comment
>>>> '<!--' the whole script is ignored. If the HTML comment is omitted the
>>>> script is enclosed with <![CDATA[ ... ]]> and the browser can't
>>>> interpret the script.
>>>>
>>>
>>> Another example of the same problem: the criterion edit form
>>> (criterion_edit_form.cpt) in Products.ATContentTypes. The jQuery that
>>> controls available field types is inline, wrapped in commented CDATA.
>>>
>>>
>>> // <![CDATA[
>>> .
>>> alert('actual script here')
>>> .
>>> // ]]>
>>>
>>>
>>> Through XDV, the browser gets:
>>>
>>>
>>> <![CDATA[
>>> // <![CDATA[
>>> .
>>> alert('actual script here')
>>> .
>>> // ]]]]><![CDATA[>
>>> ]]>
>>>
>>>
>>> I'm using xdv 0.4b2 and collective.xdv 1.0rc10 on Plone 3.3.5.
>>>
>>> Dan
>>>
>>
>> Hi Dan,
>>
>> I'm unable to reproduce this (using Plone 4.0 here, but the markup seems
>> unchanged.). Could you send me your rules and theme (by private mail) so
>> I can take a look?
>>
>> Laurence
>>
>
> Thanks for that Dan. I'm unable to reproduce this problem under either Mac
> OS X or Ubuntu 10.04. I've added a test for this to xdv, could you try
> running it for me on your machine?
>
> svn co https://codespeak.net/svn/z3/xdv/trunk xdv
> cd xdv
> python2.4 bootstrap.py
> bin/buildout
> bin/test
>
> Also, what versions of libxml2 and libxslt do you have installed?
>
> Laurence
>
Thanks to Laurence adding relevant tests to XDV trunk, I now have a fully
working XDV on RHEL5 using z3c.recipe.staticxml to build libxml2 and
libxslt.
One small hiccup was gcc complaining about unrecognised option -R when
building lxml. An extra buildout part helped me past that:
[buildout]
parts =
rhel-gcc-rpath-workaround
lxml
# other parts here, after lxml
[rhel-gcc-rpath-workaround]
# z3c.recipe.staticlxml builds the libxml2 and libxslt2 libraries,
# then builds lxml linked to these libraries. Unfortunately gcc on
# RHEL5 complains that -R is an unrecognized option and - although the
# build completes - the libraries are not linked from the lxml egg. We
# can workaround by setting paths to the libraries in the
# LD_LIBRARY_PATH environment variable. (Note that gcc will still
# complain about -R. Comment out the line containing 'rpath' in
# z3c.recipe.staticlxml.__init__.pt if you want to stop that, though
# this step isn't necessary - you'll get a successful build without
# it).
recipe = plone.recipe.command
command = export
LD_LIBRARY_PATH="${buildout:directory}/parts/lxml/libxml2/lib;${buildout:directory}/parts/lxml/libxslt/lib"
[lxml]
# Build lxml statically. RHEL5's libxml2 and libxslt are too old.
recipe = z3c.recipe.staticlxml
egg = lxml
libxml2-url = http://xmlsoft.org/sources/libxml2-2.7.7.tar.gz
libxslt-url = http://xmlsoft.org/sources/libxslt-1.1.26.tar.gz
build-libxslt = true
build-libxml2 = true
static-build = true
The library versions I was using via RedHat's package manager were libxml2
2.6.26 and libsxlt 1.1.17.
Aswell as the inline Javascript problem, I was also getting XSLTApplyErrors
on CMFEditions revision compare pages. Both these problems are now gone.
Hoorah!
Hopefully this information will help others past similar problems.
Dan
--
View this message in context:
http://plone.293351.n2.nabble.com/xdv-questions-tp5465398p5573747.html
Sent from the Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers