Re: JspTranslate: org/saxpath/SAXPathException.

2003-06-11 Thread Jim Kennedy
Figured this one out guys.  This ones on me for being stupid.

I was missing a jar in my classpath.  The name of the jar was saxpath.jar.
I only had jstl.jar and standard.jar (from apache) in the lib dir of my WAR.

Jim Kennedy
IT Consultant
-


- Original Message -
From: Jim Kennedy [EMAIL PROTECTED]
To: Tag Libraries Users List [EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 5:08 PM
Subject: JspTranslate: org/saxpath/SAXPathException.


 I get this error during compilation.  Just having this problem with JSLT
xml
 tags.

 When I take the x:out tag away it compiles.  Not sure why.  Can't see it.
 Can anyone else see the problem





 [EMAIL PROTECTED] import=com.ka.util.* %

 [EMAIL PROTECTED] import=java.util.* %

 [EMAIL PROTECTED] uri=/WEB-INF/x.tld prefix=x %

 [EMAIL PROTECTED] uri=/WEB-INF/c.tld prefix=c %

 !-- #BeginEditable body --


 h1#151;#151;#151;nbsp;Leased Documentsnbsp;#151;#151;#151;/h1

 table width=100% border=0 cellspacing=0 cellpadding=0 

 trtdThe following scanned documents are avaiable in PDF format:

 /td

 /tr

 /table

 x:parse xml=xmldoc_reader var=document/

 x:out select=count($document//company) /

 !-- #EndEditable body --



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Document root element is missing

2003-06-11 Thread Jim Kennedy
I am trying to parse a pretty simple xml document.  Here it is:

?xml version=1.0 encoding=UTF-8?
leasedocuments
company name=PEOPLESGAS contract=00199
masterlease
image name=Master Lease .pdf visible=true/
image name=Certificate of Insurance.pdf visible=false/
image name=Certificate of Authority.pdf visible=false/
image name=Amendment.pdf visible=false/
/masterlease
schedule number=01
!-- This is section 1 --
image name=File Notes.pdf visible=true/
image name=Lease Application.pdf visible=true/
image name=Lease Order-Equipment Schedule.pdf visible=true/
image name=Equipment Addendum.pdf visible=true/
image name=Addendum to LO-ES.pdf visible=true/
image name=D amp; A-Certificate of Acceptance.pdf visible=true/
!-- This is section 2 --
image name=Transaction Summary Sheet.pdf visible=true/
image name=Checks.pdf visible=true/
image name=Invoices.pdf visible=true/
image name=PO's.pdf visible=true/
image name=Equipment Backup.pdf visible=true/
!-- This is section 3 --
image name=Copies of Loan Documentation.pdf visible=true/
image name=Cover Documentation.pdf visible=true/
image name=Loan Calculations.pdf visible=false/
!-- This is section 4 --
image name=Insurance Certificate.pdf visible=true/
image name=Voided Lease Documentation.pdf visible=true/
image name=FASB 13 Test.pdf visible=false/
/schedule
schedule number=02
!-- This is section 1 --
image name=File Notes.pdf visible=true/
image name=Lease Application.pdf visible=true/
image name=Lease Order-Equipment Schedule.pdf visible=true/
image name=Equipment Addendum.pdf visible=true/
image name=Addendum to LO-ES.pdf visible=true/
image name=D amp; A-Certificate of Acceptance.pdf visible=true/
!-- This is section 2 --
image name=Transaction Summary Sheet.pdf visible=true/
image name=Checks.pdf visible=true/
image name=Invoices.pdf visible=true/
image name=PO's.pdf visible=true/
image name=Equipment Backup.pdf visible=true/
!-- This is section 3 --
image name=Copies of Loan Documentation.pdf visible=true/
image name=Cover Documentation.pdf visible=true/
image name=Loan Calculations.pdf visible=false/
!-- This is section 4 --
image name=Insurance Certificate.pdf visible=true/
image name=Voided Lease Documentation.pdf visible=true/
image name=FASB 13 Test.pdf visible=false/
/schedule
/company
/leasedocuments


Here's the JSP code:

[EMAIL PROTECTED] uri=/WEB-INF/x.tld prefix=x %
[EMAIL PROTECTED] uri=/WEB-INF/c.tld prefix=c %
[EMAIL PROTECTED] uri=/WEB-INF/taglibs-log.tld prefix=log %

h1#151;#151;#151;nbsp;Leased Documentsnbsp;#151;#151;#151;/h1 

x:parse xml=xmldoc_string var=document/

x:out select=count($document//company) /


Nothing much to this.  The error occurs at runtime.


Re: Document root element is missing

2003-06-11 Thread Shawn Bayern
On Wed, 11 Jun 2003, Jim Kennedy wrote:

 x:parse xml=xmldoc_string var=document/

This tag will attempt to parse the literal string xmldoc_string, which
explains the Document root element is missing message.  Instead, you'll
need to refer to this string (assuming it's stored as a scoped variable or
something similar) with an EL expression.  In other words, if you've
called it 'xmldoc_string' in one of the scopes, then

  x:parse xml=${xmldoc_string} var=document/

should work.

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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



accessing multiple select params

2003-06-11 Thread Carole E. Mah
Normally one can access a reqest parameter like this: ${param.foo}

But what should be done with the result of a multiple select? e.g.

select name=foo size=4 multiple
option value=farbleFarble warble/option
option value=blortmuch blortiness/option
option value=barbar bar bar/option
option value=googlegoogle/option
[etc]
/select
If I just ask for $(param.foo} in this case, all I get is the first one 
the user selected. So if the user selected 'blort' and 'bar', I only get 
'blort'.

If the 'foo' parameter is getting passed as an array in this case, how 
does EL treat that array, does it give you a param. syntax for 
accessing the array, or must the programmer parse it out by hand?

thanks,
-c
--
Carole E. Mah
  [EMAIL PROTECTED]
Senior Programmer/Analyst
  Brown University Computing  Information Services
  Academic Technology Services
  Scholarly Technology Group
phn 401-863-2669
fax 401-863-9313
http://www.stg.brown.edu/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: accessing multiple select params

2003-06-11 Thread Jim Kennedy
I believe you would use ${paramValues.foo}.  Although I have not tested
myself yet.  It will return a String[].


Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-


- Original Message -
From: Carole E. Mah [EMAIL PROTECTED]
To: Tag Libraries Users List [EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 12:24 PM
Subject: accessing multiple select params


 Normally one can access a reqest parameter like this: ${param.foo}

 But what should be done with the result of a multiple select? e.g.

 select name=foo size=4 multiple
 option value=farbleFarble warble/option
 option value=blortmuch blortiness/option
 option value=barbar bar bar/option
 option value=googlegoogle/option
 [etc]
 /select

 If I just ask for $(param.foo} in this case, all I get is the first one
 the user selected. So if the user selected 'blort' and 'bar', I only get
 'blort'.

 If the 'foo' parameter is getting passed as an array in this case, how
 does EL treat that array, does it give you a param. syntax for
 accessing the array, or must the programmer parse it out by hand?

 thanks,
 -c
 --
 Carole E. Mah
[EMAIL PROTECTED]
 Senior Programmer/Analyst
Brown University Computing  Information Services
Academic Technology Services
Scholarly Technology Group
 phn 401-863-2669
 fax 401-863-9313
 http://www.stg.brown.edu/



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: accessing multiple select params

2003-06-11 Thread Carole E. Mah
Jim,

Thanks very much, that works just fine, e.g.:

c:forEach items=${paramValues.foo} var=currentValue
  c:out value=${currentValue} /nbsp;
/c:forEach
-c

Jim Kennedy wrote:

I believe you would use ${paramValues.foo}.  Although I have not tested
myself yet.  It will return a String[].
Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-
- Original Message -
From: Carole E. Mah [EMAIL PROTECTED]
To: Tag Libraries Users List [EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 12:24 PM
Subject: accessing multiple select params


Normally one can access a reqest parameter like this: ${param.foo}

But what should be done with the result of a multiple select? e.g.

select name=foo size=4 multiple
option value=farbleFarble warble/option
option value=blortmuch blortiness/option
option value=barbar bar bar/option
option value=googlegoogle/option
[etc]
/select
If I just ask for $(param.foo} in this case, all I get is the first one
the user selected. So if the user selected 'blort' and 'bar', I only get
'blort'.
If the 'foo' parameter is getting passed as an array in this case, how
does EL treat that array, does it give you a param. syntax for
accessing the array, or must the programmer parse it out by hand?
thanks,
-c
--
Carole E. Mah
  [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Null values and no of rows

2003-06-11 Thread Das, Amar
I have two questions.  Will appreciate your help.
1.  In the following example, how can I substitute NA for null values.  Note
that I do not construct the sql to include NVL function.  The SQL statement
is passed to me.
  c:forEach var=row items=${deejays.rowsByIndex}
tr
  c:forEach var=column items=${row}
tdc:out value=${column}//td
  /c:forEach
/tr
  /c:forEach
2.  In the following example, how do I know how many rows returned?
  sql:query var=deejays
SELECT * FROM mytable
  /sql:query

Thank you,
Amar Das

Perot Systems - Government Services
Voice: 781.545.2697
   207.594.3007


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



fmt:message and escaping

2003-06-11 Thread Marius Scurtescu
Hi all,

I just realized that the fmt:message tag, unlike c:out, is
not escaping its output.
How would you escape the content you internationalize?

Wrapping every single fmt:message with some other tag that
does the escaping (and I did not find such tag) is not a
viable solution in my opinion.
There are other issues, like the type of escaping. Even
c:out is very limited, it does only generic HTML escaping
and that is not enough, you would need at least JavaScript
string literal escaping and may be HTML attribute value
escaping as well.
Thanks,
Marius


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]