Brian thank you for taking the time to respond.

The transformation servlet--was based initially on the servlet
samples/examples provided with Xalan-J--will accept parameters via the URL,
so I am not tied to the command-line method (which I use in XMLSpy). 
Currently, I do pass in this additional parameter, but it is annoying as the
information is already present in the complete URL.

Time permitting I will probably have to write a small class to extend
javax.servlet.

All the best.


Brian Minchau wrote:
> 
> 
> If you were running from the command line you could run this class:
>                                                                        
>  org.apache.xalan.xslt.Process                                         
>                                                                        
> 
> 
> 
> One of the possible options is -param, for example:
>       -param myParam  myValue
> (see http://xml.apache.org/xalan-j/commandline.html )
> 
> Then in your stylesheet:
> <xsl:param name="myParam"/>
> ...
> <xsl:value-of select="$myParam"/>
> ...
> 
> I'm not sure how to set parameters when invoked via a servlet, and for
> which you don't have the code.
> 
> - Brian
> 
> 
> 
>                                                                        
>              mountainbiker                                             
>              <mailing.list.tra                                         
>              [EMAIL PROTECTED]>                                            To
>                                        xalan-j-users@xml.apache.org    
>              05/07/2008 01:53                                           cc
>              AM                                                        
>                                                                    Subject
>                                        Need Xalan-J Java Extension to Get
>                                        URL                             
>                                                                        
>                                                                        
>                                                                        
>                                                                        
>                                                                        
>                                                                        
> 
> 
> 
> 
> 
> I am running a servlet under Tomcat.  The servlet is a "wrapper" for
> Xalan-J
> that transforms a given XML/XSL combo.  (I don't have access to this
> servlet
> source code.)
> 
> I have been successful in getting super basic Java calls working in my
> XSLs
> (such as string.toUpperCase or InetAddress.getLocalName).
> 
> My current requirement is for my XSLT to be able to know the complete URL
> of
> what called it.  For example, I want something like
> http://server1.abc.com/trans?xml=...&xsl=... or
> http://server2.abc.com/trans?xml=...&xsl=... that I can store into a
> variable.
> 
> The IP address and box name I can get via InetAddress.  It is the URL that
> I
> really need.
> --
> View this message in context:
> http://www.nabble.com/Need-Xalan-J-Java-Extension-to-Get-URL-tp17097858p17097858.html
> 
> Sent from the Xalan - J - Users mailing list archive at Nabble.com.
> 
> 
>  
>  
>  
> 

-- 
View this message in context: 
http://www.nabble.com/Need-Xalan-J-Java-Extension-to-Get-URL-tp17097858p17112406.html
Sent from the Xalan - J - Users mailing list archive at Nabble.com.

Reply via email to