OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: removing elements and attrs from <title>


I want to customize my DocBook schema by removing one element (<remark>) 
and one attribute (xml:id) from the <title> element.  I'm trying to 
follow the customization instructions for DocBook 5.0 
(http://www.docbook.org/tdg5/en/html/ch05.html#ch05-layers), but I'm 
apparently doing something wrong. I'm using the XML form of the RelaxNG 
schema, whereas the instructions show the RNC form; but I think I've 
done the conversion right.

I have the following:
   <include href="xxe-config:docbook5/rng/V5.0/docbook.rng">
     ...
     <define name="db.title">
       <!--Replace the DocBook standard db.title-->
       <element name="title">
         <ref name="db.MyTitle.attlist"/>
         <zeroOrMore>
           <ref name="db.MyTitle.inlines"/>
         </zeroOrMore>
       </element>
     </define>
   </include>

   <define name="db.MyTitle.attlist">...</define>
   <define name="db.MyTitle.inlines">...</define>

('xxe-config' in the first line points to a place in the file system)

The code for <define name="db.title"> is copied over from the DB5 schema 
included with XXE, except I substituted "db.MyTitle.attlist" for 
"db.title.attlist", and "db.MyTitle.inlines" for
"db.all.inlines" (and omitted the <a:documentation> element).

However, validation gives me the following error:
    overlapping element names in operands of "interleave"
pointing to line 1262 of the docbook.rng.  Line 1262 is the second line 
in this definition:
     <define name="db.titleonlyreq.info">
       <element name="info">
         <a:documentation>A wrapper for information about a component or 
other block with only a required title</a:documentation>
         <ref name="db.titleonlyreq.info.attlist"/>
         <interleave>
           <ref name="db._title.onlyreq"/>
           <zeroOrMore>
             <ref name="db.info.elements"/>
           </zeroOrMore>
         </interleave>
       </element>
     </define>
At this point, I get lost tracing things backwards.  I just don't see 
how db.titleonlyreq.info (or db.titleonlyreq.info.attlist) gets called 
from my re-definition of db.title, nor what the error is.

Commenting out parts of my modifications doesn't help, either; in fact, 
I still get the error msg if I reduce my modifications to this:
   <include href="xxe-config:docbook5/rng/V5.0/docbook.rng">
     ...
     <define name="db.title">
       <!--Replace the DocBook standard db.title-->
       <element name="title">
         <text/>
       </element>
     </define>
   </include>

What am I doing wrong?
-- 
	Mike Maxwell
	maxwell@umiacs.umd.edu
         "A library is the best possible imitation, by human beings,
         of a divine mind, where the whole universe is viewed and
         understood at the same time... we have invented libraries
         because we know that we do not have divine powers, but we
         try to do our best to imitate them." --Umberto Eco


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]