Guest_imported
New member
- Jan 1, 1970
- 0
I've created a gerneralized database application, written as a Java servlet. It produces xml as output which is then parsed using an xsl styleshhet in order to return html to the client. It generates a number of different forms for different tables/functions in the database. I want to run the servlet on different servers and, hence, change the url of the form's action parameter to point to the particular server that generated the form.
My problem is dynamically setting the action url when the xml is parsed by SAX, called within my servlet, running on Tomcat.
The approaches I have tried are:
1) generating a special tag with the appropriate url and then trying to generate the html form tag through the xsl stylesheet by using an xsl:element and an xsl:value-of select that gets the url generated by the servlet. The error I get says that a template is not paired with an end element, whcih is not the case.
2) setting a global variable with the appropriate url for the action parameter and then referencing it in the form tag. The problem here is that the SAX parser wants to parse the url string in the xsl:variable statement, both when the string is n quotes and when slashes and colons are replaced by escape values.
Suggestions?
thanks,
john
My problem is dynamically setting the action url when the xml is parsed by SAX, called within my servlet, running on Tomcat.
The approaches I have tried are:
1) generating a special tag with the appropriate url and then trying to generate the html form tag through the xsl stylesheet by using an xsl:element and an xsl:value-of select that gets the url generated by the servlet. The error I get says that a template is not paired with an end element, whcih is not the case.
2) setting a global variable with the appropriate url for the action parameter and then referencing it in the form tag. The problem here is that the SAX parser wants to parse the url string in the xsl:variable statement, both when the string is n quotes and when slashes and colons are replaced by escape values.
Suggestions?
thanks,
john