Better support for DocBook

Are you missing a feature? Request its implementation here.
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

Better support for DocBook

Post by Zby »

Hi all,

I guess this can be useful for those who use Oxygen to author in DocBook XML.
Some DocBook tags require specifying an ID to cross-reference to a part of a document. Oxygen does not support IDs, that is, the editor does not give hints on the IDs defined across the source files within the project.

I would love it if Oxygen could display a pop-up menu with the list of IDs, in the same manner as it does for entities. I realize it requires some investigation and parsing the source files but this could be done somehow in the background.

If this feature was implemented, it would be a big step forward in supporting DocBook XML. A similar functionality is present in XMetaL supporting DITA.

Thanks,

-Zby
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

It is already implemented and it will be available in the next release of <oXygen/>. The IDs present in the edited document are collected dynamically and offered in the tag insight window for IDREF and IDREFS attribute values.

Regards,
Sorin
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

Post by Zby »

This is cool! Thanks.
I just want to understand it well. Does your explanation mean that if I use <OLINK> tag and define TARGETPTR, I will see a window with the list of IDs? I hope this window will open up wherever the attribute value is an ID.

Tks,
-Zby
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

The IDs are offered only for attribute values that must contain IDs. For example the linkmode attribute of olink. The targetptr attribute is of type CDATA.

Regards,
Sorin
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

Post by Zby »

Well, for me, better support means not only following the formal rules but also adding some intelligence. In other words, not only syntax matters, semantics is as much important. So, since every DocBook user knows that, for example, olink may require targetptr, and the value of targetptr is always an ID, despite its data type is CDATA, I would expect Oxygen suggesting the list of IDs in this case.
Of course, ideally the editor should help with other tags and their attributes in a smart way, for all XML-based applications.

Another issue that falls into this topic is to have an opportunity to invoke online help for a DocBook element from the pop-up tooltips, which can be displayed permanently by pressing F2. It could be a direct link to the DocBook reference manual or a help page with some extra explanation, examples etc.

Regards,
-Zby
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

The targetptr value is an ID from other document. Offering IDs from other documents in the tag insight window requires special support for the DocBook olink target database. Currently only IDs from the same document are collected and offered on tag insight.

The tooltips of DocBook elements present the DocBook DTD annotations. They are displayed permanently in the Model view which presents the content model and annotation when the caret is positioned inside the element. A link to the reference manual must first be added to the annotation inside DocBook DTD, probably as a response to a RFE posted by a user and then <oXygen/> can render it as a clickable link.

Regards,
Sorin
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

Post by Zby »

Hi Sorin,

this is it! You are absolutely right, collecting and offering IDs from all documents within a project, or from all files used to generate the target database is the approach I meant. I guess finding all ID within the active document does not require code enhancement. Can IDs be found using an XPath expression?
BTW, I did not mean you should treat olink in a special way. I was trying to indicate the possible direction for improvements.

Thanks for explanation regarding the tooltips. Seems I should submit such an RFE.

Thanks,

-Zby
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Zby wrote:[...]Can IDs be found using an XPath expression? [...]
Yes, if you know how the IDs are defined. For instance you can use //@xml:id to get all the IDs defined using the xml:id attribute.

Best Regards,
George
Post Reply