Re: wordML XML and HTML

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You shouldn't expect Word to render HTML embedded in WordML - the table layout needs to be expressed using WordML table elements instead.

Peter Jamieson

http://tips.pjmsn.me.uk

LNowak wrote:
Problem: In my xml file - there is element that has HTML formatted text in it. When Word imports my XML file - it displays the element as text string and does not render the HTML stored in the element.

Normally - that is probally what I would want - but in this case I need the table render.

<examples>
<customer> John smith</customer>
<example_table><table style="width: 100%" class="style8">
<tr><td>ABC</td><td>XYZ</td><td>123</td></tr>
<tr><td>ABC</td><td>XYZ</td><td>123</td></tr>
</table>
</example_table>
</examples>

I have been trying to get this to work for couple hours now... :(

I have an xsd , xml and xslt

I open the xsd in word
format the the xml tags etc... create the seed doc
save as xml file - uncheck save data only
run the seed doc through xml2xslt
run the xml and xslt through transformer

Everything works, doc looks good etc... except for the couple of elements that have preformatted HTML data. They are displayes as string in the doc and not renedered as Tables.

Any one know what I might be missing or have pointer?

Thanks
Leigh


.



Relevant Pages

  • Re: XML editors - what can they do?
    ... XML itself is essentially pure syntax, and so is more like SGML (the syntax HTML is based on) than like HTML. ... There are certainly tools to help you create some kinds of XML documents; others are used mostly for machine-to-machine transactions and are rarely edited by hand. ... If you're using a standard XML-based language such as the ones I mentioned above, there are probably already stylesheets available for it to render it into HTML and/or XSL-FO; ...
    (comp.text.xml)
  • getElementByTagName("x") doesnt render in HTML
    ... My javascript reads values from an XML file using the code below, ... renders it in HTML. ... file has an empty element. ... HTML can render it. ...
    (comp.lang.javascript)
  • Re: wordML XML and HTML
    ... whole point of decoupling data from formatting. ... The HTML table renders as word table with all formatting etc… ... your XML file as you show, then you have to put it in an element defined in your ... run the seed doc through xml2xslt ...
    (microsoft.public.word.vba.general)
  • rendering RSS XML as HTML?
    ... im doing my first experiment w/ RSS & ASP.NET. ... ....i want to render this as HTML on my own personal site. ... put an Xml web control on my .aspx like so: ...
    (microsoft.public.dotnet.xml)
  • Re: XML Rendering Problem
    ... Your server is claiming that your XML is HTML and browsers are attempting to ... if you serve it as XML, using XSLT to render it as HTML, the browser still treats it as XML, so you can't use Javascript ...
    (comp.text.xml)