Xml/Xslt - Can any one help me out how to create a HTML file using DITAMAP in C#.

Asked By Ramesh Nalla on 17-Jan-14 08:45 AM
Hi All,

This is regarding the conversion of xml content into HTML using DITA standards. I have created an xml file(DITA standard

http://en.wikipedia.org/wiki/Darwin_Information_Typing_Architecture)  and trying to publish this file content into HTML.

XML (.dita format) -----> .ditamap ----> HTML (output)

Help is highly appreciated.!

Thanks everyone.
Ram.

Robbe Morris replied to Ramesh Nalla on 17-Jan-14 08:53 AM
These two articles on XPath query examples on node queries, attribute queries, and substring queries should get you started:

https://www.nullskull.com/a/1625/xpath-examples-for-node-attribute-and-substring-queries.aspx
https://www.nullskull.com/a/10476825/xpath-queries-and-xmlnode-manipulation-in-c.aspx

You'd essentially build an html string using the System.Text.StringBuilder() class while iterating through the xml nodes and attributes to build whatever you want in your html page.
Ramesh Nalla replied to Robbe Morris on 17-Jan-14 10:21 AM
Hi Robbe,

Thank you very much for you quick reply,
I have seen the example link that you have shared. Need help on the below context.

Actually we have to parse the DITA standrad XML file and display the file content into HTML. There are two file like .dita & .ditamap

sampleTest.ditamap

use this sample ditamap file and generate the output in html format( i.e TABLE, TREEVIEW / MENU , etc..) using c#

can you please help me on this ..

Thanks
gssRam.
Robbe Morris replied to Ramesh Nalla on 17-Jan-14 10:24 AM
It doesn't matter what the xml format is.  Load it up into the XmlDocument and run xpath queries to crab what you need to populate your menus and other aspects of your page.  No one here is going to write the code for you.  Only you have the exact specs as to what your page should look like.
Ramesh Nalla replied to Robbe Morris on 17-Jan-14 10:58 AM
This is one of the solution ...Thanks ..!