cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Rocha <rica...@apache.org>
Subject Re: XSP bug with new line characters?
Date Wed, 30 Aug 2000 19:57:22 GMT
Anthony.Ettinger@mPower.com wrote:
> 
> that's the same problem I'm having, any way around that is/will there
> be a fix?


This is not a bug: it's a feature. Whitespace is always preserved
in <xsp:attribute>.

We don't want the XSP processor to arbitrarily suppress potentially
valid whitespace inside your attribute values. Check <xsl:attribute>
behavior in XSLT.

If (when generating attribute values via <xsp:expr>) you want to indent
your XSP markup for readability, use the following form:

  <xsp:attribute name="img"><xsp:expr>
    baseDirectory + "/img/" + iconName + ".gif"
  </xsp:expr></xsp:attribute>

Note here that whitespace is not significant inside <xsp:expr>
so you can indent as appropriate.

> Anthony Ettinger
> Sr. Web Developer
> 415-875-8936
> ettinger@mpower.com
> http://www.401kafe.com
> http://www.irajunction.com
> 
>  sudhi
>  <sudheendra@insage.com>               To:
>                                 cocoon-users@xml.apache.org
>  08/30/00 09:24 AM                     cc:
>  Please respond to                     Subject:        Re: XSP bug
>  cocoon-users                  with new line characters?
> 
> Hi,
> I did. Cocoon don't like new lines, tabs between <xsp:attribute>
> 
> I have to give whole <xsp:attribute>...</xsp:attribute> in one line.
> 
> ~S
> 
> Anthony.Ettinger@mPower.com wrote:
> >
> > That works as long as you don't go into "Grid View".
> >
> > Regardless, I think it's an error on Cocoon's part that it won't
> parse
> > if the two lines are broken up into 6:
> >
> >         <xsp:attribute name="que-num">
> >                <xsp:expr>question</xsp:expr>
> >        </xsp:attribute>
> >        <xsp:attribute name="sec-num">
> >                <xsp:expr>section</xsp:expr>
> >        </xsp:attribute>
> >
> > Anyone else run into this?
> >
> > Anthony Ettinger
> > Sr. Web Developer
> > 415-875-8936
> > ettinger@mpower.com
> > http://www.401kafe.com
> > http://www.irajunction.com
> >
> >  "Perry Molendijk"
> >  <perry@inflexions.com>               To:
> >                                <cocoon-users@xml.apache.org>
> >  08/29/00 06:29 PM                    cc:
> >  Please respond to                    Subject:        Re: XSP bug
> >  cocoon-users                 with new line characters?
> >
> > To stop XMLSpy from indenting and breaking lines go to edit -
> settings
> > select the file types tab and select the file extention on the left
> > and select the Text View option under Default View. I have had a few
> > problems myself with the linebreaks and indenting added by XMLSpy
> > mainly with xhtml documents in IE5.
> >
> > Perry
> > ----- Original Message -----
> > From: Anthony.Ettinger@mPower.com
> > To: cocoon-users@xml.apache.org
> > Sent: Wednesday, August 30, 2000 7:56 AM
> > Subject: XSP bug with new line characters?
> >
> > Hello,
> >
> > I'm using the following two lines in my xml document:
> >        <xsp:attribute
> > name="que-num"><xsp:expr>question</xsp:expr></xsp:attribute>
> >        <xsp:attribute
> > name="sec-num"><xsp:expr>section</xsp:expr></xsp:attribute>
> >
> > However, if these are broken up into more than two lines, cocoon
> will
> > not parse the document, resulting in an empty document.
> > for example:
> >
> >        <xsp:attribute name="que-num">
> >                <xsp:expr>question</xsp:expr>
> >        </xsp:attribute>
> >        <xsp:attribute name="sec-num">
> >                <xsp:expr>section</xsp:expr>
> >        </xsp:attribute>
> >
> > The 6 lines above result in an empty error.
> >
> > Is this a bug, where cocoon needs these on two lines, and only two
> > lines?
> > If there is a work-around please help! Thanks.
> >
> > (by the way, I'm using XMLSpy v. 3.0.7, which is converting the two
> > lines at the top to the six lines above whenever I open the
> document).
> >
> > Anthony Ettinger
> > Sr. Web Developer
> > 415-875-8936
> > ettinger@mpower.com
> > http://www.401kafe.com
> > http://www.irajunction.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

Mime
View raw message