xforms:output has trailing whitespace

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

xforms:output has trailing whitespace

Ryan Puddephatt

Hi,

            In a recent nightly build some xforms:output have trailing whitespace, shown in the attached screenshot. The code to make this as follows:

 

<xhtml:h3>Found <xforms:output ref="count/noproblems"/> <xforms:output value="if(count/noproblems > 1) then ' users' else ' user'"/> deleted without a problem</xhtml:h3>

 

Any ideas why this is?

 

Thanks

 

Ryan Puddephatt

Software Engineer

TFX Group - IT UK

1 Michaelson Square

Livingston

West Lothian

Scotand

EH54 7DP

 

* [hidden email]

( 01506 407 110

7  01506 407 108

 

 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xforms:output has trailing whitespace

Alessandro  Vernet
Administrator
Ryan,

The space has been added because now we also display the alert for
outputs if they are bound to node. There is the space even when the
alert is not active, because sometimes you don't want the layout of
the page to change when the alert goes on/off.

What you can in the short term you can hide the alert when it is inactive with:

    <xhtml:style type="text/css">
        .xforms-alert-inactive { display: none; }
    </xhtml:style>

However, I think we should just not display the alert when the value
is used instead of ref on <xforms:output>. I added a bug for this:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=305318&group_id=168&atid=350207

Alex

On 5/19/06, Ryan Puddephatt <[hidden email]> wrote:

>
>
>
>
> Hi,
>
>             In a recent nightly build some xforms:output have trailing
> whitespace, shown in the attached screenshot. The code to make this as
> follows:
>
>
>
> <xhtml:h3>Found <xforms:output ref="count/noproblems"/> <xforms:output
> value="if(count/noproblems > 1) then ' users' else ' user'"/> deleted
> without a problem</xhtml:h3>
>
>
>
> Any ideas why this is?
>
>
>
> Thanks
>
>
>
> Ryan Puddephatt
>
> Software Engineer
>
> TFX Group - IT UK
>
> 1 Michaelson Square
>
> Livingston
>
> West Lothian
>
> Scotand
>
> EH54 7DP
>
>
>
> * [hidden email]
>
> ( 01506 407 110
>
> 7  01506 407 108
>
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: xforms:output has trailing whitespace

Erik Bruchez
Administrator
I am actually not 100% satisfied with this solution either, as clearly
there are cases where you would like to use a @ref attribute and still
*not* have any trailing space afterwards. I had already entered a bug to
track this styling issue:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=305107&group_id=168&atid=350207

Any better ideas?

-Erik

Alessandro Vernet wrote:

> Ryan,
>
> The space has been added because now we also display the alert for
> outputs if they are bound to node. There is the space even when the
> alert is not active, because sometimes you don't want the layout of
> the page to change when the alert goes on/off.
>
> What you can in the short term you can hide the alert when it is
> inactive with:
>
>    <xhtml:style type="text/css">
>        .xforms-alert-inactive { display: none; }
>    </xhtml:style>
>
> However, I think we should just not display the alert when the value
> is used instead of ref on <xforms:output>. I added a bug for this:
>
> http://forge.objectweb.org/tracker/index.php?func=detail&aid=305318&group_id=168&atid=350207 
>
>
> Alex
>
> On 5/19/06, Ryan Puddephatt <[hidden email]> wrote:
>>
>>
>>
>>
>> Hi,
>>
>>             In a recent nightly build some xforms:output have trailing
>> whitespace, shown in the attached screenshot. The code to make this as
>> follows:
>>
>>
>>
>> <xhtml:h3>Found <xforms:output ref="count/noproblems"/> <xforms:output
>> value="if(count/noproblems > 1) then ' users' else ' user'"/> deleted
>> without a problem</xhtml:h3>
>>
>>
>>
>> Any ideas why this is?
>>
>>
>>
>> Thanks
>>
>>
>>
>> Ryan Puddephatt
>>
>> Software Engineer
>>
>> TFX Group - IT UK
>>
>> 1 Michaelson Square
>>
>> Livingston
>>
>> West Lothian
>>
>> Scotand
>>
>> EH54 7DP
>>
>>
>>
>> * [hidden email]
>>
>> ( 01506 407 110
>>
>> 7  01506 407 108
>>
>>
>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email]
>> mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xforms:output has trailing whitespace

Alessandro  Vernet
Administrator
Right now, for <xforms:output> we generate:

    <span class="xforms-control xforms-output" id="output">(5 left)</span>
    <label for="output" class="xforms-alert xforms-alert-inactive"/>

This makes it hard with CSS to say what the style of the label should
be. Instead, if we add a outer span, then we would generate:

    <span class="xforms-control xforms-output" id="output-1">
        <span>A</span>
        <label for="output-1" class="xforms-alert
xforms-alert-inactive"></label>
    </span>

Then in CSS we could hide the label for all the <xforms:output> with:

    .xforms-output .xforms-alert-inactive { display: none; }

Or this could be done a lower level of granularity by adding a class
on a particular <xforms:output> and having CSS that applies to that
class.

Generating an enclosing <span> that contains the labels seems to make
more and more sense to me.

Alex

On 5/21/06, Erik Bruchez <[hidden email]> wrote:

> I am actually not 100% satisfied with this solution either, as clearly
> there are cases where you would like to use a @ref attribute and still
> *not* have any trailing space afterwards. I had already entered a bug to
> track this styling issue:
>
> http://forge.objectweb.org/tracker/index.php?func=detail&aid=305107&group_id=168&atid=350207
>
> Any better ideas?
>
> -Erik
>
> Alessandro Vernet wrote:
> > Ryan,
> >
> > The space has been added because now we also display the alert for
> > outputs if they are bound to node. There is the space even when the
> > alert is not active, because sometimes you don't want the layout of
> > the page to change when the alert goes on/off.
> >
> > What you can in the short term you can hide the alert when it is
> > inactive with:
> >
> >    <xhtml:style type="text/css">
> >        .xforms-alert-inactive { display: none; }
> >    </xhtml:style>
> >
> > However, I think we should just not display the alert when the value
> > is used instead of ref on <xforms:output>. I added a bug for this:
> >
> > http://forge.objectweb.org/tracker/index.php?func=detail&aid=305318&group_id=168&atid=350207
> >
> >
> > Alex
> >
> > On 5/19/06, Ryan Puddephatt <[hidden email]> wrote:
> >>
> >>
> >>
> >>
> >> Hi,
> >>
> >>             In a recent nightly build some xforms:output have trailing
> >> whitespace, shown in the attached screenshot. The code to make this as
> >> follows:
> >>
> >>
> >>
> >> <xhtml:h3>Found <xforms:output ref="count/noproblems"/> <xforms:output
> >> value="if(count/noproblems > 1) then ' users' else ' user'"/> deleted
> >> without a problem</xhtml:h3>
> >>
> >>
> >>
> >> Any ideas why this is?
> >>
> >>
> >>
> >> Thanks
> >>
> >>
> >>
> >> Ryan Puddephatt
> >>
> >> Software Engineer
> >>
> >> TFX Group - IT UK
> >>
> >> 1 Michaelson Square
> >>
> >> Livingston
> >>
> >> West Lothian
> >>
> >> Scotand
> >>
> >> EH54 7DP
> >>
> >>
> >>
> >> * [hidden email]
> >>
> >> ( 01506 407 110
> >>
> >> 7  01506 407 108
> >>
> >>
> >>
> >>
> >>
> >> --
> >> You receive this message as a subscriber of the [hidden email]
> >> mailing list.
> >> To unsubscribe: mailto:[hidden email]
> >> For general help: mailto:[hidden email]?subject=help
> >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >>
> >>
> >>
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> > --
> > You receive this message as a subscriber of the [hidden email] mailing list.
> > To unsubscribe: mailto:[hidden email]
> > For general help: mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
> --
> Orbeon - XForms Everywhere:
> http://www.orbeon.com/blog/
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: xforms:output has trailing whitespace

Erik Bruchez
Administrator
Alex,

This is not perfect (more HTML generated) but it's probably the best
solution I have seen so far.

-Erik

Alessandro Vernet wrote:

> Right now, for <xforms:output> we generate:
>
>    <span class="xforms-control xforms-output" id="output">(5 left)</span>
>    <label for="output" class="xforms-alert xforms-alert-inactive"/>
>
> This makes it hard with CSS to say what the style of the label should
> be. Instead, if we add a outer span, then we would generate:
>
>    <span class="xforms-control xforms-output" id="output-1">
>        <span>A</span>
>        <label for="output-1" class="xforms-alert
> xforms-alert-inactive"></label>
>    </span>
>
> Then in CSS we could hide the label for all the <xforms:output> with:
>
>    .xforms-output .xforms-alert-inactive { display: none; }
>
> Or this could be done a lower level of granularity by adding a class
> on a particular <xforms:output> and having CSS that applies to that
> class.
>
> Generating an enclosing <span> that contains the labels seems to make
> more and more sense to me.
>
> Alex
>
> On 5/21/06, Erik Bruchez <[hidden email]> wrote:
>> I am actually not 100% satisfied with this solution either, as clearly
>> there are cases where you would like to use a @ref attribute and still
>> *not* have any trailing space afterwards. I had already entered a bug to
>> track this styling issue:
>>
>> http://forge.objectweb.org/tracker/index.php?func=detail&aid=305107&group_id=168&atid=350207 
>>
>>
>> Any better ideas?
>>
>> -Erik
>>
>> Alessandro Vernet wrote:
>> > Ryan,
>> >
>> > The space has been added because now we also display the alert for
>> > outputs if they are bound to node. There is the space even when the
>> > alert is not active, because sometimes you don't want the layout of
>> > the page to change when the alert goes on/off.
>> >
>> > What you can in the short term you can hide the alert when it is
>> > inactive with:
>> >
>> >    <xhtml:style type="text/css">
>> >        .xforms-alert-inactive { display: none; }
>> >    </xhtml:style>
>> >
>> > However, I think we should just not display the alert when the value
>> > is used instead of ref on <xforms:output>. I added a bug for this:
>> >
>> >
>> http://forge.objectweb.org/tracker/index.php?func=detail&aid=305318&group_id=168&atid=350207 
>>
>> >
>> >
>> > Alex
>> >
>> > On 5/19/06, Ryan Puddephatt <[hidden email]> wrote:
>> >>
>> >>
>> >>
>> >>
>> >> Hi,
>> >>
>> >>             In a recent nightly build some xforms:output have trailing
>> >> whitespace, shown in the attached screenshot. The code to make this as
>> >> follows:
>> >>
>> >>
>> >>
>> >> <xhtml:h3>Found <xforms:output ref="count/noproblems"/> <xforms:output
>> >> value="if(count/noproblems > 1) then ' users' else ' user'"/> deleted
>> >> without a problem</xhtml:h3>
>> >>
>> >>
>> >>
>> >> Any ideas why this is?
>> >>
>> >>
>> >>
>> >> Thanks
>> >>
>> >>
>> >>
>> >> Ryan Puddephatt
>> >>
>> >> Software Engineer
>> >>
>> >> TFX Group - IT UK
>> >>
>> >> 1 Michaelson Square
>> >>
>> >> Livingston
>> >>
>> >> West Lothian
>> >>
>> >> Scotand
>> >>
>> >> EH54 7DP
>> >>
>> >>
>> >>
>> >> * [hidden email]
>> >>
>> >> ( 01506 407 110
>> >>
>> >> 7  01506 407 108
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> You receive this message as a subscriber of the
>> [hidden email]
>> >> mailing list.
>> >> To unsubscribe: mailto:[hidden email]
>> >> For general help: mailto:[hidden email]?subject=help
>> >> ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> >
>> ------------------------------------------------------------------------
>> >
>> >
>> > --
>> > You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> > To unsubscribe: mailto:[hidden email]
>> > For general help: mailto:[hidden email]?subject=help
>> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>> --
>> Orbeon - XForms Everywhere:
>> http://www.orbeon.com/blog/
>>
>>
>>
>>
>> --
>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xforms:output has trailing whitespace

Erik Bruchez
Administrator
Note that we now no longer generate the alert <label> when using the
@value attribute on xforms:output. The issue is still present when you
use @ref though, and this will probably require using an outer <span> to
facilitate styling. For reference, the tracker:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=305318&group_id=168&atid=350207

-Erik

Erik Bruchez wrote:

> Alex,
>
> This is not perfect (more HTML generated) but it's probably the best
> solution I have seen so far.
>
> -Erik
>
> Alessandro Vernet wrote:
>> Right now, for <xforms:output> we generate:
>>
>>    <span class="xforms-control xforms-output" id="output">(5 left)</span>
>>    <label for="output" class="xforms-alert xforms-alert-inactive"/>
>>
>> This makes it hard with CSS to say what the style of the label should
>> be. Instead, if we add a outer span, then we would generate:
>>
>>    <span class="xforms-control xforms-output" id="output-1">
>>        <span>A</span>
>>        <label for="output-1" class="xforms-alert
>> xforms-alert-inactive"></label>
>>    </span>
>>
>> Then in CSS we could hide the label for all the <xforms:output> with:
>>
>>    .xforms-output .xforms-alert-inactive { display: none; }
>>
>> Or this could be done a lower level of granularity by adding a class
>> on a particular <xforms:output> and having CSS that applies to that
>> class.
>>
>> Generating an enclosing <span> that contains the labels seems to make
>> more and more sense to me.
>>
>> Alex
>>
>> On 5/21/06, Erik Bruchez <[hidden email]> wrote:
>>> I am actually not 100% satisfied with this solution either, as clearly
>>> there are cases where you would like to use a @ref attribute and still
>>> *not* have any trailing space afterwards. I had already entered a bug to
>>> track this styling issue:
>>>
>>> http://forge.objectweb.org/tracker/index.php?func=detail&aid=305107&group_id=168&atid=350207 
>>>
>>>
>>> Any better ideas?
>>>
>>> -Erik
>>>
>>> Alessandro Vernet wrote:
>>> > Ryan,
>>> >
>>> > The space has been added because now we also display the alert for
>>> > outputs if they are bound to node. There is the space even when the
>>> > alert is not active, because sometimes you don't want the layout of
>>> > the page to change when the alert goes on/off.
>>> >
>>> > What you can in the short term you can hide the alert when it is
>>> > inactive with:
>>> >
>>> >    <xhtml:style type="text/css">
>>> >        .xforms-alert-inactive { display: none; }
>>> >    </xhtml:style>
>>> >
>>> > However, I think we should just not display the alert when the value
>>> > is used instead of ref on <xforms:output>. I added a bug for this:
>>> >
>>> >
>>> http://forge.objectweb.org/tracker/index.php?func=detail&aid=305318&group_id=168&atid=350207 
>>>
>>> >
>>> >
>>> > Alex
>>> >
>>> > On 5/19/06, Ryan Puddephatt <[hidden email]> wrote:
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> Hi,
>>> >>
>>> >>             In a recent nightly build some xforms:output have
>>> trailing
>>> >> whitespace, shown in the attached screenshot. The code to make
>>> this as
>>> >> follows:
>>> >>
>>> >>
>>> >>
>>> >> <xhtml:h3>Found <xforms:output ref="count/noproblems"/>
>>> <xforms:output
>>> >> value="if(count/noproblems > 1) then ' users' else ' user'"/> deleted
>>> >> without a problem</xhtml:h3>
>>> >>
>>> >>
>>> >>
>>> >> Any ideas why this is?
>>> >>
>>> >>
>>> >>
>>> >> Thanks
>>> >>
>>> >>
>>> >>
>>> >> Ryan Puddephatt
>>> >>
>>> >> Software Engineer
>>> >>
>>> >> TFX Group - IT UK
>>> >>
>>> >> 1 Michaelson Square
>>> >>
>>> >> Livingston
>>> >>
>>> >> West Lothian
>>> >>
>>> >> Scotand
>>> >>
>>> >> EH54 7DP
>>> >>
>>> >>
>>> >>
>>> >> * [hidden email]
>>> >>
>>> >> ( 01506 407 110
>>> >>
>>> >> 7  01506 407 108
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> You receive this message as a subscriber of the
>>> [hidden email]
>>> >> mailing list.
>>> >> To unsubscribe: mailto:[hidden email]
>>> >> For general help: mailto:[hidden email]?subject=help
>>> >> ObjectWeb mailing lists service home page:
>>> http://www.objectweb.org/wws
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> >
>>> ------------------------------------------------------------------------
>>> >
>>> >
>>> > --
>>> > You receive this message as a subscriber of the
>>> [hidden email] mailing list.
>>> > To unsubscribe: mailto:[hidden email]
>>> > For general help: mailto:[hidden email]?subject=help
>>> > ObjectWeb mailing lists service home page:
>>> http://www.objectweb.org/wws
>>>
>>>
>>> --
>>> Orbeon - XForms Everywhere:
>>> http://www.orbeon.com/blog/
>>>
>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the
>>> [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>>
>>>
>>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> --
>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws