xhtml customization re <pre class="codeblock">
Forum topic: Submitted by pondj on Thu, 2009-03-05 20:03.
What do I have to do to change
<pre class="codeblock">
in xhtml output to be:
<pre class="prettyprint"> ?
I want to do this in order to use the Javascript code prettifier to format code. I have args.hdf set to write the script call in, and the args.css set for the style sheet, but I am not sure which template I need to copy into my custom .xsl to change the actual tag in the xhtml.
Fast solutions appreciated. ;-)
Julia
Dita-OT prettify plugin
There's now a Dita-OT plugin that handles all the details of using the prettify module for xhtml output
http://code.google.com/p/qwcode-dita-ot-plugins-highlight-js/
Marcus
Thanks for the heads up. I
Thanks for the heads up. I had looked at this before, but the zip didn't seem complete (the directory named in the instructions wasn't there and there was no demo to build). I see now that all of the directories are there. I'll try this and report back.
:-)
http://www.linkedin.com/in/juliapond
Do you actually have the
Do you actually have the class attribute 'codeblock' in your output. I don't think all elements are automatically assigned a class attribute and in this case you may need to create an override and then you can give it any name you want.
Yes, it writes it just as
Yes, it writes it just as I've specified above. I tried Debbie's suggestion and it works.
Thanks!
http://www.linkedin.com/in/juliapond
Hi Julia, You will
Hi Julia,
You will probably get a quick response on the Yahoo groups "dita-users" group with a question like this.
Did you try adding the outputclass attribute to the DITA input document? This is usually copied straight through to the output XHTML's class attribute.
Thanks Debbie...
I have not tried that, but I will! I'll start posting to the yahoo group as well.
again, thanks--that's a big help.
Julia
http://www.linkedin.com/in/juliapond