Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml/xsp/html

Status
Not open for further replies.

magnolia

Programmer
Aug 14, 2001
2
GB
hi,
please could you give me a hand with this.

need help
ok ive got this far, needed to create an HTML form with a text input field - which ive done
what i need to do - using xml&xsl, create an HTML form
that submits to the page that i created (the xml & xsl file
i created that generated an HTML page saying Hello World)
which will be modified to display any text entered by the user instead of Hello World.
i ran it it does not work, where am i going wrong?
my xml is not picking up what i type in the message field
any help please?
using apache webserver with cocoon


XML FILE

<?xml version=&quot;1.0&quot;?>
<?cocoon-process type=&quot;xsp&quot;?>
<?cocoon-process type=&quot;xslt&quot;?>
<?xml-stylesheet href=&quot;ref.xsl&quot; type=&quot;text/xsl&quot;?>

<xsp:page
xmlns:xsp=&quot; language=&quot;java&quot;
>
<xsp:logic>
String msg = &quot;Hello, world!&quot;;
</xsp:logic>

<title>
<xsp:expr>msg</xsp:expr>
</title>

</xsp:page>



xsl file

<?xml version=&quot;1.0&quot;?>
<xsl:stylesheet version=&quot;1.0&quot;
xmlns:xsl=&quot;
<xsl:template match=&quot;/&quot;>
<h1 style=&quot;color:green;&quot;><xsl:value-of select=&quot;//title&quot;/></h1>

</xsl:template>

</xsl:stylesheet>


HTML FILE

<html>
<head>
</head>
<body>
<form name=&quot;input&quot; action=&quot;/resweb/arif/ref.xml&quot;>
Message Text:
<input id=&quot;user&quot; type=&quot;text&quot; name=&quot;user&quot;>
<input type=&quot;submit&quot; value=&quot;Submit&quot;>
</form>
</body>
</html>


thanks
arif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top