3 Replies Latest reply on May 1, 2009 6:50 AM by HowardTreisman

    XSLT Issue with Apostrophes

    Ryan Lunka Level 3

      I have a service that reads information from a database and uses the Query Database for Multiple Rows to XML component.  The next step in the service is an XSLT that essentially removes all the type="VARCHAR" attributes that the component adds.

       

      We began running live data through and now the XSLT is erroring out because some of the values that get queried contain apostrophes and the XSL component won't read it correctly.  Is there anything I can do in the XSL Stylesheet to get allow it figure out that?

       

      Any suggestions?

       

      Thanks for any help!

        • 1. Re: XSLT Issue with Apostrophes
          HowardTreisman Level 1

          Hi Ryan

          It's very difficult to respond without more details, particularly the error that you're getting, and perhaps also a simple example of both the XML and the XSLT.

          Also, this seems to be more a generic XSLT issue, so you may get a better response from an XSLT-specific forum.

          Howard

          http://www.avoka.com

          • 2. Re: XSLT Issue with Apostrophes
            Ryan Lunka Level 3

            Sorry for the ambiguity.  It's difficult for me to respond with too much detail partially because of confidentiality and partially because I would probably have to write a book about it.  It seems the issue is that our system is allowing the entry of characters that are invalid in XML.  We are currently pursuing a solution that involved concatenating CDATA tags around the values in the SQL, so when the "Query for Multiple Rows as XML" service creates the XML file, those CDATA tags are already there.

             

            Thanks for the response!

             

            Ryan D. Lunka

            Adobe Enterprise Solutions Consultant

            Cardinal Solutions Group - Columbus, OH

            • 3. Re: XSLT Issue with Apostrophes
              HowardTreisman Level 1

              Hi Ryan

              You may want to preprocess the results to turn these characters into their XML "escaped" equivalents.

              e.g.      ' for '

              See http://www.xmlnews.org/docs/xml-basics.html

               

              We also have a SQPlus component that does what the Adobe component does, plus quite a bit more. We'd be happy to talk to you about adding a facility into that for automatically escaping non-allowed characters.

               

              If you'd like to explore this option, please contact me at htreisman-at-avoka.com

               

              Howard