Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2006

Tip: Looking for answers? Try searching our database.

Smart Tag/XML to create doc that compiles sections from multiple d

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Woodsy - 01 Aug 2006 19:58 GMT
I have several reports that are arranged into four sections, (s1, s2, s3,
s4).  I am looking for a way to be able to create a document that pulls the
text/charts from each section on each report.  I was thinking that XML smart
tagging would be what I would need to do, but I don't know how to create an
application or a "transform" that would pull the data.  Ideally, I would want
to be able to create an ad hoc document that would pull and arrange all the
s1 sections from each report, and arrange them into one fluid report; or be
able to pull data from s1 and s3 and do the same thing.  Any ideas?

Thanks,
Scott
Cindy M  -WordMVP- - 03 Aug 2006 14:57 GMT
Hi =?Utf-8?B?V29vZHN5?=,

> I have several reports that are arranged into four sections, (s1, s2, s3,
> s4).  I am looking for a way to be able to create a document that pulls the
[quoted text clipped - 4 lines]
> s1 sections from each report, and arrange them into one fluid report; or be
> able to pull data from s1 and s3 and do the same thing.

Assuming you have Word 2003, and you'd save the documents as XML, then yes, this
should be a valid approach. I should warn you, however, that in WordML a
"section" doesn't surround or contain the text. The section break information is
stored in the last paragraph mark of a section. So you need to be careful to
pick up everything up to the w:sectPr element PLUS the w:p in which it is
contained.

There is a wx:sect element that denotes a section, however, it might also appear
under other circumstances.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
Woodsy - 03 Aug 2006 21:25 GMT
Thanks for the reply.  I guess I'm still confused about how to actually go
about making this happen.  Would I use traditional XML tagging, for example,

<?xml version="1.0" ?>
<report>
<initative>INITATIVE1</initiative>
<s1>text</s1>
<s2>text</s2>
<s3>text</s3>
<s4>text</s4>
</report>

And then write a transform, or some kind of tool that would query each
report for 'initiative' and 's1' and so on, and then display them in turn?  
I'm very new to the XML/WordML language.

> Hi =?Utf-8?B?V29vZHN5?=,
>
[quoted text clipped - 24 lines]
> This reply is posted in the Newsgroup; please post any follow question or reply
> in the newsgroup and not by e-mail :-)
Cindy M  -WordMVP- - 05 Aug 2006 10:46 GMT
Hi =?Utf-8?B?V29vZHN5?=,

> I'm very new to the XML/WordML language.

A bit of a challenge, then... :-) I highly recommend you get "Office 2003 XML"
from O'Reilly press, in that case. The information about how to identify
sections is in there. And you may need to do a bit of experimenting / testing
/ learning with XSLT and XPath on simple kinds of XML files before you tackle
this. For questions of this type, the XML and XSL newsgroups will be the best
place to ask :-)

> I guess I'm still confused about how to actually go
> about making this happen.  Would I use traditional XML tagging, for example,
>  
> And then write a transform, or some kind of tool that would query each
> report for 'initiative' and 's1' and so on, and then display them in turn?

No, since you want to pull out WordML, you shouldn't use your own tags. You
*could* use your own tags, but that means you'd need a schema, and things
start to get even more complicated :-) Since Word basically provides
everything you need to identify the sections, you're better off to work just
with Word's own XML.

But yes, you will need a transform, or code, to extract and combine the
information from the various documents then put it together.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.