PC Review


Reply
Thread Tools Rate Thread

Bind Word document to an XML schema

 
 
Angus
Guest
Posts: n/a
 
      30th Jan 2009
Hello

We are a software house and want to store application options in an
xml file. Eg application name, version, description, etc. I have
developed a schema and someone had the bright idea of binding a Word
document to this schema? Then we can use Word as a front end and
enter values and save as an individual xml file.

Is this possible?

How about creating separate xml files for each application? how would
that work?

Any help would be much appreciated.

Angus
 
Reply With Quote
 
 
 
 
Peter Jamieson
Guest
Posts: n/a
 
      30th Jan 2009
It's possible to do this in Word 2003 (not sure about the most basic
version) and Word 2007.

However, to get you started, your schema will need to be an XML Schema
type schema (not, e.g., a Relax-NG schema), typically a .xsd file. In
Word 2003, you then need to...
a. go to Tools->Templates and Addins->XML Schema
b. Add Schema
c. locate the schema you want to use, and type in a URI and an alias
(used locally by Word). Ensure that the new schema is checked in the list
d. You should then see the XML Structure task pane, which lets you
insert "tags" that correspond to the elements in your Schema (Word isn't
so hot when it comes to maintaining XML Attributes, which is a factor
you may need to take into consideration). Insert the tags needed to
conform to your schema - Word should flag errors where the structure
and/or content do not match.
e. save your document - assuming you want to create "tear-off" copies,
save it as a Word template, e.g. in .doc format. If yu want to see what
it looks like in WordProcessingML, save it as XML document format, but
uncheck the Save Data Only option.
f. You should now be able to create new documents based on that
template. However, when you save the document, choose XML Document formt
(*.xml) and ensure the Save Data Only option is checked. The saved
document /should/ then be an XML document, containing no
WordProcessingML, that complies with your XML schema.

In Word 2007 the process is similar, but you start with the Developer
tab (you can enable this in Word Office Button->Word
options->Popular->"Show Developer tab in the ribbon" if you do not see
it) and click Structure to see the structure pane.

That's the basic approach. It is possible to "add value" to XML
documents by developing "Smart Documents" - that's really a developer
activity and you should start looking around MSDN for further info. on
that. Smart Documents can be developed in VBA but on the whole you'll
probably be better off using VB.NET or Csharp.NET to do it.

Peter Jamieson

http://tips.pjmsn.me.uk

Angus wrote:
> Hello
>
> We are a software house and want to store application options in an
> xml file. Eg application name, version, description, etc. I have
> developed a schema and someone had the bright idea of binding a Word
> document to this schema? Then we can use Word as a front end and
> enter values and save as an individual xml file.
>
> Is this possible?
>
> How about creating separate xml files for each application? how would
> that work?
>
> Any help would be much appreciated.
>
> Angus

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a schema to word document to be imported to Exel Seragram Microsoft Word Document Management 1 20th May 2009 11:48 PM
How to convert existing word document using XML schema? =?Utf-8?B?V29yZCBEb2N1bWVudCBhbmQgWE1MIHNjaGVtYQ== Microsoft Word Document Management 1 10th May 2006 11:05 AM
how to transport word document attached to a schema to other sym =?Utf-8?B?Um9iaW4gSm9zZXBo?= Microsoft Word Document Management 1 24th Apr 2006 05:22 PM
Using schema in Word document farseer Microsoft Word Document Management 1 3rd Jun 2005 08:50 AM
Bind schema to dataview Vidyanand Kulkarni Microsoft Dot NET Framework Forms 2 15th Sep 2004 06:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:50 AM.