[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CDATA sections
- From: Dawn Volkman <dawn@bus.net>
- To: XML-DEV <xml-dev@lists.xml.org>
- Date: Tue, 16 Jan 2001 11:24:43 -0500
Dear all,
I am thinking of using CDATA sections for snippets of perl code
that exist on the pages of my document. However, I didn't
want me or anyone creating my documents to have to type out <![CDATA[ and ]]>
everytime because it is tiresome and prone to errors. I thought that giving
these sections a more meaningful and shorter name would get rid of errors, so
I created entities -- but they don't work.
Perhaps what I am trying to do just can't be done, but any ideas or pointers
would be greatly appreciated. Thanks in advance.
snippets of my xml look like this:
<page>
Here is my page and I have some
&startcode;
code right here
&endcode;
that I will be using later
</page>
snippets of my dtd look like this:
<!ELEMENT page (#PCDATA)>
<!ENTITY startcode "<![CDATA[">
<!ENTITY endcode "]]>">