Can I extract a XSLT from a Word DOcument?

P

PeterNZ

Ok, here is what we do currently. We have an application which creates
complex contracts in Word 2000. And with complex I mean really complex as in
“Banking Industry Complexâ€.

We use Bookmarks for the Data and we use Special Bookmarks for Paragraphs
i.e. combinations of CtlStart, CtlEnd and Flag Bookmarks. We also have
repeating parts such as Signature Panels for each Customer involved. i.e. 3
Signature Panels if we have 3 customers.

The thing works quite – aehm stable – but has its problems. The biggest one
is, the developers have to do all the Word Template Changes. The reason for
this is, that the logic in the Doctemplates is meanwhile so complex, that we
can’t risk that the user stuffs it.

We are no on the verge of a huge re-design of our complete Department
Software. This will also involve a re-design of the Doc Creation App. We are
hoping (!) to get Office 2003 and use XML. Our vision is, to provide the
users with a way to edit the documents themselves and to enter all the
business logic we have in the documents i.e. “show this paragraph if the
product fulfils this and that criteria†or “for each customer show a
signature panelâ€. Of course our users are familiar with Word. And I we would
also be able to come up with a kind of an editor for our Word Templates which
will enable the user to do the editing and pull in the XML details etc. But
how can I for example extract an XSLT from a Word Document? Because that’s
our idea, to create the XML data in our Doc Creation App and use a Style
sheet to produce the final Word Document.

So in one sentence, the user should be able to do all the usual formatting
in Word plus adding the placeholders for the data and the App will provide
the XML Data file. So how can we get these two things together?

I am posting this because ewe thought there must be someone out there who
does something similar.

I am very keen to hear about your ideas and thoughts. And sorry for this
long post.

Cheers

Peter
 
S

Stephanie Krieger

Hi, Peter,

Smart Docs can do what you're trying to accomplish --
they're a marvelous new technology for Word (or Excel)
2003. Have you seen them yet?

If you have a copy of Word 2003 to play with, you can
download the Smart Docs SDK from
http://www.microsoft.com/downloads/details.aspx?
FamilyID=24a557f7-eb06-4a2c-8f6c-
2767b174126f&DisplayLang=en

Plenty of samples there to get you going and see the
possibilities (the Word Proposal sample will probably
show the most of the type of elements you need).... note,
however, that the folks who made the samples for the SDK
are awesome developers, but not that advanced on the user
end. You'll see overcomplicated formatting in some sample
documents (like a text box used for a paragraph heading
just because it needs a border) ... don't let that throw
you. You can use the exact same document formatting as
usual with a Smart Document -- the differences are the
XML layer underneath and the code to automate document
actions.

Smart Documents have an XML Schema behind them and use a
Visual Studio development platform (such as VB) to
automate the documents. Instead of dialog boxes as you'd
use with VBA automation, the Task Pane serves as the
interface that connects the user with the automation for
the document. It's very nice.

From what you're saying, sounds like these are just the
ticket for you.

Hope that's useful information.

Stephanie Krieger
author of Microsoft Office Document Designer (from
Microsoft Learning)
email: MODD_2003 at msn dot com
blog: arouet.net
 
P

PeterNZ

Thank you Stephanie. I heard about Smart Docs as I hear about a lot of things
at the moment. Who has the time to follow every new way of doing things these
days. But it keeps things interesting, doesn't it? Anyway, I will check out
the SDK and see if it does the trick.

We are also looking into Infopath and BizTalk and Share Point and and and...
As I mentioned previously, a big re-design. But we do not want to have the
workflow document based. The business rule engine sits on the middle tier and
provides XML which has to go into a document. Kind of hit the button and the
printer spits out the documents.

Cheers

Peter
 
P

PeterNZ

Smart Docs are Document Driven. This unfortunately is not what we are looking
for. Our Document Creation Process is Application Driven i.e. printiing the
document is a step in our workflow.

But thank you for the advise.

Cheers

Peter
 
U

Usha Vas

Hi Peter,

I'm trying to do something similar and just wondered if you were able to
come up with an answer. If so, would you mine sharing.

TIA,
Usha
 
P

PeterNZ

Usha,

sorry for the late reply. It's a busy time at the moment.

Unfortunately I am none the wiser at the moment. We are still investigating
how we can achieve our requirements. The idea at the moment is, to use XSLT
to transforms WordProcessingML into XSLT with HTML Formatting (sounds
horrible, doesn't it?). This will then be used with XML Data to create Word
Documents. But it's all a bit vague at this stage.

I will post any news with this in this thread. If you set 'Notify me of
replies' for this thread you will get the latest development.

Sorry that I can't help you at this stage.

BTW do you know John R. Durant's Blog? He is a Microsoft Staff Member In
this blog: http://weblogs.asp.net/johnrdurant/archive/2004/10/26/247891.aspx
he talks about RTF or WordML.

Cheers

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top