You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xsp-dev@xml.apache.org by Matt Sergeant <ma...@sergeant.org> on 2002/03/13 15:59:56 UTC

xsp:comment

Can anyone tell me what:

<xsp:comment>
  <p>
  Something here
  <xsp:expr>Some code here</xsp:expr>
  </p>
</xsp:comment>

Would do in Cocoon? I'm wondering if this should either do:

<!--
  <p>
  Something here
  Result of code here
  </p>
-->

Or just the string-value (a-la xsl:comment):

<!--
  Something here
  Result of code here
-->

Or something else entirely.

-- 
<!-- Matt -->
<:->Get a smart net</:->


RE: comment

Posted by Leigh Dodds <ld...@ingenta.com>.
> Did it execute the code, or did the XSLT zap it into the string-value
> before the code got to run?

I think it got zapped. The XSP source contains:

this.characters("\n\n");
this.comment("\n  \n  Something here\n  Some code here\n  \n");
this.characters("\n\n\n      ");
this.characters("\n      ");

There was no start/end element calls for the <p> tags.
 
Cheers,

L.

RE: comment

Posted by Matt Sergeant <ma...@sergeant.org>.
On Wed, 13 Mar 2002, Leigh Dodds wrote:

> I just dropped this fragment into an XSP page and I got:
>
> > Or just the string-value (a-la xsl:comment):
> >
> > <!--
> >   Something here
> >   Result of code here
> > -->
>
> I'm running Cocoon 2.0.1.

Did it execute the code, or did the XSLT zap it into the string-value
before the code got to run?

Also, given the above, how do people do commenting out of sections of code
- for example provide the XSP error messages in a HTML comment?

-- 
<!-- Matt -->
<:->Get a smart net</:->


RE: comment

Posted by Leigh Dodds <ld...@ingenta.com>.
I just dropped this fragment into an XSP page and I got:

> Or just the string-value (a-la xsl:comment):
> 
> <!--
>   Something here
>   Result of code here
> -->

I'm running Cocoon 2.0.1.

Cheers,

L.