-
XML Dynamic Forms
I am trying to create dynamic form elements (actually, the only dynamic part
needs to be the NAME attribute) by selecting nodes from an XML file. I
keep getting the message that tells me i can't use the < symbol in an attribute.
The code i'm trying to use is
<input type="text" NAME=<xsl:value-of select="@ProductName"/>>
but it's not working. Is this possible? Can anyone advise?
Thanks in advance
-
Re: XML Dynamic Forms
this might work:
<input type="text">
<xsl:attribute name="name">
<value-of select="@ProductName">
</xsl:attribute>
</input>
"nrodigu" <justimagine@prodigy.net> wrote in message
news:39a18824$1@news.devx.com...
>
> I am trying to create dynamic form elements (actually, the only dynamic
part
> needs to be the NAME attribute) by selecting nodes from an XML file. I
> keep getting the message that tells me i can't use the < symbol in an
attribute.
> The code i'm trying to use is
>
> <input type="text" NAME=<xsl:value-of select="@ProductName"/>>
>
> but it's not working. Is this possible? Can anyone advise?
>
> Thanks in advance
>
-
Re: XML Dynamic Forms
This will work as well:
<input type="text" name="{@ProductName}"/>
"Mark Bower" <mark.bower@travelstore.com> wrote:
>this might work:
>
><input type="text">
> <xsl:attribute name="name">
> <value-of select="@ProductName">
> </xsl:attribute>
></input>
>
>
>"nrodigu" <justimagine@prodigy.net> wrote in message
>news:39a18824$1@news.devx.com...
>>
>> I am trying to create dynamic form elements (actually, the only dynamic
>part
>> needs to be the NAME attribute) by selecting nodes from an XML file.
I
>> keep getting the message that tells me i can't use the < symbol in an
>attribute.
>> The code i'm trying to use is
>>
>> <input type="text" NAME=<xsl:value-of select="@ProductName"/>>
>>
>> but it's not working. Is this possible? Can anyone advise?
>>
>> Thanks in advance
>>
>
>
-
Re: XML Dynamic Forms
trye to use something like this
<input type="text">
<xsl:attrebute name="NAME">
<xsl:value-of select="@ProductName"/>
</xsl:attrebute>
</input>
"nrodigu" <justimagine@prodigy.net> wrote:
>
>I am trying to create dynamic form elements (actually, the only dynamic
part
>needs to be the NAME attribute) by selecting nodes from an XML file. I
>keep getting the message that tells me i can't use the < symbol in an attribute.
>The code i'm trying to use is
>
><input type="text" NAME=<xsl:value-of select="@ProductName"/>>
>
>but it's not working. Is this possible? Can anyone advise?
>
>Thanks in advance
>
-
Re: XML Dynamic Forms
Hi,
I ran into this same problem may times. This is how I handle it in my xsl.
<xsl:element name='input'>
<xsl:attribute name='name'><xsl:value-of select='name' /><xsl:attribute>
<xsl:attribute name='type'>input</xsl:attribute>
</xsl:element>
You have to build the xsl element, in this case an input, and then add all
the attributes that are needed by the element. You can use this technique
to build any kind of element, including xsl elements to dynamically process
xml. The error you were getting is because xsl follows xml rules which says
that tag sets must be complete (<i><b>text</i></b> is not allowed).
"nrodigu" <justimagine@prodigy.net> wrote:
>
>I am trying to create dynamic form elements (actually, the only dynamic
part
>needs to be the NAME attribute) by selecting nodes from an XML file. I
>keep getting the message that tells me i can't use the < symbol in an attribute.
>The code i'm trying to use is
>
><input type="text" NAME=<xsl:value-of select="@ProductName"/>>
>
>but it's not working. Is this possible? Can anyone advise?
>
>Thanks in advance
>
-
Re: XML Dynamic Forms
Hi,
could u try this code:
<table>
<xsl:for-each order-by="+ name" select="name">
<tr>
<td><xsl:value-of select="name"/></td>
(if name is a attribute then use select="@name")
</tr>
</xsl:for-each>
</table>
all the above inside of the body tag.
"nrodigu" <justimagine@prodigy.net> wrote:
>
>I am trying to create dynamic form elements (actually, the only dynamic
part
>needs to be the NAME attribute) by selecting nodes from an XML file. I
>keep getting the message that tells me i can't use the < symbol in an attribute.
>The code i'm trying to use is
>
><input type="text" NAME=<xsl:value-of select="@ProductName"/>>
>
>but it's not working. Is this possible? Can anyone advise?
>
>Thanks in advance
>
-
Re: XML Dynamic Forms
<input type="text">
<xsl:attribute name="name"><value-of select="@ProductName"/></xsl:attribute>
</input>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|