Date   

Adding a parameter to an extension in the DITA-OT preprocessing

Pierre Attar
 

Hi all,

I've created an extension to the DITA-OT topicpull process.

The extension is something like

 <feature extension="ant.import" file="lr-solve.xml"/>
<feature extension="depend.preprocess.topicpull.pre" value="lr-solve" />

Of course, lr-solve.xml is an ant file containing the needed target.

This works in 3.6 using the xhtml5 transtype.

Unfortunately it does not works withe pdf2 transtype because it uses the preprocess2 mechanism and I don't knows how to name the feature extension.

Nevertheless, tu this lr-solve process, I need to add a parameter for this transformation. Unfortunately, I only know how to add a parameter to a new or exiting transtype. I search in the DITA-OT documentation and did not found any documentation to add parameter to the preprocess.

So, my two questions :

- how to add a feature extension to the preprocess2 process ?

- how to add a parameter to an extension called both by the preprocess ans the preprocess2 processes ?

Thanks for sharing ideas, Pierre


Re: Override Topic title with @navtitle #XSLT

Shaurabh
 

Even though Toshihiko mentioned that it seems a known bug, i thought of giving them a try. I tried few other approaches as well using XSLT, but no success. As already mentioned by Ajay, we are using DITA-OT 3.5.4 version. Please let me know if there is any other work around to achieve above mentioned scenario.

Thanks


Re: Override Topic title with @navtitle #XSLT

ajay.soam@...
 

We are using DITA-OT 3.5.4 version. thx


Re: Override Topic title with @navtitle #XSLT

Kristen James Eberlein
 

So, embace the future; with DITA 2.0, @alt, @navtitle, and @locktitle are all removed. <grin/>

Shaurabh, what processor are you using? If you are using the DITA-OT, what version?

Best,
Kris

Kristen James Eberlein
Chair, OASIS DITA Technical Committee
OASIS Distinguished Contributor
Principal consultant, Eberlein Consulting LLC
www.eberleinconsulting.com
+1 919 622-1501; kriseberlein (skype)


On 3/31/2021 10:09 AM, Toshihiko Makita via groups.io wrote:
Shaurabh is using @navtitle rather than @alt.

Also there is DITA-OT bug I've experienced even if you use topicmeta/navititle instead of @navtitle:

topicmeta/navtitle is overridden by topic/title even if @locktitle="yes" #3708
https://github.com/dita-ot/dita-ot/issues/3708


Re: Override Topic title with @navtitle #XSLT

Toshihiko Makita
 

Shaurabh is using @navtitle rather than @alt.

Also there is DITA-OT bug I've experienced even if you use topicmeta/navititle instead of @navtitle:

topicmeta/navtitle is overridden by topic/title even if @locktitle="yes" #3708
https://github.com/dita-ot/dita-ot/issues/3708


Re: What DITA tools require XSDs? DITA TC wants to know

Kristen James Eberlein
 

Yes -- I'm not interested in this sort of stuff. (If you can write custom scripts in Ruby, then you also can figure out how to generate XSDs from the TC-provided DTD or RNG.)

I am interested in what commercial applications used in DITA implementations require.

For example, if my memory is correct, Xeditor requires XSDs, as did earlier versions of the SDL Web editor.

Best,
Kris

Kristen James Eberlein
Chair, OASIS DITA Technical Committee
OASIS Distinguished Contributor
Principal consultant, Eberlein Consulting LLC
www.eberleinconsulting.com
+1 919 622-1501; kriseberlein (skype)

On 3/31/2021 8:19 AM, Wayne Brissette via groups.io wrote:
Kris:

I wrote some custom scripts in Ruby with Nokogiri and the only way I could get them to validate against a DTD was to use the XSDs, but I wouldn't say this is even remotely something anybody else would do. I think NXP while using Ruby for some of their custom DITA scripts ditched Nokogiri and went with another XML library.

-Wayne

Kristen James Eberlein wrote on 2021-03-31 07:06:
The DITA TC will only distribute DTDs and RNG for DITA 2.0, no XSDs.

I'm interested in compiling a list of DITA application that require XSDs; please help me out!

Note: This will NOT affect the DITA TC decision to not distribute XSDs.





.


Re: What DITA tools require XSDs? DITA TC wants to know

Wayne Brissette
 

Kris:

I wrote some custom scripts in Ruby with Nokogiri and the only way I could get them to validate against a DTD was to use the XSDs, but I wouldn't say this is even remotely something anybody else would do. I think NXP while using Ruby for some of their custom DITA scripts ditched Nokogiri and went with another XML library.

-Wayne

Kristen James Eberlein wrote on 2021-03-31 07:06:

The DITA TC will only distribute DTDs and RNG for DITA 2.0, no XSDs.

I'm interested in compiling a list of DITA application that require XSDs; please help me out!

Note: This will NOT affect the DITA TC decision to not distribute XSDs.


What DITA tools require XSDs? DITA TC wants to know

Kristen James Eberlein
 

The DITA TC will only distribute DTDs and RNG for DITA 2.0, no XSDs.

I'm interested in compiling a list of DITA application that require XSDs; please help me out!

Note: This will NOT affect the DITA TC decision to not distribute XSDs.

--
Best,
Kris

Kristen James Eberlein
Chair, OASIS DITA Technical Committee
OASIS Distinguished Contributor
Principal consultant, Eberlein Consulting LLC
www.eberleinconsulting.com
+1 919 622-1501; kriseberlein (skype)


Re: Override Topic title with @navtitle #XSLT

Kristen James Eberlein
 

Add lock title=“yes” to the <topicref> element. Be aware that the @alt attribute has been deprecated since 2010; you should be using <alt>.

Kris


On Mar 31, 2021, at 7:34 AM, Shaurabh via groups.io <shaurabh.prakash-ext@...> wrote:

I have a scenario where i need to override Topic title with navtitle value in frontmatter using xslt. Being new to DITA, i am unaware of any approach to achieve it. Below is the sample given.
Title in the output file should be "Story Book"(given in navtitle) instead of title(Poem) given in dita file. Please help.

#Main.ditamap

<bookmap rev="3" dms_docid="xyz123" id="xyz123" doc_type="Story book">
    <booktitle>
        <mainbooktitle>Stories</mainbooktitle>
    </booktitle>
    <frontmatter class="- map/topicref bookmap/frontmatter ">
        <topicref navtitle="Story Book" format="dita" href="ab12_Story.dita" type="concept"
            class="- map/topicref "/>
    </frontmatter>
    <chapter navtitle="Detailed Story" locktitle="yes">
        <topicref href="UserStory1.dita"/>
    </chapter>
    <backmatter class="- map/topicref bookmap/backmatter ">
        <amendments format="dita" href="xyz123_history.dita" type="concept"
            class="- map/topicref bookmap/amendments "/>
    </backmatter>
</bookmap>


#UserStory1.dita
 
<concept id="concept_123">
    <title>Poem</title>
    <conbody>
        <section id="section_567">
            <p>This Book contains children stories aged between 5 - 8 years.</p>
        </section>
    </conbody>
</concept>


Override Topic title with @navtitle #XSLT

Shaurabh
 

I have a scenario where i need to override Topic title with navtitle value in frontmatter using xslt. Being new to DITA, i am unaware of any approach to achieve it. Below is the sample given.
Title in the output file should be "Story Book"(given in navtitle) instead of title(Poem) given in dita file. Please help.

#Main.ditamap

<bookmap rev="3" dms_docid="xyz123" id="xyz123" doc_type="Story book">
    <booktitle>
        <mainbooktitle>Stories</mainbooktitle>
    </booktitle>
    <frontmatter class="- map/topicref bookmap/frontmatter ">
        <topicref navtitle="Story Book" format="dita" href="ab12_Story.dita" type="concept"
            class="- map/topicref "/>
    </frontmatter>
    <chapter navtitle="Detailed Story" locktitle="yes">
        <topicref href="UserStory1.dita"/>
    </chapter>
    <backmatter class="- map/topicref bookmap/backmatter ">
        <amendments format="dita" href="xyz123_history.dita" type="concept"
            class="- map/topicref bookmap/amendments "/>
    </backmatter>
</bookmap>


#UserStory1.dita
 
<concept id="concept_123">
    <title>Poem</title>
    <conbody>
        <section id="section_567">
            <p>This Book contains children stories aged between 5 - 8 years.</p>
        </section>
    </conbody>
</concept>


Re: A solution to reuse content between two maps and keep the folder structure? Maybe profiling? #reuse

Vladimir Markiev
 

I’m not sure about it but in Oxygen there is a concept called “root map” 
I see. You mean resolving the keys against the root map which will always be my parent map. This may actually be helpful for reuse. Thanks for the good tip.

With some effort, I was able to set up profiling for the maps. I will try to use the root map for resolving references.


Re: A solution to reuse content between two maps and keep the folder structure? Maybe profiling? #reuse

Vladimir Markiev
 

Thank you for the advice. Unfortunately, our version of Oxygen is 22.1 and it doesn't have that function.


Re: A solution to reuse content between two maps and keep the folder structure? Maybe profiling? #reuse

Arthur PROVENIER
 

Hi,

 

I’m not sure about it but in Oxygen there is a concept called “root map” : https://www.oxygenxml.com/doc/versions/23.1/ug-author/topics/root-map.html?hl=root%2Cmap

Specifying the correct root map helps to prevent validation problems when you work with keyrefs and also acts as the foundation for content completion.

 

Arthur

 


Re: A solution to reuse content between two maps and keep the folder structure? Maybe profiling? #reuse

Radu Coravu
 

Hi,

Only about this particular comment that you had:

Is there a way to put a new parent map to disk root and include my other two maps in it? Right now if I try, the maps are included, but only as non-editable references so I can't setup any reuse and can't set profiling attributes.
I assume you are editing the top level DITA Map in the Oxygen DITA Maps Manager view. By default the DITA Maps Manager allows editing only the content of the current opened DITA Map, if you want to edit submaps (for example set profiling attributes on their topicrefs) you need to open the separately in the DITA Maps Manager view. In Oxygen 23.0 we added in the Oxygen Preferences->"DITA / Maps" page a checkbox named "Allow referenced submaps to be edited". When checked it should allow you to make changes to submaps directly when the top level DITA Map is opened in the "DITA Maps Manager view".

Regards,

Radu

Radu Coravu
Oxygen XML Editor
On 3/29/21 12:01, grolribasi@... wrote:
Hello everyone! I am using Oxygen XML Author and I have two maps that have a lot of similar content. Right now, the content is not reused, but it would be great to make it reusable. The maps are called InstallGuide and AdminGuide they are stored on the disk with the following hierarchy:

disk root
..common
....InstallGuide.ditamap
..Product
....ProductFeatures
......MainProduct
........AdminGuide.ditamap

Is there a way to put a new parent map to disk root and include my other two maps in it? Right now if I try, the maps are included, but only as non-editable references so I can't setup any reuse and can't set profiling attributes.

Why do I need profiling?
Since the maps are two different documents I want to be able to profile them from the parent map. But I want to also be able to reuse content from one map to another. Moreover, I would want to keep the folder structure unchanged. Is that possible?

I can't get my head around the solution for my "wants". Maybe someone can propose a better way to achieve the goal, I would appreciate that. 


A solution to reuse content between two maps and keep the folder structure? Maybe profiling? #reuse

Vladimir Markiev
 

Hello everyone! I am using Oxygen XML Author and I have two maps that have a lot of similar content. Right now, the content is not reused, but it would be great to make it reusable. The maps are called InstallGuide and AdminGuide they are stored on the disk with the following hierarchy:

disk root
..common
....InstallGuide.ditamap
..Product
....ProductFeatures
......MainProduct
........AdminGuide.ditamap

Is there a way to put a new parent map to disk root and include my other two maps in it? Right now if I try, the maps are included, but only as non-editable references so I can't setup any reuse and can't set profiling attributes.

Why do I need profiling?
Since the maps are two different documents I want to be able to profile them from the parent map. But I want to also be able to reuse content from one map to another. Moreover, I would want to keep the folder structure unchanged. Is that possible?

I can't get my head around the solution for my "wants". Maybe someone can propose a better way to achieve the goal, I would appreciate that. 


Re: Use CMIS protocol with dita-ot #DITA-OT #CCMS #Oxygen

Radu Coravu
 

Hi Nicolas,

When you publish using the DITA OT a DITA Map which is on a remote location from Oxygen, we have some special pre-processing code which tries to download the DITA Map and its referenced topics to a local temporary files cache. So we try to make the fact that the DITA Map is remote transparent to the DITA OT. In this particular case the pre-processing code that we added to the DITA OT cannot download the remote resources probably because the credentials which you have set up in Oxygen to connect to the server are not available to the DITA OT publishing engine process.

Indeed the same thing works for Webdav resources because Oxygen passes the Webdav authentication details to the pre-processing stage we have set up in the DITA OT process. But we do not do this for any remote URL protocol connection as the authentication details are specific to each URL protocol.

It would probably be possible to make this work by making certain changes to the CMIS add-on which can be installed in Oxygen. I will add an internal issue on our side for this.

For your information the ID of the internal issue I added is:

    EXM-47697 Make DITA OT publishing work with CMIS add-on for Oxygen

Regards,

Radu

Radu Coravu
Oxygen XML Editor
On 3/26/21 10:50, Nicolas Delobel wrote:

Hello all,

My DITA files are hosted on Alfresco server (CMIS enabled server).
To modify these files I use a specific Oxygen addon based on CMIS protocol. For this part it's OK.

The problem is: when I try to launch DITA-OT publication on these files from Oxygen I have the following error:
[map-reader] 09:28:34.733 [main] ERROR ro.sync.xml.transformer.dita.remote.b - Could not download myTopic.dita because:Error opening connection: cmis://xxx.xxx.com/Sites/mySite/documentLibrary/sources/XXX/myTopic.dita
It seems that DITA-OT doesn't support CMIS protocol.

I tried to access dita files via Oxygen "Data source explorer" and it works because it use http protocol (supported by DITA-OT).

Has anyone ever faced this problem?

Thanks.
Regards,
Nicolas

  


Re: How to add multiple formats for <li> element in <ul>

Derek Fess
 

On Fri, Mar 26, 2021 at 06:39 AM, Ozana Dragomir wrote:
count(ancestor::*[contains(@class, ' topic/ul ')]) = 2
Ozana, thank you so much! That worked perfectly. I guess I didn't realize you could use the <xsl:choose> element in the attr file. I thought it was just defining each attribute set at a time.


Re: How to add multiple formats for <li> element in <ul>

Ozana Dragomir
 

Here is our code for different bullet colours:

In lists-attr.xsl

    <xsl:variable name="custom-color-purple">#72166B</xsl:variable>
    <xsl:variable name="custom-color-blue">#6687B7</xsl:variable>

    <xsl:attribute-set name="ul.li__label__content">
        <xsl:attribute name="text-align">start</xsl:attribute>
        <!-- change second level bullet color to blue and third level bullet color to purple -->
        <xsl:attribute name="color">
            <xsl:choose>
                <xsl:when test="count(ancestor::*[contains(@class, ' topic/ul ')]) = 2">
                    <xsl:value-of select="$custom-color-blue"/>
                </xsl:when>
                <xsl:when test="count(ancestor::*[contains(@class, ' topic/ul ')]) = 3">
                    <xsl:value-of select="$custom-color-purple"/>
                </xsl:when>
                <xsl:otherwise>black</xsl:otherwise>
            </xsl:choose>
        </xsl:attribute>
    </xsl:attribute-set>


I hope this helps.

Best regards,
Ozana


Re: How to add multiple formats for <li> element in <ul>

Nicolas Delobel
 

Hi Derek,

I think in you case you have to create a new a new attribute set per ul level: ul.ul.li__label, ul.ul.ul.li__label, ul.ul.ul.ul.li__label, etc.

And after, you have to apply dynamically these attibute-set based on item level using processAttrSetReflection named template:
<xsl:template match="*[contains(@class, ' topic/ul ')]/*[contains(@class, ' topic/li ')]">
        <xsl:variable name="depth" select="count(ancestor::*[contains(@class, ' topic/ul ')])"/>
        <xsl:variable name="attrName" as="xs:string">
            <xsl:for-each select="0 to $depth">ul.</xsl:for-each>
        </xsl:variable>
        <fo:list-item xsl:use-attribute-sets="ul.li">
            <xsl:call-template name="commonattributes"/>
            <fo:list-item-label>
                <xsl:call-template name="processAttrSetReflection">
                    <xsl:with-param name="attrSet" select="concat('ul',$attrName,'li__label__content')"/>
                    <xsl:with-param name="path" select="'../../cfg/fo/attrs/commons-attr.xsl'"/>
                </xsl:call-template>
                <fo:block xsl:use-attribute-sets="ul.li__label__content">
                    <xsl:call-template name="getVariable">
                        <xsl:with-param name="id" select="concat('Unordered List bullet ', (($depth - 1) mod 4) + 1)"/>
                    </xsl:call-template>
                </fo:block>
            </fo:list-item-label>
            <fo:list-item-body xsl:use-attribute-sets="ul.li__body">
                <fo:block xsl:use-attribute-sets="ul.li__content">
                    <xsl:apply-templates/>
                </fo:block>
            </fo:list-item-body>
        </fo:list-item>
    </xsl:template>
I didn't test, but I think it may work.

Regards,
Nicolas


Use CMIS protocol with dita-ot #DITA-OT #CCMS #Oxygen

Nicolas Delobel
 

Hello all,

My DITA files are hosted on Alfresco server (CMIS enabled server).
To modify these files I use a specific Oxygen addon based on CMIS protocol. For this part it's OK.

The problem is: when I try to launch DITA-OT publication on these files from Oxygen I have the following error:
[map-reader] 09:28:34.733 [main] ERROR ro.sync.xml.transformer.dita.remote.b - Could not download myTopic.dita because:Error opening connection: cmis://xxx.xxx.com/Sites/mySite/documentLibrary/sources/XXX/myTopic.dita
It seems that DITA-OT doesn't support CMIS protocol.

I tried to access dita files via Oxygen "Data source explorer" and it works because it use http protocol (supported by DITA-OT).

Has anyone ever faced this problem?

Thanks.
Regards,
Nicolas

101 - 120 of 46219