xhtml customization re <pre class="codeblock">

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. ;-)


There's now a Dita-OT plugin that handles all the details of using the prettify module for xhtml output





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.



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 I've specified above. I tried Debbie's suggestion and it works.




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.

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.



XML.org Focus Areas: BPEL | DITA | ebXML | IDtrust | OpenDocument | SAML | UBL | UDDI
OASIS sites: OASIS | Cover Pages | XML.org | AMQP | CGM Open | eGov | Emergency | IDtrust | LegalXML | Open CSA | OSLC | WS-I