backquote in xsl file

T

Tony

I'm working with a web application that uses xslt to diplay info
contained in a xml file. The xslt file also contains input fields
to be submitted to the database. When I have a backquote, `, in as
the first character of a field it seems to break the xslt.
For some reason it uses that backquote as ending quote for the value
field.

In the xsl file the input tag reads as follows:

<input type='text' name='fname' DisplayText='First Name' size='`0'
onChange='OnDataChange();' value='{@FIRST_NAME}'>
 
P

Peter Flynn

Tony said:
I'm working with a web application that uses xslt to diplay info
contained in a xml file. The xslt file also contains input fields
to be submitted to the database. When I have a backquote, `, in as
the first character of a field it seems to break the xslt.
For some reason it uses that backquote as ending quote for the value
field.

In the xsl file the input tag reads as follows:

<input type='text' name='fname' DisplayText='First Name' size='`0'
onChange='OnDataChange();' value='{@FIRST_NAME}'>

Are you using Microsoft Windows, and is your XSLT edit application
doing some unwarranted substitution on the ` character you type,
turning it into a ' character? What happens if you use the double
quote mark instead of the single quote mark for the attribute values?

///Peter
 
T

Tony

Peter Flynn said:
Are you using Microsoft Windows, and is your XSLT edit application
doing some unwarranted substitution on the ` character you type,
turning it into a ' character? What happens if you use the double
quote mark instead of the single quote mark for the attribute values?

///Peter


Yes, I'm using Windows. So I have a xsl file that combines with an xml
file that is presented to a user as an html form, through IE6. Only a part
of the form is shown at a time, using hide and unhide functionality
of DHTML. Basically the web page looks like a tabbed form.
So when a user enters a backquote, `, into a field of the form, in TAB 1
and then clicks TAB 2, then clicks back to TAB 1, the field where the backquote
was typed into no longer exists and instead the actual html code is displayed.
It appears as if the backquote is no longer considered the "value" of the
text box but part of the code. This only happens when the backquote
is the first value in the text box. When a backquote is in any other position
of the text box it is considered the value and therefore doesn't interfere
with the displaying of the code.
Is there a way to encapsulate the backquote or to tell the value field
that a backquote may be used and to use all input as the value only. Perhaps
a way to escape all values typed into that field?

-Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top