Re: multiple /x:if

2002-10-30 Thread Shawn Bayern
I hate to pass the blame, but this looks, if anything, like a
JSP-container bug.  What JSP container are you using?

-- 
Shawn Bayern
JSTL in Action   http://www.jstlbook.com

On Wed, 30 Oct 2002, Þorgils Völundarson wrote:

 hi,
 
 I just noticed that the jstl x tag writes out /x:if tags when iterating 
 through the xml file and the number of /x:if is the same as the number of 
 iterations the loop needs to find the real result. This of course does not 
 comply with well-formedness Below is the code that generates the page and 
 after that what it serves. Any ideas?
 
 table class=main
 tr
  td class=main1
  x:forEach select=$data//page
  x:if select=@pageid = $param:pageID
  div class=main_data_headx:out select=pageHeadIS//divhr 
 class=style /
  x:if select=pageContent/jspfile!=''
  c:set var=jspfile
  x:out select='pageContent/jspfile'/
  /c:set
  c:import url=${jspfile}/
  /x:if
  x:if select=pageContent/contentIS!=''
  x:out select='pageContent/contentIS'/
  /x:if
  /x:if
 
 
 serves out this:
 
 table class=main
 tr
 td class=main1
 /x:if
 /x:if
 /x:if
 /x:if
 /x:if
 /x:if
 /x:if
 div class=main_data_headÚtgefið efni tengt krabbameinsskrá/divhr 
 class=style /
 ...
 
 Kveðja,
 Þorgils Völundarson
 Krabbameinsfélag Íslands, Krabbameinsskrá
 Beinn sími: 540 1973
 netfang: [EMAIL PROTECTED]
 gsm: 698 5302
 
 
 --
 To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
 


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




Re: multiple /x:if

2002-10-30 Thread Þorgils Völundarson
I´m using tomcat 4.0.4

At 08:16 30.10.2002 -0500, you wrote:

I hate to pass the blame, but this looks, if anything, like a
JSP-container bug.  What JSP container are you using?

--
Shawn Bayern
JSTL in Action   http://www.jstlbook.com

On Wed, 30 Oct 2002, Þorgils Völundarson wrote:

 hi,

 I just noticed that the jstl x tag writes out /x:if tags when iterating
 through the xml file and the number of /x:if is the same as the 
number of
 iterations the loop needs to find the real result. This of course does not
 comply with well-formedness Below is the code that generates the page and
 after that what it serves. Any ideas?

 table class=main
 tr
  td class=main1
  x:forEach select=$data//page
  x:if select=@pageid = $param:pageID
  div class=main_data_headx:out select=pageHeadIS//divhr
 class=style /
  x:if select=pageContent/jspfile!=''
  c:set var=jspfile
  x:out select='pageContent/jspfile'/
  /c:set
  c:import url=${jspfile}/
  /x:if
  x:if select=pageContent/contentIS!=''
  x:out select='pageContent/contentIS'/
  /x:if
  /x:if


 serves out this:

 table class=main
 tr
 td class=main1
 /x:if
 /x:if
 /x:if
 /x:if
 /x:if
 /x:if
 /x:if
 div class=main_data_headÚtgefið efni tengt krabbameinsskrá/divhr
 class=style /
 ...

 Kveðja,
 Þorgils Völundarson
 Krabbameinsfélag Íslands, Krabbameinsskrá
 Beinn sími: 540 1973
 netfang: [EMAIL PROTECTED]
 gsm: 698 5302


 --
 To unsubscribe, 
e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: 
mailto:taglibs-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:taglibs-user-help;jakarta.apache.org

Kveðja,
Þorgils Völundarson
Krabbameinsfélag Íslands, Krabbameinsskrá
Beinn sími: 540 1973
netfang: [EMAIL PROTECTED]
gsm: 698 5302


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




Re: multiple /x:if

2002-10-30 Thread Shawn Bayern
Hmm - I haven't heard of any problems reported like this.  Could you send
a whole page, along with all of the data that it uses (e.g., XML files) --
of course, only if that's easy to do.

Shawn

On Wed, 30 Oct 2002, Þorgils Völundarson wrote:

 I´m using tomcat 4.0.4
 
 At 08:16 30.10.2002 -0500, you wrote:
 I hate to pass the blame, but this looks, if anything, like a
 JSP-container bug.  What JSP container are you using?
 
 --
 Shawn Bayern
 JSTL in Action   http://www.jstlbook.com
 
 On Wed, 30 Oct 2002, Þorgils Völundarson wrote:
 
   hi,
  
   I just noticed that the jstl x tag writes out /x:if tags when iterating
   through the xml file and the number of /x:if is the same as the 
  number of
   iterations the loop needs to find the real result. This of course does not
   comply with well-formedness Below is the code that generates the page and
   after that what it serves. Any ideas?
  
   table class=main
   tr
td class=main1
x:forEach select=$data//page
x:if select=@pageid = $param:pageID
div class=main_data_headx:out select=pageHeadIS//divhr
   class=style /
x:if select=pageContent/jspfile!=''
c:set var=jspfile
x:out select='pageContent/jspfile'/
/c:set
c:import url=${jspfile}/
/x:if
x:if select=pageContent/contentIS!=''
x:out select='pageContent/contentIS'/
/x:if
/x:if
  
  
   serves out this:
  
   table class=main
   tr
   td class=main1
   /x:if
   /x:if
   /x:if
   /x:if
   /x:if
   /x:if
   /x:if
   div class=main_data_headÚtgefið efni tengt krabbameinsskrá/divhr
   class=style /
   ...
  
   Kveðja,
   Þorgils Völundarson
   Krabbameinsfélag Íslands, Krabbameinsskrá
   Beinn sími: 540 1973
   netfang: [EMAIL PROTECTED]
   gsm: 698 5302
  
  
   --
   To unsubscribe, 
  e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
   For additional commands, e-mail: 
  mailto:taglibs-user-help;jakarta.apache.org
  
 
 
 --
 To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: 
 mailto:taglibs-user-help;jakarta.apache.org
 
 Kveðja,
 Þorgils Völundarson
 Krabbameinsfélag Íslands, Krabbameinsskrá
 Beinn sími: 540 1973
 netfang: [EMAIL PROTECTED]
 gsm: 698 5302
 
 
 --
 To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
 


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




Re: multiple /x:if

2002-10-30 Thread Þorgils Völundarson
This is from a frames site. first frame is head, second is menu and third 
is main. When I select a link from menu, which is generated from menu.xml, 
it sends parameter to main_data.jsp which then reads the menu.xml and finds 
out which header it should print. The number of /x:if printed are the 
same as the number of iterations the forEach loop must go through before 
finding the result to print.

At 08:36 30.10.2002 -0500, you wrote:
Hmm - I haven't heard of any problems reported like this.  Could you send
a whole page, along with all of the data that it uses (e.g., XML files) --
of course, only if that's easy to do.

Shawn

On Wed, 30 Oct 2002, Þorgils Völundarson wrote:

 I´m using tomcat 4.0.4

 At 08:16 30.10.2002 -0500, you wrote:
 I hate to pass the blame, but this looks, if anything, like a
 JSP-container bug.  What JSP container are you using?
 
 --
 Shawn Bayern
 JSTL in Action   http://www.jstlbook.com
 
 On Wed, 30 Oct 2002, Þorgils Völundarson wrote:
 
   hi,
  
   I just noticed that the jstl x tag writes out /x:if tags when 
iterating
   through the xml file and the number of /x:if is the same as the
  number of
   iterations the loop needs to find the real result. This of course 
does not
   comply with well-formedness Below is the code that generates the 
page and
   after that what it serves. Any ideas?
  
   table class=main
   tr
td class=main1
x:forEach select=$data//page
x:if select=@pageid = $param:pageID
div class=main_data_headx:out 
select=pageHeadIS//divhr
   class=style /
x:if select=pageContent/jspfile!=''
c:set var=jspfile
x:out select='pageContent/jspfile'/
/c:set
c:import url=${jspfile}/
/x:if
x:if select=pageContent/contentIS!=''
x:out select='pageContent/contentIS'/
/x:if
/x:if
  
  
   serves out this:
  
   table class=main
   tr
   td class=main1
   /x:if
   /x:if
   /x:if
   /x:if
   /x:if
   /x:if
   /x:if
   div class=main_data_headÚtgefið efni tengt krabbameinsskrá/divhr
   class=style /
   ...
  
   Kveðja,
   Þorgils Völundarson
   Krabbameinsfélag Íslands, Krabbameinsskrá
   Beinn sími: 540 1973
   netfang: [EMAIL PROTECTED]
   gsm: 698 5302
  
  
   --
   To unsubscribe,
  e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
   For additional commands, e-mail:
  mailto:taglibs-user-help;jakarta.apache.org
  
 
 
 --
 To unsubscribe, 
e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:taglibs-user-help;jakarta.apache.org

 Kveðja,
 Þorgils Völundarson
 Krabbameinsfélag Íslands, Krabbameinsskrá
 Beinn sími: 540 1973
 netfang: [EMAIL PROTECTED]
 gsm: 698 5302


 --
 To unsubscribe, 
e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: 
mailto:taglibs-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:taglibs-user-help;jakarta.apache.org

Kveðja,
Þorgils Völundarson
Krabbameinsfélag Íslands, Krabbameinsskrá
Beinn sími: 540 1973
netfang: [EMAIL PROTECTED]
gsm: 698 5302


menu.xml
Description: application/xml
%@ taglib prefix=x uri=http://java.sun.com/jstl/xml; %
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
%@ taglib uri=http://jakarta.apache.org/taglibs/request-1.0; prefix=req %
%@ taglib uri=http://jakarta.apache.org/taglibs/datetime-1.0; prefix=dt %
%@ taglib uri=http://jakarta.apache.org/taglibs/utility-1.0; prefix=util %
%@ taglib uri=http://jakarta.apache.org/taglibs/string-1.0; prefix=str %
%@ taglib uri=WEB-INF/taglib20.tld prefix=def %
%@ taglib uri=WEB-INF/taglib26.tld prefix=exec %
%@ taglib uri=WEB-INF/taglib10.tld prefix=opt % 
opt:Suppress
?xml version=1.0 encoding=ISO-8859-1 standalone=no ?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
head
title/title
meta HTTP-EQUIV=Content-Type CONTENT=text/html; charset=iso-8859-1
link rel=stylesheet href=krabbskra_style.css
script language=JavaScript
!--
function openPop(form) {
var url=(form.dir.options[form.dir.selectedIndex].value);
myWindow = window.open(url, 'myWindow', 'toolbar=no, location=no, directories=no, 
status=no, menubar=no, scrollbars=no, resizable=no,width=500,height=400');
}
// --
/script
/head
body class=main
c:import url=data_pages.xml var=xml /
x:parse xml=${xml} var=data scope=application /
table class=main
tr
td class=main1
x:forEach select=$data//page
x:if select=@pageid = $param:pageID
div class=main_data_headx:out select=pageHeadIS//divhr 
class=style /
x:if select=pageContent/jspfile!=''
c:set var=jspfile
x:out select='pageContent/jspfile'/
/c:set
c:import url=${jspfile}/
/x:if
  

RE: multiple /x:if

2002-10-30 Thread Þorgils Völundarson
thank you that works. funny that it prints out the extra /x:if. I'm using 
version 1.2.


At 11:12 30.10.2002 -0500, you wrote:
It looks to me like you have a syntactic error, one too many closing /c:if
tags.  Which version of JSTL are you using?  1.02, at least for the core
library, is better about catching an un-matched end tag during translation.
Perhaps there is a bug in the xml taglib, but you can easily work around it
be correcting your JSP.

I have attached a slightly modified version of your JSP source to try to
make the problem more noticeable.

Thomas Gideon
Sr. Software Developer
B2eMarkets

301.230.2236  Tel.
301.230.2248  Fax.
[EMAIL PROTECTED]
www.B2eMarkets.com


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:taglibs-user-help;jakarta.apache.org

Kveðja,
Þorgils Völundarson
Krabbameinsfélag Íslands, Krabbameinsskrá
Beinn sími: 540 1973
netfang: [EMAIL PROTECTED]
gsm: 698 5302


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




RE: multiple /x:if

2002-10-30 Thread Shawn Bayern
On Wed, 30 Oct 2002, Gideon, Thomas wrote:

 It looks to me like you have a syntactic error, one too many closing
 /c:if tags.  Which version of JSTL are you using?  1.02, at least
 for the core library, is better about catching an un-matched end tag
 during translation. Perhaps there is a bug in the xml taglib, but you
 can easily work around it be correcting your JSP.

Catching mismatched tags is not the function of JSTL; it's done
automatically by the container, and version 1.0.2 shouldn't be any
different in this regard from 1.0.1.  Please let me know if you've indeed
noticed otherwise.  Any mismatched tags should be caught correctly by the
container for the Standard Taglib 1.0.1.

But indeed, you are correct that dangling end tags will simply be
printed out by a JSP container.  This behavior is appropriate per the JSP
specification; under the non-XML syntax, an unmatched /x:if tag is
simply template text.

-- 
Shawn Bayern
JSTL in Action   http://www.jstlbook.com


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




RE: multiple /x:if

2002-10-30 Thread Gideon, Thomas
I stand corrected; my usual gaffe in this area is missing an end tag, which
is quite a bit different as you correctly point out from an extra end tag.

 -Original Message-
 From: Shawn Bayern [mailto:bayern;essentially.net]
 Sent: Wednesday, October 30, 2002 11:40 AM
 To: Tag Libraries Users List
 Subject: RE: multiple /x:if
 
 
 On Wed, 30 Oct 2002, Gideon, Thomas wrote:
 
  It looks to me like you have a syntactic error, one too many closing
  /c:if tags.  Which version of JSTL are you using?  1.02, at least
  for the core library, is better about catching an un-matched end tag
  during translation. Perhaps there is a bug in the xml 
 taglib, but you
  can easily work around it be correcting your JSP.
 
 Catching mismatched tags is not the function of JSTL; it's done
 automatically by the container, and version 1.0.2 shouldn't be any
 different in this regard from 1.0.1.  Please let me know if 
 you've indeed
 noticed otherwise.  Any mismatched tags should be caught 
 correctly by the
 container for the Standard Taglib 1.0.1.
 
 But indeed, you are correct that dangling end tags will simply be
 printed out by a JSP container.  This behavior is appropriate 
 per the JSP
 specification; under the non-XML syntax, an unmatched /x:if tag is
 simply template text.
 
 -- 
 Shawn Bayern
 JSTL in Action   http://www.jstlbook.com
 
 
 --
 To unsubscribe, e-mail:   
 mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: 
 mailto:taglibs-user-help;jakarta.apache.org
 

--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org