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

Re: Smart Tag/XML to create doc that compiles sections from multiple d by Cindy

Cindy
Thu Aug 03 08:57:31 CDT 2006

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
> 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.
>
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 :-)


Re: Smart Tag/XML to create doc that compiles sections from multip by Woodsy

Woodsy
Thu Aug 03 15:25:01 CDT 2006

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.

"Cindy M -WordMVP-" wrote:

> 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
> > 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.
> >
> 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 :-)
>
>

Re: Smart Tag/XML to create doc that compiles sections from multip by Cindy

Cindy
Sat Aug 05 04:46:59 CDT 2006

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 :-)