the cose that is generated is
for(int u = 0; u < viewer.getThrValues().length;
xspParentNode = xspCurrentNode;
xspNodeStack.push(xspParentNode);
xspCurrentNode = document.createElement("value");
xspParentNode.appendChild(xspCurrentNode);
xspParentNode = xspCurrentNode;
xspNodeStack.push(xspParentNode);
xspCurrentNode = document.createElement("date");
xspParentNode.appendChild(xspCurrentNode);
xspCurrentNode.appendChild(document.createTextNode("\n\t\t\t\t\t\t
\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t "));
xspCurrentNode.appendChild(xspExpr(formatDate(u,1,viewer), document));
xspCurrentNode.appendChild(document.createTextNode("\t\t\t\t\t\t\t\t\t\t\t\n
\t\t\t\t\t\t\t\t\n\t \t\t\t \n\t\t\t\t\t\t"));
((Element) xspCurrentNode).normalize();
xspCurrentNode = (Node) xspNodeStack.pop();
((Element) xspCurrentNode).normalize();
xspCurrentNode = (Node) xspNodeStack.pop();
}
whit a bit change in original code. Now the compilation is ok but it doesn't
get value:
<xsp:content>
<xsp:logic>
for(int u = 0; u < viewer.getThrValues().length;
<value><date>
<xsp:expr>formatDate(u,1,viewer)</xsp:expr>
</date></value>
}
</xsp:logic>
</xsp:content>
----- Original Message -----
From: "Morrison, John" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 19, 2001 10:05 AM
Subject: RE: which is the problem?
> Best place to look - the generated Java code.
>
> > -----Original Message-----
> > From: Simone Bortolaso [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, 19 June 2001 09:06
> > To: [EMAIL PROTECTED]
> > Subject: Re: which is the problem?
> >
> >
> > if i write the same code without for and with variable the
> > compiler says the
> > same things
> >
> > int u = 10;
> > > <xsp:content>
> > > <value>
> > > <date><xsp:expr>formatDate(u,1,viewer)</xsp:expr></date>
> > >
> > <pre-alarm><xsp:expr>formatDate(u,2,viewer)</xsp:expr></pre-alarm>
> > >
> > > <alarm><xsp:expr>formatDate(u,3,viewer)</xsp:expr></alarm>
> > > </value>
> > > </xsp:content>
> > > }
> >
> > why?
> >
> > ----- Original Message -----
> > From: "Morrison, John" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, June 19, 2001 9:54 AM
> > Subject: RE: which is the problem?
> >
> >
> > > I don't know for sure, but I believe that the <xsp:content>
> > tag is the
> > > cause. Try...
> > >
> > >
> > > for(int u = 0; u < u++){
> > > <xsp:content>
> > > <value>
> > > <date><xsp:expr>formatDate(u,1,viewer)</xsp:expr></date>
> > >
> > <pre-alarm><xsp:expr>formatDate(u,2,viewer)</xsp:expr></pre-alarm>
> > >
> > > <alarm><xsp:expr>formatDate(u,3,viewer)</xsp:expr></alarm>
> > > </value>
> > > </xsp:content>
> > > }
> > >
> > > J.
> > >
> > > -----Original Message-----
> > > From: Simone Bortolaso [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, 19 June 2001 08:53
> > > To: [EMAIL PROTECTED]
> > > Subject: which is the problem?
> > >
> > >
> > > The compilator say:
> > >
> > > java.lang.Exception: XSP Java Compiler: Compilation failed
> > for _index.java
> > > 2385: Undefined variable: u
> > > xspExpr(formatDate(u,1,viewer),document)
> > >
> > >
> > > .........................................
> > > End the code is:
> > >
> > >
> > >
> > > <xsp:logic>
> > > <threshold>
> > > <label>Thresholds:</label>
> > > <date-header>Date</date-header>
> > > <pre-alarm-header>Pre-alarm Threshold </pre-alarm-header>
> > > <alarm-header>Alarm Threshold </alarm-header>
> > >
> > >
> > > <xsp:content>
> > > for(int u = 0; u < u++){
> > > <value>
> > > <date><xsp:expr>formatDate(u,1,viewer)</xsp:expr></date>
> > >
> > <pre-alarm><xsp:expr>formatDate(u,2,viewer)</xsp:expr></pre-alarm>
> > >
> > > <alarm><xsp:expr>formatDate(u,3,viewer)</xsp:expr></alarm>
> > > </value>
> > >
> > > }
> > > </xsp:content>
> > >
> > > </threshold>
> > >
> > > <xsp:logic>
> > >
> > >
> > >
> > >
> > ==============================================================
> > =========
> > > Information in this email and any attachments are
> > confidential, and may
> > > not be copied or used by anyone other than the addressee,
> > nor disclosed
> > > to any third party without our permission. There is no intention to
> > > create any legally binding contract or other commitment
> > through the use
> > > of this email.
> > >
> > > Experian Limited (registration number 653331).
> > > Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF
> > >
> > >
> > ---------------------------------------------------------------------
> > > Please check that your question has not already been answered in the
> > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > > For additional commands, e-mail: <[EMAIL PROTECTED]>
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
> >
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>