RE: [docbook-apps] removing elements and attrs from </span></a></span> </h1> <p class="darkgray font13"> <span class="sender pipe"><a href="/search?l=docbook-apps@lists.oasis-open.org&q=from:%22Cramer%2C+David+W+%5C%28David%5C%29%22" rel="nofollow"><span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Cramer, David W (David)</span></span></a></span> <span class="date"><a href="/search?l=docbook-apps@lists.oasis-open.org&q=date:20101110" rel="nofollow">Wed, 10 Nov 2010 22:47:28 -0800</a></span> </p> </div> <div itemprop="articleBody" class="msgBody"> <!--X-Body-of-Message--> <pre>Hi Mike, Interesting idea about removing xml:id from titles. Try the following: </pre><pre> <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: <a rel="nofollow" href="http://www.docbook.org/docs/howto">http://www.docbook.org/docs/howto</a> David > -----Original Message----- > From: Mike Maxwell [<a rel="nofollow" href="mailto:maxw...@umiacs.umd.edu">mailto:maxw...@umiacs.umd.edu</a>] > 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 > (<a rel="nofollow" href="http://www.docbook.org/tdg5/en/html/ch05.html#ch05-layers">http://www.docbook.org/tdg5/en/html/ch05.html#ch05-layers</a>), 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 > maxw...@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-unsubscr...@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org </pre> </div> <div class="msgButtons margintopdouble"> <ul class="overflow"> <li class="msgButtonItems"><a class="button buttonleft " accesskey="p" href="msg15162.html">Previous message</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="c" href="thrd3.html#15163">View by thread</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="i" href="maillist.html#15163">View by date</a></li> <li class="msgButtonItems textalignright"><a class="button buttonright " accesskey="n" href="msg15176.html">Next message</a></li> </ul> </div> <a name="tslice"></a> <div class="tSliceList margintopdouble"> <ul class="icons monospace"> <li class="icons-email"><span class="subject"><a href="msg14657.html">[docbook-apps] footnotes in tables (docbook 4.5 an...</a></span> <span class="sender italic">Giuseppe Bonelli</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg14662.html">Re: [docbook-apps] footnotes in tables (docbo...</a></span> <span class="sender italic">Bob Stayton</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg14663.html">[docbook-apps] elements inside <remark...</a></span> <span class="sender italic">maxwell</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg14688.html">Re: [docbook-apps] elements inside &l...</a></span> <span class="sender italic">Bob Stayton</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg15162.html">[docbook-apps] removing elements ...</a></span> <span class="sender italic">Mike Maxwell</span></li> <li><ul> <li class="icons-email tSliceCur"><span class="subject">RE: [docbook-apps] removing ...</span> <span class="sender italic">Cramer, David W (David)</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg15176.html">Re: [docbook-apps] remov...</a></span> <span class="sender italic">Mike Maxwell</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg15177.html">RE: [docbook-apps] r...</a></span> <span class="sender italic">Cramer, David W (David)</span></li> </ul> </ul> </ul> </ul> </ul> </ul> </ul> </ul> </div> <div class="overflow msgActions margintopdouble"> <div class="msgReply" > <h2> Reply via email to </h2> <form method="POST" action="/mailto.php"> <input type="hidden" name="subject" value="RE: [docbook-apps] removing elements and attrs from <title>"> <input type="hidden" name="msgid" value="ACE3EA64E82B174DAC5D8B597AC668B65FF2FC29@USNAVSXCHMBSB2.ndc.alcatel-lucent.com"> <input type="hidden" name="relpath" value="docbook-apps@lists.oasis-open.org/msg15163.html"> <input type="submit" value=" Cramer, David W (David) "> </form> </div> </div> </div> <div class="aside" role="complementary"> <div class="logo"> <a href="/"><img src="/logo.png" width=247 height=88 alt="The Mail Archive"></a> </div> <form class="overflow" action="/search" method="get"> <input type="hidden" name="l" value="docbook-apps@lists.oasis-open.org"> <label class="hidden" for="q">Search the site</label> <input class="submittext" type="text" id="q" name="q" placeholder="Search docbook-apps"> <input class="submitbutton" name="submit" type="image" src="/submit.png" alt="Submit"> </form> <div class="nav margintop" id="nav" role="navigation"> <ul class="icons font16"> <li class="icons-home"><a href="/">The Mail Archive home</a></li> <li class="icons-list"><a href="/docbook-apps@lists.oasis-open.org/">docbook-apps - all messages</a></li> <li class="icons-about"><a href="/docbook-apps@lists.oasis-open.org/info.html">docbook-apps - about the list</a></li> <li class="icons-expand"><a href="/search?l=docbook-apps@lists.oasis-open.org&q=subject:%22RE%5C%3A+%5C%5Bdocbook%5C-apps%5C%5D+removing+elements+and+attrs+from+%3Ctitle%3E%22&o=newest&f=1" title="e" id="e">Expand</a></li> <li class="icons-prev"><a href="msg15162.html" title="p">Previous message</a></li> <li class="icons-next"><a href="msg15176.html" title="n">Next message</a></li> </ul> </div> <div class="listlogo margintopdouble"> </div> <div class="margintopdouble"> </div> </div> </div> <div class="footer" role="contentinfo"> <ul> <li><a href="/">The Mail Archive home</a></li> <li><a href="/faq.html#newlist">Add your mailing list</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/faq.html#support">Support</a></li> <li><a href="/faq.html#privacy">Privacy</a></li> <li class="darkgray">ACE3EA64E82B174DAC5D8B597AC668B65FF2FC29@USNAVSXCHMBSB2.ndc.alcatel-lucent.com</li> </ul> </div> </body> </html> <script>(function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'9d477f9a6d09cf6a',t:'MTc3MjE5MzM4MQ=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script>