XSLTGeneral questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .

That is <CreditCardNumber> inside CDATA, the script does not mask the data. Or in other words, everything that is contained inside CDATA, is ignored because it is not considered as an element or attribute by the xslt processor.

The only clean fix is to remove the CDATA section. CDATA says "the stuff in here is pure text, it does not contain markup". If it does contain markup, don't put it in CDATA.

If you can't fix the XML at source, then preprocess it to get rid of the CDATA that should never have been there in the first place. I would even contemplate doing this with a non-XML tool such as sed/awk.

the problem is that I cannot change the xml, we have to send it as it is to the client.

It is our internal reqirement that we log every request that is being sent out of our system, but incase, there is CC or any such information in the request xml, we're not supposed to store it, rather mask it first and then store.