[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] removing elements and attrs from <title>
Hi Mike, Interesting idea about removing xml:id from titles. Try the following: <include href="docbookxi.rng"> <define name="db.title.attlist"> <interleave> <optional> <ref name="db.title.role.attribute"/> </optional> <interleave> <ref name="db.common.base.attributes"/> <optional> <ref name="db.annotations.attribute"/> </optional> </interleave> <ref name="db.common.linking.attributes"/> </interleave> </define> </include> That seems to work...not sure if it's the best/easiest way. I just copied db.title.attlist into the include and then copied db.common.attributes replacing the <ref name="db.common.attributes"/> and then deleted the reference to db.xml.id.attribute from my copy of db.common.attributes. I think to remove remark you just add the following inside your <include>: <define name="db.remark"> <notAllowed/> </define> You might also check out: http://www.docbook.org/docs/howto David > -----Original Message----- > From: Mike Maxwell [mailto:maxwell@umiacs.umd.edu] > Sent: Wednesday, November 10, 2010 8:19 PM > To: DocBook Apps ML > Subject: [docbook-apps] 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 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]