treetools | Tools for processing treebank trees | Natural Language Processing library
kandi X-RAY | treetools Summary
Support
Quality
Security
License
Reuse
- Delete traces in tree
- Print a terminal tree
- Remove a terminal from the tree
- Return all children of a tree
- Read files
- R Linsub
- Binarize a rule
- Binarize a grammar
- Write a grammar to a LOPAR format
- Generate a gap
- Returns the best order of a function
- Mark all head heads
- Remove all branches from the tree
- Render a Tiger XML tree
- Mark the head as head
- Delete punctuation
- Remove punctuation with punctuation
- Generate a topdown tree
- Filter tree by length
- Insert new terminals into tree
- Substitute POSIX variables
- Split the tree into a single tree
- Convert lexicon to file
- Attach VROOT to the tree
- Symetrify punctuation
- Export a text file
treetools Key Features
treetools Examples and Code Snippets
Trending Discussions on treetools
Trending Discussions on treetools
QUESTION
I have created the custom xhtml plugin like this
my plugin.xml code is
build.xml code is
the build_transtype-custom.xml is
custom HTML transform
then I have pasted the base plugin xsl folder to customized plugin the I have changed the xsl named dita2xhtml.xsl
Chapter .
then changed the xsl named map2htmtocImpl.xsl template named as generate-toc in xslhtml\map2htmtoc folder as like this
template changes only done
Configuring Workflow
Expand all
Collapse all
then I have run integrator.xml command ant -f integrator.xml in command prompt after that i have run the transformation named xhtml-custom in oxygen then I am getting the transformation successful but oxygen showing some error as shown below
System ID: E:\task\Test.ditamap
Scenario: Test (xhtml-common)
Input file: E:\task\Test.ditamap
Engine name: DITA-OT
Severity: error
Description: Ambiguous rule match for /task/taskbody[1]/steps[1]/step[3]/cmd[1]/image[1]
System ID: E:\task\Test.ditamap
Scenario: Test (xhtml-common)
Input file: E:\task\Test.ditamap
Engine name: DITA-OT
Severity: error
Description: Ambiguous rule match for /task/taskbody[1]/steps[1]/step[6]/info[1]/image[1]
System ID: E:\task\Test.ditamap
Scenario: Test (xhtml-common)
Input file: E:\task\Test.ditamap
Engine name: DITA-OT
Severity: error
Description: Ambiguous rule match for /task/taskbody[1]/steps[1]/step[7]/stepresult[1]/image[1]
System ID: E:\task\Test.ditamap
Scenario: Test (xhtml-common)
Input file: E:\task\Test.ditamap
Engine name: DITA-OT
Severity: error
Description: Ambiguous rule match for /task/taskbody[1]/steps[1]/step[9]/info[1]/image[1]
System ID: E:\task\Test.ditamap
Scenario: Test (xhtml-common)
Input file: E:\task\Test.ditamap
Engine name: DITA-OT
Severity: error
Description: Ambiguous rule match for /task/taskbody[1]/steps[1]/step[8]/info[1]/image[1]
System ID: E:\task\Test.ditamap
Scenario: Test (xhtml-common)
Input file: E:\task\Test.ditamap
Engine name: DITA-OT
Severity: error
Description: Ambiguous rule match for /task/taskbody[1]/steps[1]/step[12]/cmd[1]/image[1]
and the index.html which is created by the transform template changes not applying
Please assist me on this issue
ANSWER
Answered 2017-Feb-22 at 12:03You seem to have two use cases: 1) Customize the HTML output produced for each topic. 2) Customize the HTML output produced for the index.html table of contents.
By answer will be mostly about (1). Once in your plugin.xml you add this extension:
your custom "dita2xhtml.xsl" will be contributed as an XSLT customization stylesheet to all the XHTML-based outputs. So the extension will not be limited to your custom transtype, even the base XHTML output will use your XSLT changes. Your custom "dita2xhtml.xsl" will not be the main XSLT stylesheet in the transformation, but the xsl:templates you write in it will take precedence over the ones in the base XSLT stylesheets. So your custom "dita2xhtml.xsl" should not contain imports to other XSLT stylesheets like "dita2html-base.xsl" which you probably copied from the base XHTML plugin, it should just contain the xsl:templates which override the base processing. Your custom XSLT processing will be applied when DITA topics are converted to equivalent HTML files.
If you also want to influence how the index.html (table of contents) is generated there is another plugin extension called "dita.xsl.htmltoc" which you can declare in the plugin.xml and have it point to another custom XSLT stylesheet which will override templates specified in the base XHTML plugin for the TOC processing.
But as I mentioned both the "dita.xsl.xhtml" and "dita.xsl.htmltoc" extensions will be applied to all XHTML-based outputs, including to the default XHTML output.
If you want your XSLT customizations to apply only for you custom transformation type things get harder, you no longer declare the extensions in the plugin.xml but in your "build_transtype-custom.xml" instead of adding a simple antcall to the main xhtml target:
you would do something like:
custom HTML transform
After you do that, your custom "dita2xhtml.xsl" will become the main XSLT stylesheet applied when producing the HTML file for each DITA topic. So your custom "dita2xhtml.xsl" will need to have an import to the base XHTML XSLT processing:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install treetools
Python 3.7+
Support
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesExplore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits
Save this library and start creating your kit
Share this Page