Subject: RE: Type of an <xsl:param> From: Edwin Glaser <edwin@xxxxxxxxxxxxxxx> Date: Fri, 14 Apr 2000 22:47:08 +0200 |
You wrote: > >Can I pass a java object (created by an extension function) to a > >template as a parameter? > > I believe that you can do this using SAXON, although I have never tried it. Can't see your problems, both of them work. ---------------------- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:rq="/javax.servlet.http.HttpServletRequest" extension-element-prefixes="rq"> <xsl:param name="servlet-request"/> <xsl:template match="/"> <xsl:call-template name="foo"> <xsl:with-param name="bar" select="$servlet-request"/> </xsl:call-template> </xsl:template> <xsl:template name="foo"> <xsl:param name="bar"/> <xsl:value-of select="rq:getServerName($bar)"/> </xsl:template> </xsl:stylesheet> ------------------------- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:java="http://xml.apache.org/xslt/java"> <xsl:param name="servlet-request"/> <xsl:template match="/"> <xsl:call-template name="foo"> <xsl:with-param name="bar" select="$servlet-request"/> </xsl:call-template> </xsl:template> <xsl:template name="foo"> <xsl:param name="bar"/> <xsl:value-of select="java:getServerName($bar)"/> </xsl:template> </xsl:stylesheet> -- Edwin Glaser -- edwin@xxxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Type of an <xsl:param>, Richard Bell | Thread | How to select a partial match rathe, Gus Calabrese |
RE: No side effects holy cow. ( Re:, Khun Yee Fung | Date | Re: Java API for XSLT, Kyle Downey |
Month |