Generalize Transform
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 4
- Joined: Thu Aug 25, 2016 5:31 pm
Generalize Transform
Post by DitaConversion »
Hello,
With the previous help from the forums I was able to proceed further in my attempt to "de-specialize" my .dita file.
I used an XSLT transform using the generalize.xsl file in the DITA OT, which works great. However I have a slight modification I would like to perform, and was wondering if anyone knew how to make this change in the transform process.
Currently the tag is setup as follows:
When i perform the transformation, I get:
Is there a way to modify it so I can choose which attributes remain? i.e if I just wanted the output to be as shown below so that it contains no trace of the specialization:
With the previous help from the forums I was able to proceed further in my attempt to "de-specialize" my .dita file.
I used an XSLT transform using the generalize.xsl file in the DITA OT, which works great. However I have a slight modification I would like to perform, and was wondering if anyone knew how to make this change in the transform process.
Currently the tag is setup as follows:
Code: Select all
<step class "- topic/li task/step " id="4552654-154225">inner text</step>
Code: Select all
<li class= "- topic/li task/step " id="4552654-154225">inner text</li>
Code: Select all
<li class= "- topic/li " id="4552654-154225">inner text</li>
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Generalize Transform
Hi,
You probably do not need the @class attributes at all, as the DTDs already define default values for them.
So if in the "generalize.xsl" you find the XSLT template:
at some point it copies all attributes:
and you can instruct it to copy all attributes except @class:
There are various online resources for learning XSLT which should be a valuable tool when working with DITA.
Regards,
Radu
You probably do not need the @class attributes at all, as the DTDs already define default values for them.
So if in the "generalize.xsl" you find the XSLT template:
Code: Select all
<xsl:template match="*[@class]">
..................
</xsl:template>
Code: Select all
<xsl:copy-of select="@*"/>
Code: Select all
<xsl:copy-of select="@*[not(name()='class')]"/>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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