I want to convert this wordml into xml like
<?xml version="1.0" encoding="UTF-8"?>
<Fonction>
<Title><b>My Title</b></Title>
<SousTitre>My Subtitle</Soustitre>
<Texte>Some text goes here</Texte>
</Fonction>
I want to preserve the user defined tags in the schema and also the formatting applied by word.
I saw an xsl on this forum n tried to use that, but it removes the user defined tags.I have no knowledge of how to write an xsl.
Could Anyone help me with this please?
Thanks
Zeinah
Subject:From WordML to XML Author:Minollo I. Date:08 Apr 2005 10:26 PM
Your desire to generate an XML document consistent with the structure you are describing seems to be in contrast with the second requirement you are mentioning "I want to preserve the user defined tags"; you'll need to decide which of the two you want.
> Could Anyone help me with this please?
We are more than willing to help you, but you will need to learn some XSLT or XQuery if you want to succeed in any XML-to-XML transformation you are planning to do.
This XSLT does (part of) what (I guess) you are looking for:
Subject:From WordML to XML Author:zeinah K Date:11 Apr 2005 02:15 AM
Sorry , i didnt make myself clear enough.
What i want to do, is to keep the <Fonction>,<Subtitle>,<Texte> tags and also the word formatting tags like <b>,<i>,<u> which a user can optionally choose.
For example, within the <Texte> and </Texte> tags, the user will insert some text and will include some formatting to different words.
Is it possible to achieve this?
Thanks
Zeinah
Subject:From WordML to XML Author:Minollo I. Date:11 Apr 2005 08:35 AM
You can copy the whole sub-tree of an XML node using xsl:copy-of; that will copy any text formatting element too.
So, you can adapt the XSLT I mentioned earlier to use <xsl:copy-of.../> rather than <xsl:value-of.../>
Subject:From WordML to XML Author:d p Date:17 Apr 2005 07:20 AM Originally Posted: 17 Apr 2005 07:18 AM
hi,<br>
I have been working on a similar project getting xml from word (2003) and here is the process i went through<br>
<br>
* download and install the word 2003 xml toolbar (this requires .net programability support enabled in the office 2003 installation)<br>
* develop a schema for your document<br>
* add the schema to the scheam library for the document<br>
* use the xml toolbar to markup your content with xml tags that are based on the schema document.<br>
* export as xml (sometimes you may have to say save as data only and not validate against the shcema as for some reason MS doesnt like particular schemas even thought they are valid and well formed)<br>
<br>
sounds simple? yeah.... thats what their video said but I found it a lot more difficult than that.<br>
<br>
drop me a line if you want more specifics.<br>
<br>
hope this helps<br>
<br>
-david