jeudi 9 juillet 2015

How can I get POST data from a static page into XSLT? chicken and egg?

Using XLST 2.0, I have a .html form, and on it an input like

<form method="post" action="perlscript.cgi" name="formname">
  .
  .
<input name="myvar" onchange="form.submit">

then later, I have

<xsl:if test="myvar=1">
  .
  .
</xsl:if>

I realize this ISN'T the way to do this because the XSLT doesn’t map the to the "myvar=1". I think it's probably seeking it from the XML namespace.

I googled XSLT POST , etc, but I don't see examples of this syntax.I immediately get a "Parsing an XSLT stylesheet failed" error with no line number.

If I comment out the and the , the form is OK , so I'm sure that's the problem.

So basically I need a way to either merge the XML and FORM namespaces, or a way to access the FORM data.

Aucun commentaire:

Enregistrer un commentaire