How i generate MS doc using xml & xslt with richtext functionality

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello,
  i am using xml & xslt for generate MS word doc. in xml there is a attribute <Comment> that comment attribute contain html .
when i generate MS word doc i missed rich text functionality on document
 
but my problem start after that.
 
simple steps for generating ms doc file are-
1) creating xml file
2)creating xslt file
 use both files as embeed resourses
3)transfom xslt and generate MS doc file
 
  when i use simple xml ,it works fine and i got ms doc file
but when i used rich text functionality in xml like
<span style="color:#0000ff;font-size:x-small <span style="color:#0000ff;font-size:x-small
 

<span style="color:#800000;font-size:x-small <span style="color:#800000;font-size:x-small <I1<span style="color:#0000ff;font-size:x-small <span style="color:#0000ff;font-size:x-small ><span style="font-size:x-small
this
<font size=2>
 
</font>
<span style="color:#0000ff;font-size:x-small <span style="color:#0000ff;font-size:x-small <<span style="color:#800000;font-size:x-small <span style="color:#800000;font-size:x-small b<span style="color:#0000ff;font-size:x-small <span style="color:#0000ff;font-size:x-small ><span style="font-size:x-small is a text<span style="color:#0000ff;font-size:x-small <span style="color:#0000ff;font-size:x-small </<span style="color:#800000;font-size:x-small <span style="color:#800000;font-size:x-small b<span style="color:#0000ff;font-size:x-small <span style="color:#0000ff;font-size:x-small ><span style="font-size:x-small
This
</
<font size=2>
 
</font>
<span style="color:#0000ff;font-size:x-small <span style="color:#0000ff;font-size:x-small <<span style="color:#800000;font-size:x-small <span style="color:#800000;font-size:x-small i<span style="color:#0000ff;font-size:x-small <span style="color:#0000ff;font-size:x-small ><span style="font-size:x-small is itellic<span style="color:#0000ff;font-size:x-small <span style="color:#0000ff;font-size:x-small </<span style="color:#800000;font-size:x-small <span style="color:#800000;font-size:x-small i<span style="color:#0000ff;font-size:x-small <span style="color:#0000ff;font-size:x-small ><span style="color:#800000;font-size:x-small <span style="color:#800000;font-size:x-small I1<span style="color:#0000ff;font-size:x-small <span style="color:#0000ff;font-size:x-small ><span style="font-size:small
 
code works fine and output as msdoc file but with out formatting.
output comes "this is a text This is itallic" instead " this is a text This is itallic"
 
Can anyone tell me how to fix this? Any help is greatly appreciated.

View the full article
 
Back
Top