Page 1 of 1
dita-ot:nn() XPath functions
Posted: Sat Mar 28, 2020 7:25 am
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
Re: dita-ot:nn() XPath functions
Posted: Mon Mar 30, 2020 7:18 am
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
Re: dita-ot:nn() XPath functions
Posted: Mon Mar 30, 2020 7:36 am
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!
Re: dita-ot:nn() XPath functions
Posted: Mon Mar 30, 2020 7:39 am
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
Re: dita-ot:nn() XPath functions
Posted: Mon Mar 30, 2020 8:45 am
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
Re: dita-ot:nn() XPath functions
Posted: Mon Mar 30, 2020 9:28 am
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