preventing processing of codeblock

Oxygen general issues.
sgrayson
Posts: 2
Joined: Tue Nov 02, 2010 9:09 pm

preventing processing of codeblock

Post by sgrayson »

How do I prevent Oxygen from processing XML code in a codeblock element? I want to be able to put anything in the codeblock, but currently Oxygen is requiring that I use escape characters for left bracket and ampersand.

Steven Grayson
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: preventing processing of codeblock

Post by george »

It is not a requirement of oXygen, it is an XML requirement. You cannot enter < and & directly in a text, you need to XML escape that. You can use a CDATA section and inside that you can enter < and & without escaping. So for example instead of

Code: Select all


<codeblock>Sample text containing < and &</codeblock>
you can write

Code: Select all


<codeblock><![CDATA[Sample text containing < and &]]></codeblock>
Hope that helps,
George
George Cristian Bina
sgrayson
Posts: 2
Joined: Tue Nov 02, 2010 9:09 pm

Re: preventing processing of codeblock

Post by sgrayson »

Thank you, George! That's exactly what I was looking for. I built the project as both pdf and html and the code can still be copied successfully without being pasted as a comment. I appreciate the help!

Steven Grayson
Post Reply