This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Passing XML in parameter for HREF in <xsl:attribute>
- To: xsl-list at lists dot mulberrytech dot com, Peter dot FLYNN at syntegra dot bt dot co dot uk
- Subject: Re: [xsl] Passing XML in parameter for HREF in <xsl:attribute>
- From: Cristobal Galiano Fernandez <c dot galiano at ua dot es>
- Date: Thu, 29 Mar 2001 15:13:39 +0200
- Organization: Universidad de Alicante
- References: <7B3DF58138A2D111A9420008C71EC42103C1A768@NC-EXCHANGE-01>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Peter:
You can use an hidden FORM to resolve the problem
Steps:
-Obtain the XML string
-Whith <A HREF="javascript:Xml2Server('<REQUEST id="12"><COMMAND
id="something"/></REQUEST>"></A>')
you call a Javascript function that do the rest
a) Update a hidden variable in the hidden FORM
b) Submit this hidden FORM to Server
Cheers
Excuse me my bad english
NB. read this paper,please ( http://skew.org/xml/misc/xml_vs_http/ )
<% ' 2001-03-08. Form2Xml-001.ASP
' 2001-03-22. Galiano Fdez, Cristóbal
' ----------------------------------------------------------------------
' -Convierte un formulario HTML en un texto XML
'-----------------------------------------------------------------------
%> <html>
<HEAD>
<TITLE>Formulario a XML </TITLE>
<SCRIPT LANGUAGE=JAVASCRIPT
src="/WWWComun/CGIs/JavaScript/Funciones/Propias/Form2Xml.JS">
</SCRIPT>
<SCRIPT LANGUAGE=JAVASCRIPT>
function Xml2Server(XML)
{ //alert ('XML='+XML);
document.Form2Server.XMLStr.value=XML;
document.Form2Server.submit();
}
</SCRIPT>
</HEAD>
<% HtmlBODY
%>
<HR>
<center>
<FONT SIZE=+2>Conversión de Formulario a texto XML</font>
<BR>
<FONT SIZE=+1> </font>
</CENTER>
<hr>
<TABLE ID=T1>
<TR><TD>
<A HREF="javascript:Xml2Server('<REQUEST id="12"><COMMAND
id="something"/></REQUEST>"></A>')
</TD></TR>
</TABLE>
<FORM NAME="Form2Server" ACTION="Form2Xml-001-Server.ASP" METHOD='POST'
TARGET="right">
<INPUT NAME="XMLStr" TYPE="hidden">
</FORM>
</BODY>
</HTML>
Peter.FLYNN@syntegra.bt.co.uk escribió:
> If I had some XML as defined.
>
> <REQUEST id="12">
> <COMMAND id="something"/>
> </REQUEST>
>
> I'm wanting to send simple XML via the URL in the HREF.
> e.g.
>
> <A HREF="myservlet?request=<REQUEST id="12"><COMMAND
> id="something"/></REQUEST>"></A>
>
> I've tried various techniques (using " etc) and the URL just isn't
> giving me the right output. To further add to the confusion, things such as
> the id and commands are retrieved from value-of.
>
> Has anyone else successfully passed XML via a parameter on the URL? Is it
> an unusual thing to do, as I've seen very little details on the Internet
> about this.
>
> Regards,
> Peter
>
> ******************************************************************************
>
> Check us out at http://www.syntegra.com
>
> ***********************************************************************
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list