Jump to content

leon_pegg

Members
  • Posts

    2
  • Joined

  • Last visited

leon_pegg's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I have an xml and xsl file of :-XML<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="test.xsl"?><page><form method="post"><textbox name="testbox" value="some text in the box">a textbox :</textbox><radiogroup group="grodup"><item value="one">1</item><item value="two">2</item></radiogroup><button name="submit" label="submit"/></form></page>XSL<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><html><body><xsl:apply-templates/></body></html></xsl:template><xsl:template match="form"><form method="{@method}" action="{@action}"><xsl:apply-templates/></form></xsl:template><xsl:template match="textbox"><label for="{@name}"><xsl:value-of select="."/></label><input type="text" id="{@name}" name="{@name}" value="{@value}" /><br/></xsl:template><xsl:template match="passbox"><label for="{@name}"><xsl:value-of select="."/></label><input type="text" id="{@name}" name="{@name}" /><br/></xsl:template><xsl:template match="radiogroup"><xsl:for-each select="item"><input type="radio" name="{../@group}" value="{@value}" ></input><xsl:value-of select="."/><br/></xsl:for-each></xsl:template><xsl:template match="button"><input type="submit" name="{@name}" value="{@label}"/></xsl:template></xsl:stylesheet>this produces a form but it wont let me post to it any ideas?I have solved my problem i changed the type to .phpand set the mimi type using php.
  2. i have this xml<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="test.xsl"?><form><radiogroup group="test"><item value="one">1</item><item value="two">2</item></radiogroup></form>and this xsl<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><html><body><form><xsl:apply-templates/><input type="submit" name="submit" value="submit"/></form></body></html></xsl:template><xsl:template match="radiogroup"><xsl:for-each select="item"><input type="radio" name="{@radiogroup/group}" value="{@value}" ><xsl:value-of select="radiogroup/item"/></input><br/></xsl:for-each></xsl:template></xsl:stylesheet>but for some reason it dose not work any ideasregards leon pegg
×
×
  • Create New...