JSTL, core library - url for mail

2002-11-15 Thread Gisella Saavedra
I have the following piece of code in a .jsp file for having a link to send e-mail.
The code rendered as .html has + as blank spaces for the
mail Subject (TBS+-+An+unexpected+error+has+occurred). 

Any idea how I can get regular spaces?
[I have tried nbsp; \u20
 an I get the value as typed.]


a href=mailto:c:url  value=${applicationScope.supportEMail} 
   c:param name=Subject value=TBS - An unexpected error has 
occurred /
   /c:urlDev. Team/a.


Regards,

Gisella



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




RE: namespaces in x:parse

2002-11-14 Thread Gisella Saavedra
In case somebody is interested in the resolution for
parsing xml obviating the namespace,  I got the value of the
select attributes by the following piece of code:

x:set var=lightColor scope=application
  select=string($colorsXml//*[name = 'light']/*[local-name() = 'select']) /

-Original Message-
From: Gisella Saavedra 
Sent: Wednesday, November 13, 2002 3:36 PM
To: 'Tag Libraries Users List'
Subject: namespaces in x:parse


Hello,

can anyone offer any help on what follows:

I have the following file, colors.xsl, which I read as xml input although it is a 
stylesheet:

xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xsl:variable name=dark select='#99'ciao/xsl:variable
xsl:variable name=medium select='#B3B697'hola/xsl:variable
xsl:variable name=light select='#EDEBEB'/   
/xsl:stylesheet

I basically need to set background colors for a JSP-based application.
What I do is to set application variables containing the color values.  
This file is read once, at application login.

I have the following piece of code WHICH WORKS when I remove the namespace
prefixes from colors.xsl:

c:import var=colors url=/mwr/colors.xsl/
x:parse xml=${colors} var=colorsXml/
x:set var=mediumColor scope=application
  select=string($colorsXml//stylesheet/variable[name='medium']/select) /
...


Does somebody know how I can handle the namespace prefix xls in the
select attribute of x:set?  
I tried:
x:set var=darkColor scope=application
  select=string($colorsXml//*[local-name() = 'dark']/select) /

but it does not retrieve anything
??

Gisella


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




namespaces in x:parse

2002-11-13 Thread Gisella Saavedra
Hello,

can anyone offer any help on what follows:

I have the following file, colors.xsl, which I read as xml input although it is a 
stylesheet:

xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xsl:variable name=dark select='#99'ciao/xsl:variable
xsl:variable name=medium select='#B3B697'hola/xsl:variable
xsl:variable name=light select='#EDEBEB'/   
/xsl:stylesheet

I basically need to set background colors for a JSP-based application.
What I do is to set application variables containing the color values.  
This file is read once, at application login.

I have the following piece of code WHICH WORKS when I remove the namespace
prefixes from colors.xsl:

c:import var=colors url=/mwr/colors.xsl/
x:parse xml=${colors} var=colorsXml/
x:set var=mediumColor scope=application
  select=string($colorsXml//stylesheet/variable[name='medium']/select) /
...


Does somebody know how I can handle the namespace prefix xls in the
select attribute of x:set?  
I tried:
x:set var=darkColor scope=application
  select=string($colorsXml//*[local-name() = 'dark']/select) /

but it does not retrieve anything
??

Gisella


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




RE: namespaces in x:parse

2002-11-13 Thread Gisella Saavedra
thanks a lot Pierre and arigato, Matsuhashi-san
for the answers!!

It's been very helpful.  Yes, I also wish, like many of us, that these needed
changes in XPath and JSTL will be available soon,

Gisella

-Original Message-
From: [EMAIL PROTECTED] [mailto:matsuhashi;quick.co.jp]
Sent: Wednesday, November 13, 2002 6:04 PM
To: Tag Libraries Users List
Subject: Re: namespaces in x:parse



Hi,

In the last Oct - Nov time, I posted an issue to this Taglib User List,
which is very similar to your problem. The title of my initial post was
Does JSTL XML taglibs ignore XMLNamespace of input document?(later I
found this title was incorrect, not forcusing my problem precisely) dated
at 09 Oct 2002.

Shawn Bayern kindly responded to my post which was followed by several
e-mail exchanges between Shawn and me. Unfortunately you can not see them
at the Taglib User List archieve at
http://www.mail-archive.com/taglibs-user;jakarta.apache.org/ for some
reason (may be due to my mistake). If you require I can send the record to
you.

The simple answer I got from Shawn Bayarn was that, as far as JSTL1.0
specification tells, you can NOT use the namespace prefixes in XPath
expressions in x:... select=xpath. If you want to process an input XML
document with explicit Namespaces (in other word, qualified elements), you
need to explicitly use the local-name() function and namespace-uri()
function, or name() function defined by XPath1.0 specification to make your
XPath well-matching against the input document.

The way you can do in JSTL1.0 would be to write something like:

  x:set var=mediumColor scope=application
 select=string($colorsXml//stylesheet[namespace-uri()
=http://www.w3.org/1999/XSL/Transform]/variable[namespace-uri()
=http://www.w3.org/1999/XSL/Transform and @name='medium']/@select) /

(sorry, I did not check if this code runs properly for you. I meant to show
you how to use the namespace-url() function to make the XPath valid without
using namespace prefixes ...).

Shawn's JSTL Action book has a section where he explained what you can
and cannot do in XPath expression in the JSTL1.0 way. In there you would
find more precise explanation than my (may be inaccurate) note.

--

When I got to know that I can not use XML Namespace prefixes in XPath
expression in x:... tags and therefore the XPath expressions tend to be
very long and hard-to-read/write, I wanted to find out if there is any
possibility for JSTL1.0 specification betterment. So I did a quick hack
(modify taglib implementation to allow namespace prefixes in xpath). I
reached a conclusion that a specification betterment seems to be possible.

At the end of discussion, Shawn mentioned an idea of introducing a new tag
by which you can register combinations of Namespace prefix and URI which to
be reffered from the XPath expressions within x:... select=xpath tags.
Consider that new tag is introduced, your code could look something like:

c:import var=colors url=/mwr/colors.xsl/
x:parse xml=${colors} var=colorsXml/
x:registerNamespace prefix=xsl uri
=http://www.w3.org/1999/XSL/Transform; scope=.../
  !-- registerNamespace tag is NOT defined in the JSTL1.0
specification !!! --
x:set var=mediumColor scope=application
  select=string($colorsXml//xsl:stylesheet/xsl:variable[@name
='medium']/@select) /
...

This code looks short, much readable, quite in synch with the XSLT way of
using XPath!
Don't you think so?



 MATSUHASHI,kazuaki (FAMILY,given)
 QUICK Corp
 Japan
 [EMAIL PROTECTED]




--
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




JSTL Resource Bundles

2002-10-29 Thread Gisella Saavedra
Can somebody help?



 I am using the latest JSTL library package from this month, October.

 I have the following piece of .JSP code:

 tr
   fmt:message key=rptFIN_TaxPaymentDetail
bundle=${applicationScope.rptHeadings} /
 /tr

 tr
div id=HeaderText1fmt:message  key=${param.rptHeadingKey}
bundle=${applicationScope.rptHeadings} //div
 /tr

 I'm using a .properties file, which is under my WEB-INF/class directory
 The problem I have is:

 The first tr set prints the value of the key right.
 Lamentably the second tr set DOES NOT.  I get the key name printed out,
surrounded by ???

 This is the output for both lines (the first one is correct):
 tax payment detail
 ??? rptFIN_TaxPaymentDetail???

 I wonder why this  fmt:bundle  tag evaluates the attribute bundle OK but not
the key one.
 It seems like a bug to me.  Any input would be appreciated.

 Gisella



--
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




FW: JSTL Resource Bundles

2002-10-28 Thread Gisella Saavedra

 Hello,
 
 I need some help here!
 
 I am using the latest JSTL library package from this month, October.
 
 
 I have the following piece of .JSP code:
 
 tr
   fmt:message key=rptFIN_TaxPaymentDetail  
bundle=${applicationScope.rptHeadings} /
 /tr
 
 tr
div id=HeaderText1fmt:message  key=${param.rptHeadingKey}  
bundle=${applicationScope.rptHeadings} //div
 /tr
 
 I'm using a .properties file, which is under my WEB-INF/class directory
 The problem I have is:
 
 The first tr set prints the value of the key right.
 Lamentably the second tr set DOES NOT.  I get the key name printed out, surrounded 
by ???
 
 This is the output for both lines (the first one is correct):
 tax payment detail 
 ??? rptFIN_TaxPaymentDetail???
 
 I wonder why this  fmt:bundle  tag evaluates the attribute bundle OK but not the 
key one.
 It seems like a bug to me.  Any input would be appreciated.
 
 Gisella
 
 

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




RE: JSTL SQL library

2002-09-08 Thread Gisella Saavedra

Thank you Shawn!  It worked!

-Original Message-
From: Shawn Bayern [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 08, 2002 7:43 PM
To: Tag Libraries Users List; [EMAIL PROTECTED]
Subject: RE: JSTL SQL library


On Sun, 8 Sep 2002, Gisella Saavedra wrote:

 c:forEach items=${sessionScope.hdf.rows} var=row 
  tr
c:forEach items=${row} var=col 
  tdc:out value=${col.value}//td
/c:forEach
  /tr
 /c:forEach
 
 The inner look picks up the values in the  rowsByIndex order.

Actually, ${row} here references a SortedMap; the order is lexical.

 I tried changing the inner loop to
 
 c:forEach items=${sessionScope.hdf.columnNames} var=col varStatus=s 
tdc:out value=${row[${col}]}//td
 /c:forEach
 
 and it failed.

${} applies to a whole expression, not a variable.  Instead of

  ${row[${col}]}

simply write

  ${row[col]}

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


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


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