Setting rootmap
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 35
- Joined: Wed Oct 26, 2016 8:19 pm
- Location: India
Setting rootmap
Hi, I have a customized XML refactoring that copies metadata from the DITA map to its topics. This works well in Oxygen XML. I have a few projects running in Ixiasoft ccms. There it doesnt recognize the root map as it is from Dita Map view. I also tried using Oxygen perspective > DITA Map Manager > Selected Context map. Still it doesnt recognize the root map. Is there any other way tp select Ditamap so that the refactoring can run the mapped topics.
<xsl:param name="map-meta" select="document(DITAAccess:getRootMapURL())/(map|bookmap)/(topicmeta|bookmeta)/(prodinfo)"/>
<xsl:param name="map-meta" select="document(DITAAccess:getRootMapURL())/(map|bookmap)/(topicmeta|bookmeta)/(prodinfo)"/>
-Sathya
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Setting rootmap
Hi Sathya,
I assume you are using the Oxygen Eclipse plugin integrated with the Ixiasoft CMS to run the custom XML Refactoring actions. Ixiasoft has its own Dita Map view installed in the Eclipse environment so the "DITAAccess:getRootMapURL()" Oxygen API has no way to access that.
About this remark:
Maybe in such cases you can make that certain parameter configurable in the XML Refactoring action's XML description file so that you can force set a certain value to it before running the XML refactoring.
Regards,
Radu
I assume you are using the Oxygen Eclipse plugin integrated with the Ixiasoft CMS to run the custom XML Refactoring actions. Ixiasoft has its own Dita Map view installed in the Eclipse environment so the "DITAAccess:getRootMapURL()" Oxygen API has no way to access that.
About this remark:
Ixiasoft also uses our APIs to change the way in which keys are gathered so I do not think there is a way to make the "DITAAccess:getRootMapURL()" API work when the Oxygen Eclipse plugin is integrated with the Ixiasoft Eclipse plugins.I also tried using Oxygen perspective > DITA Map Manager > Selected Context map. Still it doesnt recognize the root map.
Maybe in such cases you can make that certain parameter configurable in the XML Refactoring action's XML description file so that you can force set a certain value to it before running the XML refactoring.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 35
- Joined: Wed Oct 26, 2016 8:19 pm
- Location: India
Re: Setting rootmap
Thanks, Radu.
I am a beginner. Just learning XSL.
I have updated the descriptor file to force ask Map ID. And it worked. The refactoring processes the map and topics associated to it.
However, it doesnt copy the metadata from the mentioned map. What am I missing here?
I want to copy the prodinfo from the mentioned map ID and paste it to the associated Topics.
<xsl:param name="map-meta" select="document(map|bookmap)/(topicmeta|bookmeta)/(prodinfo)"/>
I am a beginner. Just learning XSL.
I have updated the descriptor file to force ask Map ID. And it worked. The refactoring processes the map and topics associated to it.
However, it doesnt copy the metadata from the mentioned map. What am I missing here?
I want to copy the prodinfo from the mentioned map ID and paste it to the associated Topics.
<xsl:param name="map-meta" select="document(map|bookmap)/(topicmeta|bookmeta)/(prodinfo)"/>
-Sathya
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Setting rootmap
Hi Sathya,
What do you mean by "Map ID"? Can you paste your XML Refactoring action's descriptor XML file's contents in a reply on this thread?
In the "Scope and filters" page from the XML Refactoring dialog what scope did you choose?
If all else fails maybe you can pass a value for the "map-meta" parameter directly from the XML refactoring action, allow the end users to paste in the XML refactoring configuration dialog the precise value to use instead of having it being read automatically from the DITA Map.
Regards,
Radu
What do you mean by "Map ID"? Can you paste your XML Refactoring action's descriptor XML file's contents in a reply on this thread?
In the "Scope and filters" page from the XML Refactoring dialog what scope did you choose?
If all else fails maybe you can pass a value for the "map-meta" parameter directly from the XML refactoring action, allow the end users to paste in the XML refactoring configuration dialog the precise value to use instead of having it being read automatically from the DITA Map.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 35
- Joined: Wed Oct 26, 2016 8:19 pm
- Location: India
Re: Setting rootmap
Here is the xml content:
Here is the xsl content:
Code: Select all
<script type="XSLT" href="copy-metadata.xsl"/>
<category>DITA Map</category>
<parameters>
<description>params</description>
<parameter type="TEXT" name="map-id" label="Map ID:">
<description>Map ID</description>
</parameter>
</parameters>
Code: Select all
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:DITAAccess="java:ro.sync.ecss.dita.DITAAccess" exclude-result-prefixes="#all" version="3.0">
<xsl:param name="map-meta" select="document(DITAAccess:getRootMapURL())/(map|bookmap)/(topicmeta|bookmeta)/(prodinfo)"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="topic">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="title"/>
<xsl:if test="not(//prolog) and $map-meta">
<prolog>
<metadata>
<xsl:copy-of select="$map-meta" copy-namespaces="no"/>
</metadata>
</prolog>
</xsl:if>
<xsl:apply-templates select="* except title"/>
</xsl:copy>
</xsl:template>
-Sathya
-
- Posts: 35
- Joined: Wed Oct 26, 2016 8:19 pm
- Location: India
Re: Setting rootmap
Hi Radu, in CCMS selecting Map ID did process the topics associated with it. The preview showed all the topics in the map. Just that the Prolog was not copied, it just created an additional <metadata>.
I need to copy the prolog>prodinfo from the selected map/bookmap and paste in its topics.
I need to copy the prolog>prodinfo from the selected map/bookmap and paste in its topics.
-Sathya
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Setting rootmap
Hi Sathya,
If you define in the XML refactoring descriptor file a parameter like this:
then the corresponding XSLT styleesheet could take its value defined by the user with an xsl:param like this:
But I do not know what "Map ID" means, maybe it's a CMS specific term, Oxygen is just the editing part of the equation.
Regards,
Radu
If you define in the XML refactoring descriptor file a parameter like this:
Code: Select all
<parameter type="TEXT" name="map-id" label="Map ID:">
<description>Map ID</description>
</parameter>
Code: Select all
<xsl:param name="map-id"/>
So you used a CCMS specific action to modify multiple topics? Something equivalent to Oxygen's XML Refactoring action?in CCMS selecting Map ID did process the topics associated with it. The preview showed all the topics in the map. Just that the Prolog was not copied, it just created an additional <metadata>.
Maybe the CCMS has its own means of making multiple changes in topics, how about if you ask them?I need to copy the prolog>prodinfo from the selected map/bookmap and paste in its topics.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 35
- Joined: Wed Oct 26, 2016 8:19 pm
- Location: India
Re: Setting rootmap
Hi Radu,
Map/bookmap ID is the same as we have in Oxygen. However, in CCMS, they create a unique ID for each object.
It still creates an empty metadata entry but doesnt copy Prolog from map/bookmap to Topics.
Map/bookmap ID is the same as we have in Oxygen. However, in CCMS, they create a unique ID for each object.
image.png
I added the <xsl:param name="map-id"/> to define the "map-id".It still creates an empty metadata entry but doesnt copy Prolog from map/bookmap to Topics.
image.png
You do not have the required permissions to view the files attached to this post.
-Sathya
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Setting rootmap
Hi,
The "id" attribute value inside a DITA Map is just an ID value, it does not tell the XSLT stylesheet from where to load the DITA Map.
An XSLT function like "document(.....)" requires a document URL as a parameter with the URL having a value something like "file:/path/to/my.ditamap". I do not know if you can find out the URL of the DITA Map in the Ixiasoft system or if the XSLT stylesheet can obtain content from it.
Regards,
Radu
The "id" attribute value inside a DITA Map is just an ID value, it does not tell the XSLT stylesheet from where to load the DITA Map.
An XSLT function like "document(.....)" requires a document URL as a parameter with the URL having a value something like "file:/path/to/my.ditamap". I do not know if you can find out the URL of the DITA Map in the Ixiasoft system or if the XSLT stylesheet can obtain content from it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service