tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kilian, Rex" <Rex.Kil...@crowncastle.com>
Subject RE: XTags Question - Please help
Date Thu, 03 Oct 2002 16:53:28 GMT
I noticed strange behavior with the <xtags:style> tag.
It wasn't as straight forward as the other tags.
How about one of these two solutions?


from styledemo2.jsp in the xtags-examples.war

<xtags:style xsl="/style/article-html.xsl">
    <%@include file="/style/test2.xml" %>
</xtags:style>


from styledemo3.jsp in the xtags-examples.war

<xtags:parse uri="/style/test2.xml" id="mydoc"/>
<xtags:style document="<%=mydoc%>" xsl="/style/article-html.xsl"
outputMethod="html"/>

For this second example you may want to verify the <xtags:parse> tag is
working before incorporating the <xtags:style> tag by simply displaying
something that you know is in the XML. See simple_rss.jsp in the
xtags-examples.war file.





-----Original Message-----
From: Tod Thomas [mailto:tthomas@chubb.com]
Sent: Thursday, October 03, 2002 12:13 PM
To: Tag Libraries Users List
Subject: Re: XTags Question - Please help


"Kilian, Rex" wrote:
> 
> http://www.mail-archive.com/taglibs-dev@jakarta.apache.org/msg01116.html
> 
> Look for "xtags:style" in the message.
> This post helped me when I was using XTags.

Thanks Rex, I took a look and modified my .jsp:

<xtags:parse

url="http://localhost/cgi-bin/test2.cgi?base=directory&scope=sub&filter=cn=s
mith"/>

<xtags:style
 xsl="/xml/ldap.xsl"
 outputMethod="html"/>

Now I get "javax.servlet.ServletException: Must specify both XML and an
XSLT to style" :(

I'm getting the feeling that xtags:style will work passing a url as long
as there ar no enVars passed along with it.  Bug?

Tod

 
> -----Original Message-----
> From: Tod Thomas [mailto:tthomas@chubb.com]
> Sent: Wednesday, October 02, 2002 1:15 PM
> To: taglibs-user@jakarta.apache.org
> Subject: XTags Question - Please help
> 
> I posed this question a couple weeks ago and didn't' get a response.
> I'm relatively new to this and just want to make sure I understand
> conceptually how the XTags taglib is supposed to work.
> 
> What I'm getting from the docs is that I should be able to call a
> remote, XML streaming, cgi program (or static xml page) and have it
> transformed locally on the Tomcat server, rendering HTML to the client.
> 
> This works:
> 
> <xtags:style
>  xml="http://localhost/cgi-bin/test.cgi"
>  xsl="/xml/ldap.xsl"
>  outputMethod="html"/>
> 
> test.cgi performs a search and streams the results back as XML which
> transforms to HTML as expected.
> 
> This doesn't:
> 
> <xtags:style
> 
>
xml="http://localhost/cgi-bin/test2.cgi?base=directory&scope=sub&filter=cn=s
> mith"
>  xsl="/xml/ldap.xsl"
>  outputMethod="html"/>
> 
> Is there another way I should be passing the environment variables to
> test2.cgi rather than in the URL?  Should this even work?  Am I missing
> something?
> 
> Thanks - Tod.
> 
> --
> 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>

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


Mime
View raw message