dita-ot:nn() XPath functions

Post here questions and problems related to editing and publishing DITA content.
maglid
Posts: 75
Joined: Mon Sep 28, 2009 8:10 am

dita-ot:nn() XPath functions

Post by maglid »

In working on a DITA OT XSLT file in Oxygen 21.1, I saw many XPath functions in the XPath dropdown that have a "dita-ot:" prefix like these:

dita-ot:resolve-href-path()
dita-ot:capitalize(text)
dita-ot:get-closest-topic(n)
etc.

There are about 21 of these in the XPath function dropdown. What are these? I can't find any information about them in Oxygen help or with an internet search.

Thanks,
Mark
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: dita-ot:nn() XPath functions

Post by Radu »

Hi Mark,

There is an XSLT module file DITA-OT/plugins/org.dita.base/xsl/common/dita-utilities.xsl which defines these functions, it's probably directly or indirectly included in the hierarchy of XSLT stylesheets in which you are working.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
maglid
Posts: 75
Joined: Mon Sep 28, 2009 8:10 am

Re: dita-ot:nn() XPath functions

Post by maglid »

Aah, I see it in Oxygen's 3.x OT. But it's not in the 2.5 OT I am working with. I thought it was some Oxygen extension or something. There are no docs about this, either, in the OT docs at https://www.dita-ot.org/. Maybe I'll open a bug.

Thanks Radu!
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: dita-ot:nn() XPath functions

Post by Radu »

Hi,

The DITA OT 2.5 should also contain a "dita-utilities.xsl" but located in a different folder. You can use Oxygen's Find/Replace in Files to search for "dita-ot:capitalize" in the entire DITA OT folder, see where the function is defined.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
maglid
Posts: 75
Joined: Mon Sep 28, 2009 8:10 am

Re: dita-ot:nn() XPath functions

Post by maglid »

Oh I see it now, obviously I did a defective search. But I can't find dita-ot:capitalize. dita-ot:get-topic-id works. This also works for OT 2.1.

They're probably not documented because they are intended to be internal to the OT.

Thanks,
Mark
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: dita-ot:nn() XPath functions

Post by Radu »

Hi Mark,

There is also a dita-utilities.xsl in DITA OT 2.1 dita-ot-2.1.0/xsl/common/dita-utilities.xsl but it contains less available functions than newer DITA OT distributions.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply