I'm using DocBook 5 with the RELAX RG schema, which I found much easier to use than the DTD.

I'm sure that someone can point you to some real documentation, but basically I did this:

Created a transitive_docbook5.rng file containing this:

<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:db="http://docbook.org/ns/docbook";
         ns="http://docbook.org/ns/docbook";
         xmlns="http://relaxng.org/ns/structure/1.0";>
  <include href="docbook.rng"/>

  <define name = "dbx.longproductcode">
    <element name = "longproductcode"><empty/></element>
  </define>

  <define name="db.ubiq.inlines" combine="choice">
    <ref name="dbx.longproductcode"/>
  </define>

</grammar>

This is basically saying:
 "I'm a grammar that includes everything in docbook.rng"
 "And there's an element called 'longproductcode', which must be empty"
"And the 'longproductcode' element can appear anywhere that the 'db.ubiq.inlines' set can"

(the 'db.ubiq.inlines' set in the RNG schema includes elements like <remark> and <superscript>, and as a result, you'll be able to use your new tag pretty much anywhere).

I use XMLMind as my text editor, and by pointing it at my new schema, it now shows the <longproductcode> as available for insertion in all the appropriate places.

I'm sure that there's something equivalent that you can do for the DocBook 4 DTD.

Thanks,

Geraint North
Principal Engineer
Transitive
Maybrook House, 40 Blackfriars Street, Manchester M3 2EG, UK
Phone: (+44) 161-836-2315 Fax: (+44) 161-836-2399 Cell: (+44) 7980-708-215


On 19 Nov 2007, at 14:56, Hinrich Aue wrote:

That sounds good, We want to use a comfortable editor too.
Isn't there documentation on how to modify the DTD on sagehill?
Or How did you do that?

Hinrich

-----Ursprüngliche Nachricht-----
Von: Geraint North [mailto:[EMAIL PROTECTED]
Gesendet: Monday, November 19, 2007 2:50 PM
An: Jirka Kosek
Cc: Hinrich Aue; [email protected]
Betreff: Re: AW: [docbook] external entities in docbook

Yes, that would also seem to work (although I'm not sure how to write
an XSLT template for it).  The reason I added my own tags was so that
they appeared in the list of elements in the GUI, so that users could
easily see which ones were available.

Thanks,

Geraint North
Principal Engineer
Transitive
Maybrook House, 40 Blackfriars Street, Manchester M3 2EG, UK
Phone: (+44) 161-836-2315    Fax: (+44) 161-836-2399   Cell: (+44)
7980-708-215


On 19 Nov 2007, at 13:29, Jirka Kosek wrote:

Hinrich Aue wrote:
This sounds tempting. I'm using docbook 4.
I guess I have to adapt the DTD then, so the editor (Serna) doesn't
complain.

I think that better is not to modify DocBook schema (DTD) for such
purposes. Instead of <ProductName/> you can use
<phrase>ProductName</phrase> or <phrase role="ProductName"/>, ie.
leveraging existing DocBook element.

--
------------------------------------------------------------------
  Jirka Kosek      e-mail: [EMAIL PROTECTED]      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to