Sign In/My Account | View Cart  
advertisement

Article:
 Controlling Whitespace, Part Two
Subject: CDATA
Date: 2001-12-07 19:21:19
From: Jay Singh

Bob,
These are good articles but I need a little more help. Does anyone know of a way to control carrige returns within a CDATA section? Is there a replace of a convert function that could replace a
tag within the CDATA section?


Thanks,
-JS


No Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • CDATA
    2002-02-13 14:06:19 Bob DuCharme

    Making something a CDATA section is a way of saying "don't treat this as a parsable XML, just pass it along as-is," so I avoid it wherever possible. The XSLT Recommendation offers tricks for adding things to the result tree as CDATA, but doesn't say anything that I could find about dealing with CDATA on the source tree. This didn't suprise me, if the reason for having CDATA is to tell a parser to leave it alone. If you want the parser to get the data and hand it to the XSLT processor in a way that you can get it and manipulate it, it's best to not have it be CDATA. Is this an option?


    Bob


Sponsored By: