Is there a way besides wrapping each column with CDATA to tell cocoon
or the xml parser NOT to parse the ELEMENTS defined in the XML ?


All our data comes from the database and some of the columns at times may
have the special characters (e.g. & < >) so in order to resolve this issue
we
wrap the data within the <!CDATA[ ]]> tag. This however makes the XML string
MUCH larger than it needs to be because wrapping every column multipled by
the
number of rows produces alot of extra text.

My thought was to build a DTD for the data coming back from the database
telling the parser NOT to parse the content by defining the ELEMENT as a
CDATA
type or some type that will allow these characters.
Unfortunately CDATA cannot be used for ELEMENTs.


Question
-----------
<!DOCTYPE DATA  [
<!ELEMENT DATA  ANY >                    ---> Produces error because of &
]>
<DATA>
GRENADA C&W
</DATA>



<!DOCTYPE DATA  [
<!ELEMENT DATA  ???? >
]>
<DATA>
GRENADA C&W
</DATA>






---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to