Problem with <info> for docbook 5

This should cover W3C XML Schema, Relax NG and DTD related problems.
glynbach
Posts: 1
Joined: Tue Sep 04, 2007 12:59 pm

Problem with <info> for docbook 5

Post by glynbach »

Hi

I am not very expeirenced with the docbook schema. But as I understand it in version 5 the <info> tag allows a child <title> tag. The autocomplete even lets me add it. However I get the error E[oNVDL] element "title" from namespace "http://docbook.org/ns/docbook" not allowed in this context.

The rngschema declaration I am using is:

<?oxygen RNGSchema="http://www.oasis-open.org/docbook/xml/5 ... bookxi.rng" type="xml"?>

The example context is

<article xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0">
<title>BB Administration Centre</title>
<subtitle>Administrator User Manual</subtitle>
<info>
<title>
BB Administration Centre
</title>
</info>

Could anybody tell me what I'm doing wrong here?
Thanks
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

The DocBook 5 schema allows to have a title inside info only if there is no title specified in article. To offer the exactly valid proposals for content completion one should take into account the whole document up to the insertion point. For performance reasons oXygen reduces that to the previous siblings, parent and ancestors of the element to be inserted, in the above example that means it looks only at info and article and it does not take into account info's previous siblings.
That works to provide the exact valid proposals in most of the cases. There are a few instances when we show a little more than the valid proposals as in your case but these are immediately signaled by the automatic validation as you noted.

Best Regards,
George
George Cristian Bina
Post Reply