[CITE-Forum] Exception when calling function with ampersand in argument

Luis Bermudez lbermudez at opengeospatial.org
Fri Oct 28 12:29:01 EDT 2011


Dear Janis

I know when we moved to JAVA 1.5 we made minor changes related to URL encodings. For example in revision 472 at
https://teamengine.svn.sourceforge.net/svnroot/teamengine/trunk/apps/engine/src/java/com/occamlab/te/Generator.java

we removed the second line (which corresponds to line 89 of the file) of the following:

 String encodedName = URLEncoder.encode(source.getAbsolutePath(), "UTF-8");
 encodedName = encodedName.replace('%', '~'); 

Anyway.. I think if you use '&' you will be OK.

What do others think ?

Luis
-------------
Luis Bermudez
lbermudez at opengeospatial.org  
+1 (301) 760-7323 

The OGC: Making Location Count...
http://www.opengeospatial.org/contact




On Oct 20, 2011, at 3:10 AM, Janis Blank wrote:

> Hi all,
> 
> I hope this is the right mailing list, or is there an active developer list for the TEAMEngine?
> I have noticed a problem with TEAMEngine 2.0b when calling a function with arguments that contain ampersands (&). This led to a SaxonAPIException issued by the call to build(src) at "NodeInfo paramsNode = core.getEngine().getBuilder().build(src).getUnderlyingNode();" in class com.occamlab.te.saxon.TEXSLFunctionCall. The src object containing the problematic parameters is build like this: Source src = new StreamSource(new CharArrayReader(xml.toCharArray()));.
> I could overcome this problem by simply adding the line xml = xml.replace("&", "&"); before the construction of src.
> I seem to remember though, that I already saw tests that had no problems with ampersands in function arguments at all. Can anybody reproduce this problem? Or is it just me again...
> 
> Regards
> Janis
> 
> -- 
> --------------------------------------
> 
> MSc. in CS Janis Blank
> blank at supportgis.de
> 
> --------------------------------------
> 
> CPA Systems GmbH
> Grantham-Allee 2-8
> D-53757 Sankt Augustin
> 
> Tel.: +49 (0) 2241 / 25 94 – 26
> Fax.: +49 (0) 2241 / 25 94 - 29
> 
> www.cpa-systems.de
> 
> --------------------------------------
> Handelsregister:
> HRB 9706, Amtsgericht Siegburg
> 
> Geschäftsführer:
> 
> Dr.-Ing. habil. Christoph Averdung
> Dr.-Ing. René Thiele
> Dr.-Ing. Matthias Ellsiepen
> 
> _______________________________________________
> CITE-Forum mailing list
> CITE-Forum at lists.opengeospatial.org
> https://lists.opengeospatial.org/mailman/listinfo/cite-forum



More information about the CITE-Forum mailing list