On Sun, 6 Oct 2002 04:30:04 +0400 Yury Mikhienko <[EMAIL PROTECTED]> wrote:
> On Sat, 5 Oct 2002 17:26:10 -0700 (PDT) > apurva zaveri <[EMAIL PROTECTED]> wrote: > > > Using XSLT > > > > This is an XML file > > > > <?xml version="1.0"?> > > <page> > > <content> > > <form> > > <input type="text" name="userid" prompt="Please > > say or enter your Agent I D" /> > > </form> > > </content> > > </page> > > > > And this is the XSLT > > > > <?xml version="1.0"?> > > > > <xsl:stylesheet version="1.0" > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > xmlns:cinclude="http://apache.org/cocoon/include/1.0" > > > > > > > <xsl:template match="input"> > > <field name="{@name}" type="digits" > > prompt="{@prompt}"> > > <prompt><xsl:value-of > > select="@prompt"/></prompt> > > <error> > > <clear namelist="<xsl:value-of > > select="@name"/>"/> <!-- ofcourse this is wrong I > > want the value of {@name} in it How do I do it? --> > Try > <clear namelist="{@name}"/> > or > <clear> > <xsl:attribute name="namelist"><xsl:value-of >select="@name"/></xsl:attribute> > </clear> or, may be ;) <clear namelist="{../@name}"/> or <clear> <xsl:attribute name="namelist"><xsl:value-of select="../@name"/></xsl:attribute> </clear> > > > Please try again. > > <goto next="#login"/> > > </error> > > </field> > > </xsl:template> > > > > </xsl:stylesheet> > > > > output: > > > > > > <?xml version="1.0" encoding="UTF-8" ?> > > <field prompt="Please say or enter your Agent I D" > > type="digits" name="userid"> > > <prompt>Please say or enter your Agent I > > D</prompt> > > > > <error> > > <clear namelist=""/> Please try again. > > <goto next="#login" /> > > </error> > > </field> > > > > > > Expected output [What I want is]: > > > > <clear namelist="userid"/> Please try again. > > > > > > I tried <![CDATA[ ]]> unsucessfully, may be I dont > > know how to use it properly. > > > > Help. > > > > -Apurva > > > > __________________________________________________ > > Do you Yahoo!? > > Faith Hill - Exclusive Performances, Videos & More > > http://faith.yahoo.com > > > > --------------------------------------------------------------------- > > Please check that your question has not already been answered in the > > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > -- > > Best regards, > Yury Mikhienko. > IT engineer, ZAO "Mobicom-Kavkaz" > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> -- Best regards, Yury Mikhienko. IT engineer, ZAO "Mobicom-Kavkaz" --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>