>>>>> "Bruno" == Bruno Dumon <[EMAIL PROTECTED]> writes:

    Bruno> Well, this is exactly why you should have posted what you
    Bruno> tried in the first message, otherwise I could keep
    Bruno> guessing.

You are right, of course.
Also, I was initially trying to add the converter to the form
definition rather than the binding, and you might have spotted that
much earlier than I did.

    Bruno> The problem is the following:
    Bruno> path="boolean(@suppress-recurring)"

    Bruno> the path element must address a location
    Bruno> (element/attribute) in you XML file. The expression you
    Bruno> defined returns a boolean.

    Bruno> So it should be: path="@suppress-recurring"

    Bruno> The convertor looks good.

Thank you.
If I remove the boolean function, then I get:

"resource://org/apache/cocoon/forms/flow/javascript/Form.js", 
line 165: uncaught JavaScript exception: at events2xml 
(file:/home/colin/onevoice/members/flow/binding.js, Line 12) 
at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line
165): 
java.lang.RuntimeException: Cannot set value of boolean field "events.0.suppression" 
to a non-Boolean value. 

which is what prompted me to put the boolean() function on in the
first place.

The xml file looks like this:

<?xml version="1.0" encoding="utf-8"?><!-- -*- mode: nxml; -*- -->
<events xmlns="http://colina.demon.co.uk/onevoice/events";>
  <event id="ev1" date="2004-06-09" time="19:15" suppress-recurring="true">
    <title>Annual General Meeting</title>
    <location>County Hall - Commitee Room D</location>
  </event>
  <event id="ev2" date="2004-06-20" time="19:15" suppress-recurring="false">
    <title>Caribbean Carnival concert</title>
    <location>Covered market - Black or Lilac</location>
  </event>
  <event id="ev3" date="2004-07-17" suppress-recurring="false">
    <title>Wedding</title>
    <location>St. Chads, Poulton</location>
  </event>
  <event id="ev4" date="2004-07-21" suppress-recurring="true">
    <title>Summer break</title>
    <location/>
  </event>
  <event id="ev5" date="2004-07-28" suppress-recurring="true">
    <title>Summer break</title>
    <location/>
  </event>
  <event id="ev6" date="2004-08-04" suppress-recurring="true">
    <title>Summer break</title>
    <location/>
  </event>
  <event id="ev7" date="2004-08-11" suppress-recurring="true">
    <title>Summer break</title>
    <location/>
  </event>
  <event id="ev8" date="2004-09-26" suppress-recurring="false">
    <title>Wedding Fair</title>
    <location>Warrington</location>
  </event>
  <event id="ev9" date="2004-09-29" time="18:00" finish-at="20:00" 
suppress-recurring="true">
    <title>Charity concert</title>
    <location>Smithy Arms, Salwick</location>
  </event>
</events>

Changing the true and false values to 1 and 0 make no difference.
-- 
Colin Paul Adams
Preston Lancashire

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

Reply via email to