Date   

Re: Custom dita-ot plugins directory in configuration.properties #DITA-OT

Nicolas Delobel
 

Thanks Pierre,

Indeed, it's linked to Oxygen (see topic about this issue on oXygen forum: https://www.oxygenxml.com/forum/post60146.html?hilit=configuration.properties#p60146)
It seems to be corrected on Oxygen 23. I didn't test yet.

When I run the transformation outside of oXygen with dita-ot command line, it works.

Nicolas


Re: ResolvedValues log file? was Allow variables to be referenced from @scope="peer" maps

David Hollis
 

Hi Eliot,

The DITA-OT obviously has to resolve all the reuse mechanisms, and related content.

How feasible would it be to tap into this process, and for the DITA-OT to produce a log file of all the resolved content? Maybe as part of a build, or as its own build.

Something like:

map id: topic id: element name: scope or branch: keys or ditaval: resolved content

Many thanks,
David

This is an example of where a local, targeted solution is relatively easy (just a bit of preprocessing or relying on knowledge of cases that won't occur in your content) but the general solution would be hard (because it has to handle all cases, perform well, be extensible, report exception conditions clearly, etc.).

It's not hard to implement simple processes that operate on maps and do specific things, either using the output of the OT preprocessing stage or just operating on the maps directly if you know you don't need to worry about stuff like filtering, metadata propagation, etc.

The DITA Community utilities area on github has general XSLT scripts for operating on maps, including resolving key references and resolving topicrefs to topics. With that code as a base it should be as easy as it can be to extract topic titles or book titles.https://github.com/dita-community/dita-utilities/tree/master/src/xslt

Then, as you say, it's a matter of optimizing performance: do you do the processing every time or cache results? If you cache results, how do you keep the cache up to date?

Cheers,

E.

--
Eliot Kimber
http://contrext.com


Re: Custom dita-ot plugins directory in configuration.properties #DITA-OT

Pierre Attar
 

This seems to be related to java version used by 3.6 which is different from the one used by oXygen.

Pierre


Le 1 février 2021 11:49:02 GMT+01:00, Nicolas Delobel <nicolas.delobel@...> a écrit :
Hello all,

I developed custom plugins and stored them in a specific directory: c:/myplugins

Following https://www.dita-ot.org/dev/parameters/configuration-properties-file.html I added following line in configuration.properties (dita-ot 3.6):
plugindirs = plugins;demo;C:/myplugins;

When I run dita-ot integrator, I have following messages so it's OK:
integrate:
[integrate] Added com.myplugin1.pdf
[integrate] Added com.myplugin2.pdf
[integrate] Added com.myplugin3.pdf
...

But when I try to use one of these plugins I immediately have:
BUILD FAILED
C:\myproject\dita-ot-3.6\build.xml:19: The following error occurred while executing this line:
C:\myproject\dita-ot-3.6\plugins\org.dita.base\build.xml:36: The following error occurred while executing this line:
C:\myproject\dita-ot-3.6\plugins\org.dita.base\build_init.xml:23: taskdef class org.dita.dost.ant.InitializeProjectTask cannot be found
 using the classloader AntClassLoader[]

Did you already have this kind of issue?

Thanks.

Nicolas

--
Envoyé de mon appareil mobile


Custom dita-ot plugins directory in configuration.properties #DITA-OT

Nicolas Delobel
 

Hello all,

I developed custom plugins and stored them in a specific directory: c:/myplugins

Following https://www.dita-ot.org/dev/parameters/configuration-properties-file.html I added following line in configuration.properties (dita-ot 3.6):
plugindirs = plugins;demo;C:/myplugins;

When I run dita-ot integrator, I have following messages so it's OK:
integrate:
[integrate] Added com.myplugin1.pdf
[integrate] Added com.myplugin2.pdf
[integrate] Added com.myplugin3.pdf
...

But when I try to use one of these plugins I immediately have:
BUILD FAILED
C:\myproject\dita-ot-3.6\build.xml:19: The following error occurred while executing this line:
C:\myproject\dita-ot-3.6\plugins\org.dita.base\build.xml:36: The following error occurred while executing this line:
C:\myproject\dita-ot-3.6\plugins\org.dita.base\build_init.xml:23: taskdef class org.dita.dost.ant.InitializeProjectTask cannot be found
 using the classloader AntClassLoader[]

Did you already have this kind of issue?

Thanks.

Nicolas


[ann][webinar] Working with DITA in Oxygen - Advanced Profiling and Reuse Strategies (3 February) #Oxygen

alin_belu@...
 

Hello, 
 
If becoming advanced in profiling and reusing DITA content is one of this year’s resolutions, then you're in luck!  
 
Next Wednesday (February 3), make time for the third installment of the “Working with DITA in Oxygen” webinar series. In this live event titled “Advanced Profiling and Reuse Strategies”, Sorin Carbunaru (software developer at Syncro Soft) returns to help you achieve mastery in more advanced DITA concepts, such as: 
* Conref ranges – easily create content references to ranges of adjacent (sibling) elements. 
* Conref push - an alternate way of creating content references by injecting element values from the source element into a topic where it is to be re-used. 
* Subject scheme maps - create custom controlled values and manage metadata attribute values for an organization or a project without having to write a DITA specialization. 
* Profiling attribute groups - used to support situations where an attribute applies to multiple specialized subcategories. 
* Key scopes - specify different sets of key definitions for different map branches. 
* Branch filtering - set filtering conditions for specific branches of a map. 
 
This is a free event and you can register at http://www.oxygenxml.com/evs2021-3.html 
 
Make sure to check the full list of our upcoming events: https://www.oxygenxml.com/events_programme.html  
 
Best regards,
Alin
--
Alin Belu
Oxygen XML Editor


Re: PHP microservice using dita #HTML5

despopoulos_chriss
 

As a different solution (not necessarily better), we do the DITA to HTML transform in the browser.  (This is also what Michael Kay does with DocBook, in his own way for his own docs.)  We support a subset of DITA that is roughly equivalent to LwDITA, but it's all a matter of what you support in the XSLT.  The one thorny issue is that we have to do a one-step transform...  No pre/post passes. This has proved to be a problem with conrefs to things like table rows. 

The good news is that it's very light-weight.  On the server side, it's essentially a static site.  It also seems to be quicker than calling the OT.  In my ignorant innocence, I tried transforming single topics via the OT before turning to client-side transforms.  Because of the multiple passes, the performance seemed sluggish.  It could just be that I don't know the optimal way to invoke the OT. 

Other good news is that we can integrate into our HTML GUI.  So we use the same code to present microcontent in the GUI. 

See it here:
https://docs.turbonomic.com/docApp/doc/index.html?config=8.0.json


Re: PHP microservice using dita #HTML5

Jingjun Long
 

hi Jack,

I assume there will be multiple requests from Web browser to render XML to HTML output. I.e.: there will be multiple instances of converting XML to HTML running concurrently. I think your approach (Create a web service in Java to call Data-OT)  is a good approach.  

To call DITA-OT from Java program is documented here: https://www.dita-ot.org/dev/reference/java-api.html

Can you show the detail error message you got?

J.J. 


On Jan 27, 2021, at 3:41 PM, jack10086007@... wrote:

Hi Don,

Thank you so much for your reply!

Yes, it is currently just a single topic/concept, not even require formatting.

What I have tried so far:

1. Created a controller through the maven project, and inside PHP fetched that endpoint. However, I failed to use Java API as shown on the doc. Error message was 'Transtype xhtml not supported'.

2. Then, I was currently trying to wrap everything inside docker but was blocked by setting up JAVA HOME environment variable.

 

May I please ask if you have any better solutions? Thank you very much and wish you could have a lovely night!

Cheers,
Jack



Re: PHP microservice using dita #HTML5

Radu Coravu
 

Hi Jack,

I also replied to you on Slack, about using the Java API to start the DITA OT:

There is more information about making this work here:
https://github.com/dita-ot/dita-ot/issues/3647
The “dost.jar” is useful for compiling your Java code but for running you need an entire DITA OT distribution

If I were you I would maybe consider running the DITA OT command line directly as an external process from the PHP script. So you would need a DITA OT downloaded and available on the server side.

Or as another alternative you can create a Java wrapper which starts the DITA OT as a separate process and create a service wrapper around it.

Regards,

Radu

Radu Coravu
Oxygen XML Editor
On 1/27/21 09:41, jack10086007@... wrote:

Hi Don,

Thank you so much for your reply!

Yes, it is currently just a single topic/concept, not even require formatting.

What I have tried so far:

1. Created a controller through the maven project, and inside PHP fetched that endpoint. However, I failed to use Java API as shown on the doc. Error message was 'Transtype xhtml not supported'.

2. Then, I was currently trying to wrap everything inside docker but was blocked by setting up JAVA HOME environment variable.

 

May I please ask if you have any better solutions? Thank you very much and wish you could have a lovely night!

Cheers,
Jack


  


Re: PHP microservice using dita #HTML5

jack10086007@...
 

Hi Don,

Thank you so much for your reply!

Yes, it is currently just a single topic/concept, not even require formatting.

What I have tried so far:

1. Created a controller through the maven project, and inside PHP fetched that endpoint. However, I failed to use Java API as shown on the doc. Error message was 'Transtype xhtml not supported'.

2. Then, I was currently trying to wrap everything inside docker but was blocked by setting up JAVA HOME environment variable.

 

May I please ask if you have any better solutions? Thank you very much and wish you could have a lovely night!

Cheers,
Jack


Re: PHP microservice using dita #HTML5

Don Day
 

I assume you are talking about rendering single topics on demand rather than initiating the usual map-driven build and thereafter serving HTML files statically out of a built folder. Converting single topics on demand using PHP is necessarily short of that full normal build view, but some degree of dynamically customized output is possible. What are the goals of your project, and how closely do you require a fully contemporary DITA output result?

--
Don Day

On 1/26/2021 2:40 AM, jack10086007@... wrote:
Hi,

I am currently working on a project, which is to use PHP to call a method which is to convert existing dita file to html5. May I get any suggestions? Thank you!

Cheers,
Jack



Avast logo

This email has been checked for viruses by Avast antivirus software.
www.avast.com



PHP microservice using dita #HTML5

jack10086007@...
 

Hi,

I am currently working on a project, which is to use PHP to call a method which is to convert existing dita file to html5. May I get any suggestions? Thank you!

Cheers,
Jack


Re: PDF production with SVG having hot spots

Dan Caprioara
 

If you can switch from XSL-FO to CSS, please note that Oxygen XML Editor includes a DITA-OT plugin that outputs PDF based on a CSS customization (not XSL-FO) and it supports image map rendering and links in SVG images:

https://www.oxygenxml.com/doc/ug-ope/topics/dcpp_images.html#dcpp_how_to_use_image_maps

Many regards,

Dan

On 1/25/2021 1:28 PM, Pierre Attar wrote:
Hi,

I have a technical documentation with a lot of SVG files having hot spots.
Hotspots are managed using a javascript function call on g/@onmouseover attributes.
The function itself changes some opacity attributes of the graphic.
The HTML production works fine and all hotspots are active.

Using the same SVG, with the standard DITA-OT PDF (XSL-FO) plugin, the hotspots are no more active and all images are flats.

So, does someone foud a solution, a workaround, for keeping these kind SVG hotspots actives ?
Is there an other way to code SVG for being able to make them interactive both on PDF and HTML ?

Thanks for sharing any idea, solution,

Pierre





Re: Allow variables to be referenced from @scope="peer" maps

ekimber@contrext.com
 

This is an example of where a local, targeted solution is relatively easy (just a bit of preprocessing or relying on knowledge of cases that won't occur in your content) but the general solution would be hard (because it has to handle all cases, perform well, be extensible, report exception conditions clearly, etc.).

It's not hard to implement simple processes that operate on maps and do specific things, either using the output of the OT preprocessing stage or just operating on the maps directly if you know you don't need to worry about stuff like filtering, metadata propagation, etc.

The DITA Community utilities area on github has general XSLT scripts for operating on maps, including resolving key references and resolving topicrefs to topics. With that code as a base it should be as easy as it can be to extract topic titles or book titles. https://github.com/dita-community/dita-utilities/tree/master/src/xslt

Then, as you say, it's a matter of optimizing performance: do you do the processing every time or cache results? If you cache results, how do you keep the cache up to date?

Cheers,

E.

--
Eliot Kimber
http://contrext.com


On 1/25/21, 8:06 AM, "Chris Papademetrious" <main@dita-users.groups.io on behalf of chrispitude@gmail.com> wrote:

Hi Eliot, David,

Thanks to both of you for sharing your thoughts!

Some background information... We use cross-book links in our content. On the authoring side, we have a compiled Perl script (accessible as an external tool in Oxygen) that populates cross-book link target text in the DITA source files. On the production side, we use a variant of the following plugin to late-resolve links in the final HTML output:

https://github.com/chrispy-snps/DITA-fix-xbook-html-links

Thus, many of our books already reference other books as peer maps.

A writer asked me how to get the title of a referenced book so she could get the title of a peer-referenced book, something like this:

<p>See <ph keyref="bookB.BookTitle"/> for more information.</p>

I thought it would be neat to define a BookTitle variable in every book, even using its value as the <bookmap> title so the title is single-sourced everywhere from the variable. Clever me! But this is when I found out that variables in peer maps are not accessible.

Could I solve this by defining every book title in a shared "booktitles" map, then referencing that map from every book? Well sure I guess, but yuck. Every book has a title, I just want to get to it.

Right now DITA offers


* @scope="peer" maprefs (ignores map+topic content)
* @scope="local" maprefs (processes map+topic content)


Functionally, I want something between these. I want to process a peer book's map structure but not its topic content, with the exception of preserving topic <title> elements to enable processing to populate cross-book link target text.

This would elegantly solve some challenges we have with cross-book links to topics with conditional-content titles, as then the DITA-OT profiling behaviors simply play out in the peer maps and resolve the content for us. Currently our Perl script flags these for human intervention. It would also avoid issues with stale target text because the target topic title changed but the referencing-topic writer didn't know to rerun the Perl script.

Would this increase processing time? Sure, but I'd gladly exchange that for the flow simplification. And if I can figure out how to ignore <body> elements during peer-map topic read-in, the vast bulk of the peer map content would never even make it into memory; we'd basically just have skeleton peer maps available to resolve references, and the processing overhead should be minimal.

I'm going to try hacking my way through this to see how far I get. I will definitely follow up here with my progress, and I will likely follow up with questions. :)

- Chris


Re: Allow variables to be referenced from @scope="peer" maps

Chris Papademetrious
 

Hi Eliot, David,

Thanks to both of you for sharing your thoughts!

Some background information... We use cross-book links in our content. On the authoring side, we have a compiled Perl script (accessible as an external tool in Oxygen) that populates cross-book link target text in the DITA source files. On the production side, we use a variant of the following plugin to late-resolve links in the final HTML output:

https://github.com/chrispy-snps/DITA-fix-xbook-html-links

Thus, many of our books already reference other books as peer maps.

A writer asked me how to get the title of a referenced book so she could get the title of a peer-referenced book, something like this:

<p>See <ph keyref="bookB.BookTitle"/> for more information.</p>

I thought it would be neat to define a BookTitle variable in every book, even using its value as the <bookmap> title so the title is single-sourced everywhere from the variable. Clever me! But this is when I found out that variables in peer maps are not accessible.

Could I solve this by defining every book title in a shared "booktitles" map, then referencing that map from every book? Well sure I guess, but yuck. Every book has a title, I just want to get to it.

Right now DITA offers

  • @scope="peer" maprefs (ignores map+topic content)
  • @scope="local" maprefs (processes map+topic content)

Functionally, I want something between these. I want to process a peer book's map structure but not its topic content, with the exception of preserving topic <title> elements to enable processing to populate cross-book link target text.

This would elegantly solve some challenges we have with cross-book links to topics with conditional-content titles, as then the DITA-OT profiling behaviors simply play out in the peer maps and resolve the content for us. Currently our Perl script flags these for human intervention. It would also avoid issues with stale target text because the target topic title changed but the referencing-topic writer didn't know to rerun the Perl script.

Would this increase processing time? Sure, but I'd gladly exchange that for the flow simplification. And if I can figure out how to ignore <body> elements during peer-map topic read-in, the vast bulk of the peer map content would never even make it into memory; we'd basically just have skeleton peer maps available to resolve references, and the processing overhead should be minimal.

I'm going to try hacking my way through this to see how far I get. I will definitely follow up here with my progress, and I will likely follow up with questions. :)

 - Chris


Re: PDF production with SVG having hot spots

Radu Coravu
 

Hi Pierre,

I also don't think there is a way to have the PDF interpret Javascript code inside SVG images.
Maybe you can pre-process the SVG images at publishing time and convert the Javascript code to actual svg circle or rectangle elements which would render the hotspots over the content (but they would always be there, they would not appear when hovering over the image and disappear afterwards.
Nicolas Delobel from Amplexor created support to render DITA image maps in PDF using an SVG layer over the original binary image:

https://github.com/Amplexor/com.amplexor.imagemap-pdf

Regards,
Radu

Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

On 1/25/2021 3:27 PM, David Hollis wrote:
Hi Pierre,
Are you sure that the PDF format properly renders a SVG file with a hot spot, and that the Reader displays it as a hot spot?
David

Hi,

I have a technical documentation with a lot of SVG files having hot spots.
Hotspots are managed using a javascript function call on g/@onmouseover attributes.
The function itself changes some opacity attributes of the graphic.
The HTML production works fine and all hotspots are active.

Using the same SVG, with the standard DITA-OT PDF (XSL-FO) plugin, the hotspots are no more active and all images are flats.

So, does someone foud a solution, a workaround, for keeping these kind SVG hotspots actives ?
Is there an other way to code SVG for being able to make them interactive both on PDF and HTML ?

Thanks for sharing any idea, solution,

Pierre


Re: PDF production with SVG having hot spots

David Hollis
 

Hi Pierre,

Are you sure that the PDF format properly renders a SVG file with a hot spot, and that the Reader displays it as a hot spot?

David

Hi,

I have a technical documentation with a lot of SVG files having hot spots.
Hotspots are managed using a javascript function call on g/@onmouseover attributes.
The function itself changes some opacity attributes of the graphic.
The HTML production works fine and all hotspots are active.

Using the same SVG, with the standard DITA-OT PDF (XSL-FO) plugin, the hotspots are no more active and all images are flats.

So, does someone foud a solution, a workaround, for keeping these kind SVG hotspots actives ?
Is there an other way to code SVG for being able to make them interactive both on PDF and HTML ?

Thanks for sharing any idea, solution,

Pierre


Re: Hide a topic from PDF output at xsl level

Radu Coravu
 

Hi Balázs,

You seemed to find a solution for your problem on stackoverflow:

https://stackoverflow.com/questions/65668373/hide-a-topic-from-pdf-output-at-xsl-level

Do you have any problems with the solution you found or do you want to see if there are alternative solutions?

Regards,

Radu

Radu Coravu
Oxygen XML Editor
On 1/12/21 10:46, marczisbalazs@... wrote:

Hi All,

I have a topic, which only contains some metadata (childs of prolog and some custom elements too) of the documentation. The contents of these elements is displayed in headers and footers in the acutal PDF output.

My problem: now the referred topic itself included in the pdf as an empty chapter.


Setting the processing-role to resource-only or filtering the topic does not solve the problem, as the content of the elements is needed in the further steps of the transformation (headers, footerst ect..)


My best guess is to somehow exclude this one topic and the needless page sequence based on its ID with..


.. adding some attributes in a custom xsl template?

.. modification of topic processing?

.. an obvious method that didn’t occur to me?


I’m a beginner, so a little guidance would be nice.


Currently using: DITA-OT 2.1; Oxygen 17.1; Bookmap spec.; XSL FO based transformations;


Thanks in advance!


  


Hide a topic from PDF output at xsl level

marczisbalazs@...
 

Hi All,

I have a topic, which only contains some metadata (childs of prolog and some custom elements too) of the documentation. The contents of these elements is displayed in headers and footers in the acutal PDF output.

My problem: now the referred topic itself included in the pdf as an empty chapter.


Setting the processing-role to resource-only or filtering the topic does not solve the problem, as the content of the elements is needed in the further steps of the transformation (headers, footerst ect..)


My best guess is to somehow exclude this one topic and the needless page sequence based on its ID with..


.. adding some attributes in a custom xsl template?

.. modification of topic processing?

.. an obvious method that didn’t occur to me?


I’m a beginner, so a little guidance would be nice.


Currently using: DITA-OT 2.1; Oxygen 17.1; Bookmap spec.; XSL FO based transformations;


Thanks in advance!


Re: links within a chunked map?

Irina Barinova
 

Hello Tonia,

Could you please provide a bit more information?
Which tools are you using?
How did you customize xrefs and coded your mini-toc? 

Best regards,
Iryna Barinova 
Intelliarts.com

On Thu, Jan 21, 2021 at 5:24 AM Tonia <sharpwriter@...> wrote:
Hi all,
I'm having an issue with chunking a map and the internal links not working.

I have a map that I want to generate to one HTML file, and that is working. However, I coded a mini-toc for navigation (because the child topics don't show up in the main toc, by my design).  The xref links are breaking in the generated HTML and are just dead.

Part of me thinks this makes sense because the file hasn't been generated as a separate HTML file that can be linked to, but is there a workaround for this?

I hope I'm explaining it well enough.

Here's a copy of my map:

<map><title>Recycle Bin</title>
   
    <topicref href="../topics/c-recycle-bin.dita" chunk="to-content">
        <topicref href="../topics/c-bulk-actions-recycle-bin.dita" toc="no"/>
        <topicref href="../topics/t-filter-recycle-bin.dita" toc="no"/>
        <topicref href="../topics/t-modify-columns-recycle-bin.dita" toc="no"/>
    </topicref>
</map>

And within the c-recycle-bin.dita file, I have a list of links like this:

  <p>This section includes the following topics:</p>
    <ul id="ul_qsm_cw5_j4b">
      <li><xref href="c-recycle-bin-bulk-actions.dita"></xref></li>
      <li><xref href="t-filter-recycle-bin.dita"></xref></li>
      <li><xref href="t-modify-columns-recycle-bin.dita"></xref></li>
</ul>


What has to be done for this to work upon generation with the chunk element?

Thanks for your help,
Tonia

Rally Software Content Experience Lead


PDF production with SVG having hot spots

Pierre Attar
 

Hi,

I have a technical documentation with a lot of SVG files having hot spots.
Hotspots are managed using a javascript function call on g/@onmouseover attributes.
The function itself changes some opacity attributes of the graphic.
The HTML production works fine and all hotspots are active.

Using the same SVG, with the standard DITA-OT PDF (XSL-FO) plugin, the hotspots are no more active and all images are flats.

So, does someone foud a solution, a workaround, for keeping these kind SVG hotspots actives ?
Is there an other way to code SVG for being able to make them interactive both on PDF and HTML ?

Thanks for sharing any idea, solution,

Pierre

321 - 340 of 46295