[oXygen-user] validation problem for CODE element in docbook 5?
Robert Nagle
Thu Apr 1 08:15:25 CDT 2010
Radu, thanks.
I knew that some solution like this existed, but I could not find it
documented anywhere in the docbook documentation (or more precisely I
did not know how to find it).
Searching for CDATA, I found something in Docbook XSL's Chapter 27
http://www.sagehill.net/docbookxsl/ProgramListings.html
Robert Nagle
On Thu, Apr 1, 2010 at 8:02 AM, Radu Coravu <> wrote:
> 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> <meta content="Home Page for Dick Solomon."
> name="description" />
> </code></para>
>
> or surrounded in CDATA like:
> <para> <code><![CDATA[ <meta content="Home Page for Dick Solomon."
> name="description" />]]>
> </code></para>
>
> so that it gets interpreted as plain text.
>
> Regards,
> Radu
>
> --
> Radu Coravu
> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
> http://www.oxygenxml.com
>
>
> 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