Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

XSLT Issue with Apostrophes

Avatar

Former Community Member

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!

3 Replies

Avatar

Level 9

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

Avatar

Former Community Member

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

Avatar

Level 9

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