I have problem with Adobe Framemaker. When I save .xml (dita 1.2) file to .html I get different looking document. If I save it in PDF format the structure of the document is the same.
In HTML (losing the offset):
How can I have the same output in HTML format. Do I have to use Robohelp?
I'm not sure why you necessarily want the HTML to have the same "layout" as the PDF, but I guess that's none of my business. What I do to generate HTML from DITA is this:
* Save the DITA Map as a composite document
* Include the composite document in a book file
* Include a title page, TOC, and any other book components that I want. But these are NOT in DITA
* Generate the TOC
* Use FrameMaker PUBLISH to publish the book as HTML5
I set up the publish configuration to base the hierarchy on the TOC in my book. I break into separate HTML files based on the heading pgf formats that I have in the various title elements.
The results are pretty good -- I had to do minimal customization in the publish configuration. Note that this is the same publish engine that Adobe uses in RoboHelp, so no... You don't have to switch to RoboHelp.
Also note... I don't do sideheads and the like. But if I did, I wouldn't want them in my HTML... HTML rendering has different needs than PDF rendering. Or that's my opinion, anyway.
So I understood that I must do by hand my own css files to render the generated from framemaker html5 files. OK but when you generate html files from your book is there a way to keep dita attributes in the generated html. For example when I save as HTML from .xml file and in HTML setup set for the element "p" for the attribute "outputclass" to be "Alt" then in the final HTML code there will be additional attribute "outputclass=some_value", but in the way of book Save as HTML the HTML setup is not working anyway(no outputclass added in neither html tag).
My final target is to get some info from the technical documentation(like classifying for the first paragraph that a part ot this paragraph is name of table in database, so I need tag like span in html - no external changes to the look of the document, but the tag is saing that this is table name) and link it to my database, so to be able to monitor some thinks like - if I automaticaly get the names of all documented tables from the technical documentation and add them to the database - then a script is going in some moment to get all available tables in the database and compare them with the ones, that are documentated, so I will know that I must documentate some tables, or to clean them(but the clean can be done by monitoring the database transaction log). So I mean technical writers type once and mark some key parts in the document, to be able thirth people to manage and supervise the documentation process
The output from the FrameMaker Publish to HTML5 (same as the RoboHelp publish feature as far as I know) converts FrameMaker formats to class attributes in the HTML. So it does not include any of the DITA attributes. OTOH, I have mapped DITA elements to specific pgf formats, so I have many cases where the class tells me the function of the pgf. For example, in the following <p> I happen to know this is a section title (not a topic title), and that it is at level 2:
In my opinion, you should do the manipulation BEFORE you generate your HTML. I even think the DITA OT produces HTML that isn't good for dynamic manipulation -- I believe that the HTML you produce in any case should be considered static content. When I need dynamic rendering of content, I don't produce the HTML until AFTER making dynamic changes. So I generate the HTML for each topic on the fly, per request. I only "publish" to HTML as a way to deliver static HTML for people who request that. But my true HTML delivery is a dynamic system that reads a DITA topic, manipulates that topic, and then converts the results into HTML -- I display that HTML in a single-page web app.
In your case, I would do the database comparison BEFORE generating output. I just think it's easier to manipulate the pure DITA. That's part of why you use XML -- It's more like data, so you can do more with it.
About the look... If you really want the indents in your HTML output, yes I think you need to customize the CSS. I don't think you need to make a totally new one-- you just need to add the indents. The FrameMaker publishing feature includes a way to get a custom CSS for each topic into the config file. And if you need to do more customization than that, the config file is really a .zip -- you can open it, modify things, zip it again, reload the configuration file, and publish with your customizations.