[oXygen-user] validation problem for CODE element in docbook 5?

Radu Coravu
Thu Apr 1 08:02:02 CDT 2010

Hi Robert,

The error complains that the XML tag <meta> is not allowed in <code>. 
This is correct.
If you actually want to enter some random HTML fragment inside the 
<code> the fragment needs to be escaped like:

<para> <code> &lt;meta content=&quot;Home Page for Dick Solomon.&quot;
             name=&quot;description&quot; /&gt;

or surrounded in CDATA like:
<para> <code><![CDATA[ <meta content="Home Page for Dick Solomon."
             name="description" />]]>

so that it gets interpreted as plain text.


Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger

On 4/1/2010 3:38 PM, Robert Nagle wrote:
> Hi,
> I'm creating a docbook 5 document in the latest Oxygen, and got a
> strange validation error.
> Here is what I wrote:
>            <para>  <code>     <meta content="Home Page for Dick Solomon."
> name="description" />
>                  </code></para>
> Here is the error message I receive:
> SystemID: I:\My Documents\work-related\\quickguide.xml
> Engine name: Jing
> Severity: error
> Description: element "meta" not allowed anywhere; expected the element
> end-tag, text or element "alt", "anchor", "annotation", "biblioref",
> "classname", "exceptionname", "function", "indexterm", "initializer",
> "inlinemediaobject", "interfacename", "link", "methodname",
> "modifier", "olink", "ooclass", "ooexception", "oointerface",
> "parameter", "phrase", "remark", "replaceable", "returnvalue",
> "subscript", "superscript", "type", "varname" or "xref"
> Start location: 157:99
> It seems that the validator is trying to process the contents of the
> code element when in fact the code element allows text inside it
> http://www.docbook.org/tdg5/en/html/code.html
> Or am I missing something obvious?

More information about the oXygen-user mailing list