backquote in xsl file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tony

    #1

    backquote in xsl file

    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='Fi rst Name' size='`0'
    onChange='OnDat aChange();' value='{@FIRST_ NAME}'>
  • Peter Flynn

    #2
    Re: backquote in xsl file

    Tony wrote:[color=blue]
    > 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='Fi rst Name' size='`0'
    > onChange='OnDat aChange();' value='{@FIRST_ NAME}'>[/color]

    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

    Comment

    • Tony

      #3
      Re: backquote in xsl file

      Peter Flynn <peter@silmaril .ie> wrote in message news:<2g2jdlF3q hk1U2@uni-berlin.de>...[color=blue]
      > Tony wrote:[color=green]
      > > 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='Fi rst Name' size='`0'
      > > onChange='OnDat aChange();' value='{@FIRST_ NAME}'>[/color]
      >
      > 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[/color]


      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

      Comment

      Working...