backquote in xsl file

Discussion in 'XML' started by Tony, May 5, 2004.

  1. Tony

    Tony Guest

    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}'>
     
    Tony, May 5, 2004
    #1
    1. Advertising

  2. Tony

    Peter Flynn Guest

    Tony wrote:
    > 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
     
    Peter Flynn, May 8, 2004
    #2
    1. Advertising

  3. Tony

    Tony Guest

    Peter Flynn <> wrote in message news:<>...
    > Tony wrote:
    > > 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



    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
     
    Tony, May 11, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    3,656
    A. Bolmarcich
    May 27, 2005
  2. Replies:
    3
    Views:
    110
    Joel VanderWerf
    Oct 24, 2006
  3. Felipe Navas
    Replies:
    4
    Views:
    126
    Rodrigo Bermejo
    Jan 6, 2007
  4. Julien Biard

    Escaping backquote in filenames

    Julien Biard, Jan 22, 2009, in forum: Ruby
    Replies:
    2
    Views:
    157
    Julien Biard
    Jan 22, 2009
  5. Vincent Lambert
    Replies:
    0
    Views:
    106
    Vincent Lambert
    Feb 25, 2009
Loading...

Share This Page